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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51b2b4ac9db120f311d239b140062958cf771fe6 | 2,898 | py | Python | app.py | Yaamboo/suomipelit-api | fd5d0058d4820667dd78669207ae7646055239f4 | [
"Apache-2.0"
] | null | null | null | app.py | Yaamboo/suomipelit-api | fd5d0058d4820667dd78669207ae7646055239f4 | [
"Apache-2.0"
] | null | null | null | app.py | Yaamboo/suomipelit-api | fd5d0058d4820667dd78669207ae7646055239f4 | [
"Apache-2.0"
] | null | null | null | from flask import abort, Flask, jsonify
import sqlite3
import re
from Suomipelit.jsonencoder import OmaEncoder
from Suomipelit.models import Peli, Peliarvostelu, Kappale, Kuva
app = Flask(__name__)
app.json_encoder = OmaEncoder
@app.route("/api/pelit")
def pelit():
return jsonify(lataa_pelit())
def lataa_pelit()... | 28.693069 | 180 | 0.613182 | 0 | 0 | 0 | 0 | 270 | 0.093168 | 0 | 0 | 518 | 0.178744 |
51b31553ef083d8d41b49feb74b1b78a77ce9832 | 1,563 | py | Python | ices_erf32_generator_cli.py | sharkdata/ices | e529a2636f06b942d39b57897ca17023f76fb80d | [
"MIT"
] | null | null | null | ices_erf32_generator_cli.py | sharkdata/ices | e529a2636f06b942d39b57897ca17023f76fb80d | [
"MIT"
] | null | null | null | ices_erf32_generator_cli.py | sharkdata/ices | e529a2636f06b942d39b57897ca17023f76fb80d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding:utf-8 -*-
#
# Copyright (c) 2021-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
import pathlib
import click
import ices_erf32_generator_main
global ices_config
@click.command()
@click.opt... | 29.490566 | 84 | 0.666027 | 0 | 0 | 0 | 0 | 627 | 0.401152 | 0 | 0 | 581 | 0.371721 |
51b33fd5e4e90e4cc52168abb05d8d58cd914c5b | 752 | py | Python | topics/Bitwise/Missing_Number_268/[1_Bitwise_XOR]_Missing_Number_268.py | DmitryNaimark/leetcode-solutions-python | 16af5f3a9cb8469d82b14c8953847f0e93a92324 | [
"MIT"
] | 1 | 2019-10-31T11:06:23.000Z | 2019-10-31T11:06:23.000Z | topics/Bitwise/Missing_Number_268/[1_Bitwise_XOR]_Missing_Number_268.py | DmitryNaimark/leetcode-solutions-python | 16af5f3a9cb8469d82b14c8953847f0e93a92324 | [
"MIT"
] | null | null | null | topics/Bitwise/Missing_Number_268/[1_Bitwise_XOR]_Missing_Number_268.py | DmitryNaimark/leetcode-solutions-python | 16af5f3a9cb8469d82b14c8953847f0e93a92324 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/missing-number/
# ---------------------------------------------------
from typing import List
# Runtime Complexity: O(N)
# Space Complexity: O(1)
# Idea: XOR with all numbers in range [0, n] and XOR with all nums.
class Solution:
def missingNumber(self, nums: List[int]) -> int:
... | 25.931034 | 67 | 0.470745 | 193 | 0.256649 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.482713 |
51b3dd135b10c21259433ea1463301ed5c72163c | 2,790 | py | Python | test/module_train_test.py | nktankta/PytorchCNNModules | bc1469ceb37477d3f60062f14a750f272e7ceeb0 | [
"MIT"
] | null | null | null | test/module_train_test.py | nktankta/PytorchCNNModules | bc1469ceb37477d3f60062f14a750f272e7ceeb0 | [
"MIT"
] | null | null | null | test/module_train_test.py | nktankta/PytorchCNNModules | bc1469ceb37477d3f60062f14a750f272e7ceeb0 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import numpy as np
from module_easyModel import EasyModel
from module_list import get_test_module
import pytest
test_modules = get_test_module()
transform = transforms.Compose(
[transforms... | 36.710526 | 69 | 0.524373 | 0 | 0 | 0 | 0 | 1,381 | 0.494982 | 0 | 0 | 161 | 0.057706 |
51b52f4360dde9f8fcf753a559f4341aae212c20 | 1,592 | py | Python | Projects/project_2_packages/Team_cool/OLS_team_cool/logit.py | gen-li/modularizationandtesting | 103be0c80bd70ffcf4c700861497745733b72640 | [
"MIT"
] | null | null | null | Projects/project_2_packages/Team_cool/OLS_team_cool/logit.py | gen-li/modularizationandtesting | 103be0c80bd70ffcf4c700861497745733b72640 | [
"MIT"
] | null | null | null | Projects/project_2_packages/Team_cool/OLS_team_cool/logit.py | gen-li/modularizationandtesting | 103be0c80bd70ffcf4c700861497745733b72640 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.stats as st
import statsmodels as sm
from scipy import optimize
y = np.random.randint(2, size=(100,1))
x = np.random.normal(0,1,(100,2))
res_correct = sm.discrete.discrete_model.Logit(y,x).fit()
res_correct.params
def Logit(b,y,x):
# y = np.random.randint(2, size=(100,1))
# x... | 23.411765 | 119 | 0.557161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 986 | 0.600487 |
51ba33a22ebf12fec0e07b6d40becaca5f11662d | 116 | py | Python | number/numberSystem.py | Dariece/number_system_calc | 5d5934c59557af9bdf0accdfc68dd8719e7fd331 | [
"Apache-2.0"
] | null | null | null | number/numberSystem.py | Dariece/number_system_calc | 5d5934c59557af9bdf0accdfc68dd8719e7fd331 | [
"Apache-2.0"
] | null | null | null | number/numberSystem.py | Dariece/number_system_calc | 5d5934c59557af9bdf0accdfc68dd8719e7fd331 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class NumberSystem(Enum):
BINARY = 2
OCTAL = 8
DECIMAL = 10
HEXADECIMAL = 16 | 14.5 | 25 | 0.637931 | 92 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51bc4a4baca841ac8b5c86065dd040c9313df97d | 5,847 | py | Python | fractals/pytorch/model_processor.py | NeilBostian/ML | df487db8755ad074cdd42f1094747815ae555896 | [
"Unlicense"
] | 1 | 2019-10-11T21:36:06.000Z | 2019-10-11T21:36:06.000Z | fractals/pytorch/model_processor.py | NeilBostian/ML | df487db8755ad074cdd42f1094747815ae555896 | [
"Unlicense"
] | null | null | null | fractals/pytorch/model_processor.py | NeilBostian/ML | df487db8755ad074cdd42f1094747815ae555896 | [
"Unlicense"
] | null | null | null | import os
import random
import pickle
import datetime
import torch
import numpy as np
from PIL import Image
from model import Model
from train_data import TrainData
from loss_train_data import get_loss_train_data
class ModelProcessor():
def __init__(self, path):
self.path = path
self.device = tor... | 31.605405 | 116 | 0.507611 | 5,631 | 0.963058 | 1,413 | 0.241662 | 0 | 0 | 0 | 0 | 823 | 0.140756 |
51be12ad14475c1998ae105630807a45e802e7d8 | 549 | py | Python | pedal/assertions/__init__.py | acbart/python-analysis | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 14 | 2019-08-22T03:40:23.000Z | 2022-03-13T00:30:53.000Z | pedal/assertions/__init__.py | pedal-edu/pedal | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 74 | 2019-09-12T04:35:56.000Z | 2022-01-26T19:21:32.000Z | pedal/assertions/__init__.py | acbart/python-analysis | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 2 | 2018-09-16T22:39:15.000Z | 2018-09-17T12:53:28.000Z | """
The assertions module contains classic unittest-style assert statements.
"""
from pedal.assertions.setup import _setup_assertions, resolve_all
from pedal.assertions.constants import TOOL_NAME
from pedal.core.report import Report, MAIN_REPORT
from pedal.assertions.commands import *
def reset(report=MAIN_REPORT):
... | 21.96 | 72 | 0.717668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.367942 |
51be5f0b52819e31e6e93a3882ca71e420ce2121 | 573 | py | Python | python/Python-Quick-Start/generator_func.py | pepincho/playground | 9202a3dab880ff789e5fb96b259c3e0c2503cb49 | [
"MIT"
] | null | null | null | python/Python-Quick-Start/generator_func.py | pepincho/playground | 9202a3dab880ff789e5fb96b259c3e0c2503cb49 | [
"MIT"
] | null | null | null | python/Python-Quick-Start/generator_func.py | pepincho/playground | 9202a3dab880ff789e5fb96b259c3e0c2503cb49 | [
"MIT"
] | null | null | null | # print all prime numbers in a range with a generator function in python
#that is an utility function
def isprime(n):
if n == 1:
return False
for x in range(2, n):
if n % x == 0:
return False
else:
return True
#generator function is used in the for loop as an iterator
#... | 23.875 | 72 | 0.624782 | 0 | 0 | 112 | 0.195462 | 0 | 0 | 0 | 0 | 271 | 0.472949 |
51bf6b3ed4c7f402aaa77eba2ced4b65f3cd67ca | 5,373 | py | Python | safe_notification_service/firebase/tests/utils.py | vaporyorg/safe-notification-service | 7a1bf51b4bb529aab8d6f943616c88f969c98644 | [
"MIT"
] | 8 | 2018-05-17T00:49:57.000Z | 2021-08-23T12:52:49.000Z | safe_notification_service/firebase/tests/utils.py | vaporyorg/safe-notification-service | 7a1bf51b4bb529aab8d6f943616c88f969c98644 | [
"MIT"
] | 64 | 2018-11-08T17:47:18.000Z | 2022-01-31T17:00:22.000Z | safe_notification_service/firebase/tests/utils.py | vaporyorg/safe-notification-service | 7a1bf51b4bb529aab8d6f943616c88f969c98644 | [
"MIT"
] | 4 | 2020-12-28T20:28:07.000Z | 2022-03-19T16:46:44.000Z | import json
from firebase_admin import _http_client, messaging
from firebase_admin.credentials import Base
from google.auth.credentials import Credentials
from requests import adapters, models
FIREBASE_AUTH_CREDENTIALS = {
"type": "service_account",
"project_id": "mock-project-id",
"private_key_id": "mock... | 49.293578 | 1,722 | 0.758608 | 2,641 | 0.491532 | 0 | 0 | 0 | 0 | 0 | 0 | 2,801 | 0.52131 |
51c02944976e6d03f939af067e9a4a01386ea663 | 8,577 | py | Python | pygalgen/generator/common/source_file_parsing/parser_discovery_and_init.py | Kulivox/PyGalGen | 816004bce50703737384e2fbdcfe43b61ce2f4dd | [
"MIT"
] | null | null | null | pygalgen/generator/common/source_file_parsing/parser_discovery_and_init.py | Kulivox/PyGalGen | 816004bce50703737384e2fbdcfe43b61ce2f4dd | [
"MIT"
] | null | null | null | pygalgen/generator/common/source_file_parsing/parser_discovery_and_init.py | Kulivox/PyGalGen | 816004bce50703737384e2fbdcfe43b61ce2f4dd | [
"MIT"
] | null | null | null | """
Module responsible for discovery of import statements importing Argument parser
and discovery of the statements initializing the parser itself
"""
import ast
import sys
from typing import Tuple, Optional, Any, Set, List
from .parsing_exceptions import ArgParseImportNotFound, ArgParserNotUsed
from .parsing_commons i... | 35.589212 | 79 | 0.641483 | 6,955 | 0.81089 | 0 | 0 | 465 | 0.054215 | 0 | 0 | 1,911 | 0.222805 |
51c0e5193ac5162e3a0fb7638cb34cf6d76fc644 | 358 | py | Python | cpovc_pfs/pmtct/urls.py | uonafya/cpims-ovc-3.0 | ec2768c00fc0855eb4983a94204cfcdee0824e19 | [
"Apache-2.0"
] | 2 | 2022-02-26T14:04:40.000Z | 2022-03-23T17:33:32.000Z | cpovc_pfs/pmtct/urls.py | uonafya/cpims-ovc-3.0 | ec2768c00fc0855eb4983a94204cfcdee0824e19 | [
"Apache-2.0"
] | null | null | null | cpovc_pfs/pmtct/urls.py | uonafya/cpims-ovc-3.0 | ec2768c00fc0855eb4983a94204cfcdee0824e19 | [
"Apache-2.0"
] | 19 | 2022-02-26T13:44:58.000Z | 2022-03-26T17:20:22.000Z | from django.urls import path
from . import views
# This should contain urls related to OVC ONLY
urlpatterns = [
path('', views.pmtct_home, name='pmtct_home'),
path('new/<int:id>/', views.new_pmtct, name='new_pmtct'),
path('view/<int:id>/', views.view_pmtct, name='view_pmtct'),
path('edit/<int:id>/', vi... | 32.545455 | 64 | 0.678771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.396648 |
51c1564b9fb274dd54467c39928249894cdba7a4 | 954 | py | Python | config_editor/__init__.py | penguinolog/config-editor | d0b8500eaf8e4cf7c7f93c03c4c4e78072bb51ce | [
"Apache-2.0"
] | null | null | null | config_editor/__init__.py | penguinolog/config-editor | d0b8500eaf8e4cf7c7f93c03c4c4e78072bb51ce | [
"Apache-2.0"
] | null | null | null | config_editor/__init__.py | penguinolog/config-editor | d0b8500eaf8e4cf7c7f93c03c4c4e78072bb51ce | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Alexey Stepanov aka penguinolog
# 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 ap... | 30.774194 | 78 | 0.735849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 724 | 0.75891 |
51c49423dfa19179ff9a8960299203c4be600c6e | 311 | py | Python | delay.py | fleidloff/effect-pedal | 20680294e70979ec230ec2798c836a6447c49853 | [
"MIT"
] | null | null | null | delay.py | fleidloff/effect-pedal | 20680294e70979ec230ec2798c836a6447c49853 | [
"MIT"
] | null | null | null | delay.py | fleidloff/effect-pedal | 20680294e70979ec230ec2798c836a6447c49853 | [
"MIT"
] | null | null | null | import pyo
from settings import audioSource
s = pyo.Server(audio=audioSource, nchnls=1).boot()
s.start()
a = pyo.Input(chnl=0).out()
delay = pyo.Delay(a, delay=.5, feedback=.5)
delay.out()
while True:
s = raw_input('Delay');
if s == "q":
quit()
delay.setDelay(float(s))
#s.gui(locals()) | 17.277778 | 50 | 0.630225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.083601 |
51c64365386b4968c448213772fdf24be5c8b7b8 | 297 | py | Python | djangoPharma/drugs/validators.py | thodoris/djangoPharma | 76089e67bc9940651a876d078879469127f5ac66 | [
"Apache-2.0"
] | null | null | null | djangoPharma/drugs/validators.py | thodoris/djangoPharma | 76089e67bc9940651a876d078879469127f5ac66 | [
"Apache-2.0"
] | null | null | null | djangoPharma/drugs/validators.py | thodoris/djangoPharma | 76089e67bc9940651a876d078879469127f5ac66 | [
"Apache-2.0"
] | null | null | null | from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
def validate_integer(value):
if type(value) is not int:
raise ValidationError(
_('%(value)s is not an even number'),
params={'value': value},
)
| 27 | 55 | 0.659933 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.13468 |
51c73412f6b848915731c179d918c5aa37f2bde0 | 261 | py | Python | python/destryseuler/tests/test_p1.py | destrys/euler | 7afd8fba023f29c42d11cc4725cb99e49b62b014 | [
"MIT"
] | null | null | null | python/destryseuler/tests/test_p1.py | destrys/euler | 7afd8fba023f29c42d11cc4725cb99e49b62b014 | [
"MIT"
] | 5 | 2020-03-24T15:30:22.000Z | 2021-06-01T21:51:31.000Z | python/destryseuler/tests/test_p1.py | destrys/euler | 7afd8fba023f29c42d11cc4725cb99e49b62b014 | [
"MIT"
] | null | null | null | from destryseuler import p1
def test_p1_answer():
assert p1.answer(10) == 23
def test_brute():
assert p1.natural_3and5_brute(10) == 23
def test_lambda():
assert p1.natural_3and5_lambda(10) == 23
assert p1.natural_3and5_lambda(1000) == 233168
| 21.75 | 50 | 0.716475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51c80e982e0d954d47d04ce8e0ca20615f304653 | 6,568 | py | Python | Reto1/unet_training.py | Hackaton-JusticIA-2021/pista-latente-ML-sol | 3aeeae5970539c0b17358e4ac8585b13c9cea07b | [
"MIT"
] | null | null | null | Reto1/unet_training.py | Hackaton-JusticIA-2021/pista-latente-ML-sol | 3aeeae5970539c0b17358e4ac8585b13c9cea07b | [
"MIT"
] | null | null | null | Reto1/unet_training.py | Hackaton-JusticIA-2021/pista-latente-ML-sol | 3aeeae5970539c0b17358e4ac8585b13c9cea07b | [
"MIT"
] | 1 | 2021-08-22T02:38:38.000Z | 2021-08-22T02:38:38.000Z | import numpy as np
import cv2
import os
import keras
import tensorflow as tf
import random
import matplotlib.pyplot as plt
from glob import glob
from keras import layers
from keras.backend.tensorflow_backend import set_session
from tensorflow.python.client import device_lib
input_dir_1 = "unet/images/"
target_dir_1 = ... | 37.531429 | 105 | 0.701279 | 1,704 | 0.25944 | 0 | 0 | 0 | 0 | 0 | 0 | 1,356 | 0.206456 |
51c897010d686c63214412a25e6bca01df90e345 | 343 | py | Python | wangdai/spiders/zj_sprider.py | jiaoshenmene/wangdai | 82090948602bc756048b4655b41a8a342e58a03e | [
"MIT"
] | null | null | null | wangdai/spiders/zj_sprider.py | jiaoshenmene/wangdai | 82090948602bc756048b4655b41a8a342e58a03e | [
"MIT"
] | null | null | null | wangdai/spiders/zj_sprider.py | jiaoshenmene/wangdai | 82090948602bc756048b4655b41a8a342e58a03e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
class Sprider(scrapy.Spider):
name = "zj"
start_urls = [
'https://www.wdzj.com/pingji.html'
]
def parse(self , response):
for quote in response.css('div.tb-platname'):
yield {
'name': quote.css('a::text').extract_f... | 19.055556 | 62 | 0.51312 | 303 | 0.883382 | 182 | 0.530612 | 0 | 0 | 0 | 0 | 93 | 0.271137 |
51c8fa56a66ee4effef1038af84f282d8f3c34a3 | 2,792 | py | Python | cwmud/core/help.py | whutch/cwmud | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 11 | 2016-03-03T03:56:59.000Z | 2021-11-19T15:38:51.000Z | cwmud/core/help.py | whutch/atria | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 26 | 2016-08-31T23:19:45.000Z | 2019-10-19T21:50:33.000Z | cwmud/core/help.py | whutch/atria | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 2 | 2016-01-22T21:22:34.000Z | 2016-02-09T06:03:57.000Z | # -*- coding: utf-8 -*-
"""Help information management."""
# Part of Clockwork MUD Server (https://github.com/whutch/cwmud)
# :copyright: (c) 2008 - 2017 Will Hutcheson
# :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt)
import fnmatch
import re
from .utils.bases import Manager
class HelpSourc... | 25.851852 | 75 | 0.607808 | 2,443 | 0.875 | 0 | 0 | 337 | 0.120702 | 0 | 0 | 1,060 | 0.379656 |
51c925099b64da573af34c5499717de76a3fec2e | 706 | py | Python | asterisk/forms.py | ahmednamoha/astroapp | 10ff7d2fa92ce430ce39a036c501f64429ddcec7 | [
"MIT"
] | null | null | null | asterisk/forms.py | ahmednamoha/astroapp | 10ff7d2fa92ce430ce39a036c501f64429ddcec7 | [
"MIT"
] | null | null | null | asterisk/forms.py | ahmednamoha/astroapp | 10ff7d2fa92ce430ce39a036c501f64429ddcec7 | [
"MIT"
] | null | null | null | from django.db import models
from django import forms
from django.forms import ModelForm, TextInput, FileField, NumberInput
from .models import Extentions, Queue
class ExtentionsForm(ModelForm):
class Meta:
model = Extentions
fields = ['exten', 'file']
widgets = {'exten': NumberInput(
... | 29.416667 | 84 | 0.620397 | 536 | 0.759207 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.25779 |
51c93dd8819a23b3597d92e0d07d3b2369c52da0 | 1,983 | py | Python | admin-portal/therapy/models.py | oakbani/ksdp-portal | 8f44b3cb0081a7f31b9c8121883dd51945a05520 | [
"MIT"
] | null | null | null | admin-portal/therapy/models.py | oakbani/ksdp-portal | 8f44b3cb0081a7f31b9c8121883dd51945a05520 | [
"MIT"
] | null | null | null | admin-portal/therapy/models.py | oakbani/ksdp-portal | 8f44b3cb0081a7f31b9c8121883dd51945a05520 | [
"MIT"
] | 1 | 2021-09-19T10:58:17.000Z | 2021-09-19T10:58:17.000Z | from django.db import models
from clients.models import Client
# Create your models here.
class TherapyCenter(models.Model):
title = models.CharField(max_length=30)
location = models.CharField(max_length=30)
phone_no = models.CharField(max_length=15)
def __str__(self):
return self.title
clas... | 32.508197 | 118 | 0.665154 | 1,728 | 0.871407 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.178013 |
51c9d30479808975f17a8356968ba3ffdf2e3a45 | 278 | py | Python | src/onegov/form/filters.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/filters.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/filters.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.utils import yubikey_public_id
def as_float(value):
return value and float(value) or 0.0
def strip_whitespace(value):
return value and value.strip(' \r\n') or None
def yubikey_identifier(value):
return value and yubikey_public_id(value) or ''
| 19.857143 | 51 | 0.741007 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.032374 |
51caa180627fad5f8de627d1958808284fb5c7a9 | 435 | py | Python | oa_server/time_series/urls.py | Open-Acidification/Open_Acidification_Server | 3ae668dc033e1a1478a6fc59b8b4dcec4de87564 | [
"MIT"
] | null | null | null | oa_server/time_series/urls.py | Open-Acidification/Open_Acidification_Server | 3ae668dc033e1a1478a6fc59b8b4dcec4de87564 | [
"MIT"
] | 37 | 2020-04-23T16:55:16.000Z | 2020-11-23T23:25:48.000Z | oa_server/time_series/urls.py | Open-Acidification/TankControllerManager | 3ae668dc033e1a1478a6fc59b8b4dcec4de87564 | [
"MIT"
] | 4 | 2021-09-30T21:43:52.000Z | 2022-02-23T03:26:25.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.time_series_save),
path('<int:ts_id>/', views.time_series_detail),
path('<str:ts_type>/', views.time_series_list),
path('<str:ts_type>/generate/hold/', views.time_series_generate_hold),
path('<str:ts_type>/generate/ramp... | 36.25 | 74 | 0.71954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.28046 |
51cc3d274750348efa67895ac9e88ba7ad90e3f1 | 912 | py | Python | dae_utils.py | FlorentPajot/sample-projects | dea586307c301a5aedf6ac94f7a6b3b15bde9552 | [
"MIT"
] | null | null | null | dae_utils.py | FlorentPajot/sample-projects | dea586307c301a5aedf6ac94f7a6b3b15bde9552 | [
"MIT"
] | null | null | null | dae_utils.py | FlorentPajot/sample-projects | dea586307c301a5aedf6ac94f7a6b3b15bde9552 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
class SwapNoise(BaseEstimator, TransformerMixin):
def __init__(self, ratio=.15, random_seed=123):
self.seed = random_seed
self.ratio = ratio
def fit(self):
return self
def transform(self, input... | 30.4 | 67 | 0.591009 | 835 | 0.91557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51cd281f3447f7a93f24738d9ec41e8cdfb758c9 | 18,705 | py | Python | tests/test_lime_structure.py | N2-Survey/SurveyFramework | 8295fd9808c95db85befb1f60391460908a7d2b0 | [
"MIT"
] | 1 | 2022-01-26T19:04:38.000Z | 2022-01-26T19:04:38.000Z | tests/test_lime_structure.py | N2-Survey/SurveyFramework | 8295fd9808c95db85befb1f60391460908a7d2b0 | [
"MIT"
] | 77 | 2021-09-14T09:33:03.000Z | 2022-03-31T18:02:47.000Z | tests/test_lime_structure.py | N2-Survey/SurveyFramework | 8295fd9808c95db85befb1f60391460908a7d2b0 | [
"MIT"
] | 3 | 2021-09-14T20:11:28.000Z | 2021-12-26T11:56:25.000Z | """Test functions related to parsing of LimeSurvey files"""
import unittest
from bs4 import BeautifulSoup
from n2survey.lime.structure import ( # TODO: test _get_clean_string,; TODO: test _get_question_group_name,
_parse_question,
_parse_question_description,
_parse_question_responses,
_parse_questio... | 35.696565 | 353 | 0.444534 | 18,274 | 0.974302 | 0 | 0 | 0 | 0 | 0 | 0 | 11,184 | 0.596289 |
51ceefe54c4a73ce82c7712450c6f6534c6876d4 | 3,501 | py | Python | service/handlers/my_handler.py | ran-isenberg/aws-lambda-handler-cookbook | adfe58dacd87315151265818869bb842c7eb4971 | [
"MIT"
] | 61 | 2022-02-07T05:21:14.000Z | 2022-03-27T14:11:30.000Z | service/handlers/my_handler.py | ran-isenberg/aws-lambda-handler-cookbook | adfe58dacd87315151265818869bb842c7eb4971 | [
"MIT"
] | 17 | 2022-02-26T05:25:31.000Z | 2022-03-16T20:02:46.000Z | service/handlers/my_handler.py | ran-isenberg/aws-lambda-handler-cookbook | adfe58dacd87315151265818869bb842c7eb4971 | [
"MIT"
] | 4 | 2022-02-17T16:35:27.000Z | 2022-03-07T03:13:07.000Z | from http import HTTPStatus
from typing import Any, Dict
from aws_lambda_powertools.metrics.metrics import MetricUnit
from aws_lambda_powertools.utilities.feature_flags.exceptions import ConfigurationStoreError, SchemaValidationError
from aws_lambda_powertools.utilities.parser import ValidationError, parse
from aws_la... | 51.485294 | 115 | 0.790346 | 0 | 0 | 0 | 0 | 2,430 | 0.694087 | 0 | 0 | 501 | 0.143102 |
51cf936521268672d39eaa8e60b4fea15504c4c2 | 327 | py | Python | faktura/breadcrumbs.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | null | null | null | faktura/breadcrumbs.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | 1 | 2016-02-16T10:06:34.000Z | 2016-02-16T10:06:34.000Z | faktura/breadcrumbs.py | Tethik/faktura | a2ffa7d93d9b4afbaafe02e5ae65c5e3541fd969 | [
"MIT"
] | null | null | null | class Breadcrumb:
def __init__(self, url, text):
self.url = url
self.text = text
url_dict = {
'Main Menu': '/',
'Invoices': '/invoices',
'Customers': '/customers',
'Settings': '/settings'
}
def breadcrumbs(*shortwords):
return [Breadcrumb(url_dict[word], word) for word in short... | 21.8 | 68 | 0.611621 | 100 | 0.30581 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.24159 |
51d00e635b44bc4b309c05a3baf9619e16652004 | 441 | py | Python | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_2.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-05-08T11:09:27.000Z | 2021-05-08T11:09:27.000Z | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_2.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2022-03-12T15:42:14.000Z | 2022-03-12T15:42:14.000Z | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_2.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-04-30T18:24:19.000Z | 2021-04-30T18:24:19.000Z | # Add bars for "Gold" with the label "Gold"
ax.bar(medals.index, medals["Gold"], label="Gold")
# Stack bars for "Silver" on top with label "Silver"
ax.bar(medals.index, medals["Silver"], bottom=medals["Gold"], label="Silver")
# Stack bars for "Bronze" on top of that with label "Bronze"
ax.bar(medals.index, med... | 33.923077 | 95 | 0.680272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.55102 |
51d20805035ef6654add7f645a56e481da2c4877 | 96 | py | Python | venv/lib/python3.8/site-packages/clikit/io/output_stream/__init__.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/clikit/io/output_stream/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/clikit/io/output_stream/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/64/da/97/267e8a2c0079f193f0db8c07cf48ce560bdfa25b876ba5b0c0a062bc16 | 96 | 96 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51d27d6990f67193e13df04e2f51e6f106d038fe | 2,192 | py | Python | checkmate/contrib/plugins/php/progpilot/issues_data.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | checkmate/contrib/plugins/php/progpilot/issues_data.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | checkmate/contrib/plugins/php/progpilot/issues_data.py | marcinguy/checkmate-ce | fc33c7c27bc640ab4db5dbda274a0edd3b3db218 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
issues_data = {
"xss": {
"severity": "1",
"description": "Cross-Site Scripting detected",
"categories": ["security"],
"title": "XSS"
},
"session_fixation": {
"severity": "2",
"description": "Session fixation detected",
"ca... | 25.788235 | 63 | 0.59854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,561 | 0.712135 |
51d3468a11499ea6c16dce5d6cf20348e89cbaf6 | 3,170 | py | Python | workon/contrib/tracking/models.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | workon/contrib/tracking/models.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | workon/contrib/tracking/models.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import uuid
try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError:
from django.contrib.contenttypes.generic import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugette... | 28.053097 | 79 | 0.658991 | 2,625 | 0.828076 | 0 | 0 | 0 | 0 | 0 | 0 | 735 | 0.231861 |
51d35292854e309612a05a0a9928f4f1a1103650 | 12,377 | py | Python | mister_ed/utils/checkpoints.py | jonasnm/geometric-certificates | 8730abaf2ab0c8972a2d40168d5fe64c8670fc62 | [
"MIT"
] | 40 | 2019-01-17T22:17:42.000Z | 2022-03-23T06:24:00.000Z | mister_ed/utils/checkpoints.py | Mortal12138/geometric-certificates | 8730abaf2ab0c8972a2d40168d5fe64c8670fc62 | [
"MIT"
] | 6 | 2019-08-03T08:49:21.000Z | 2022-03-11T23:43:56.000Z | mister_ed/utils/checkpoints.py | Mortal12138/geometric-certificates | 8730abaf2ab0c8972a2d40168d5fe64c8670fc62 | [
"MIT"
] | 4 | 2020-10-22T05:55:30.000Z | 2022-03-15T06:26:55.000Z | """ Code for saving/loading pytorch models and batches of adversarial images
CHECKPOINT NAMING CONVENTIONS:
<unique_experiment_name>.<architecture_abbreviation>.<6 digits of epoch number>.path
e.g.
fgsm_def.resnet32.20180301.120000.path
All checkpoints are stored in CHECKPOINT_DIR
Checkpoints are state dicts... | 38.437888 | 88 | 0.594328 | 5,087 | 0.411004 | 2,313 | 0.186879 | 0 | 0 | 0 | 0 | 4,875 | 0.393876 |
51d4ea4507d80e27f773f363a22c466284face7c | 2,219 | py | Python | extra/carbontools.py | carbon-org/carbon | 454d087f85f7fb9408eb0bc10ae702b8de844648 | [
"MIT"
] | 9 | 2021-03-20T13:09:52.000Z | 2022-03-18T07:33:40.000Z | extra/carbontools.py | ThakeeNathees/Carbon | 454d087f85f7fb9408eb0bc10ae702b8de844648 | [
"MIT"
] | 4 | 2020-08-11T07:57:00.000Z | 2020-11-30T21:05:51.000Z | extra/carbontools.py | carbon-org/carbon | 454d087f85f7fb9408eb0bc10ae702b8de844648 | [
"MIT"
] | null | null | null |
import os, sys
import shutil
CARBON_DIR = os.path.dirname(__file__)
USAGE = '''\
'''
## USAGE:
## sys.path.append('path/to/carbon/')
## import carbontools.py as cbtools
## lib = cbtools.GET_CARBON_LIB(env)
def GET_CARBON_LIB(env):
## TODO: generate "*.gen.h" files
SOURCES = []
cbenv = env.Clone();
cbenv.A... | 19.8125 | 63 | 0.611537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 744 | 0.335286 |
51d59299ccdf71aaf83a73a14cec2a4bba7c6231 | 1,394 | py | Python | tests/profiler/test_smtfprofiler_events.py | aaronmarkham/sagemaker-debugger | d271fbefb0cbe9686100850249c96a40fdc45b06 | [
"Apache-2.0"
] | null | null | null | tests/profiler/test_smtfprofiler_events.py | aaronmarkham/sagemaker-debugger | d271fbefb0cbe9686100850249c96a40fdc45b06 | [
"Apache-2.0"
] | null | null | null | tests/profiler/test_smtfprofiler_events.py | aaronmarkham/sagemaker-debugger | d271fbefb0cbe9686100850249c96a40fdc45b06 | [
"Apache-2.0"
] | null | null | null | # First Party
from smdebug.profiler import SMTFProfilerEvents
def test_smtfprofiler_events(trace_file="./tests/profiler/smtf_profiler_trace.json"):
trace_json_file = trace_file
print(f"Reading the trace file {trace_json_file}")
t_events = SMTFProfilerEvents(trace_json_file)
all_trace_events = t_event... | 42.242424 | 98 | 0.781205 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.300574 |
51d63a3e6da1e5e89a19fcaa83ea91fa806990e0 | 2,551 | py | Python | package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py | neuromusic/PartSeg | a4edff1b9fbe55eb7f5e1fc8b5b3f8e730b35caf | [
"BSD-3-Clause"
] | 15 | 2020-03-21T03:27:56.000Z | 2022-03-21T07:46:39.000Z | package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py | neuromusic/PartSeg | a4edff1b9fbe55eb7f5e1fc8b5b3f8e730b35caf | [
"BSD-3-Clause"
] | 479 | 2019-10-27T22:57:22.000Z | 2022-03-30T12:48:14.000Z | package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py | neuromusic/PartSeg | a4edff1b9fbe55eb7f5e1fc8b5b3f8e730b35caf | [
"BSD-3-Clause"
] | 5 | 2020-02-05T14:25:02.000Z | 2021-12-21T03:44:52.000Z | from typing import Type
import numpy as np
import pytest
from PartSegCore.segmentation import ROIExtractionAlgorithm
from PartSegCore.segmentation.algorithm_base import ROIExtractionResult, SegmentationLimitException
from PartSegCore.segmentation.restartable_segmentation_algorithms import final_algorithm_list as rest... | 35.430556 | 113 | 0.73971 | 0 | 0 | 0 | 0 | 1,941 | 0.760878 | 0 | 0 | 265 | 0.103881 |
51d655292e154bea97fce427b26a455cc09bac09 | 958 | py | Python | bootstrap.py | ayang818/pyweb-template | d4b8c97b9e99166a6b6d856929ef670771b90fd3 | [
"MIT"
] | null | null | null | bootstrap.py | ayang818/pyweb-template | d4b8c97b9e99166a6b6d856929ef670771b90fd3 | [
"MIT"
] | null | null | null | bootstrap.py | ayang818/pyweb-template | d4b8c97b9e99166a6b6d856929ef670771b90fd3 | [
"MIT"
] | null | null | null | # coding=utf-8
import logging
import os
from flask import Flask
from cloudware_server.route.base import register_routes
def config_logger():
"""
设置日志等级
"""
logging.getLogger().setLevel(logging.INFO)
config_logger()
def create_app(config=None):
"""
创建 bootstrap app
"""
app = Flask... | 20.382979 | 68 | 0.656576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.177778 |
51d7b2bb9f36934a7abf44cab165f9dd936da6f5 | 2,990 | py | Python | src/online/batch_job.py | jack139/fair | fe0ff64f8edbd794c3fb951ab6af420054e9e585 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T09:46:39.000Z | 2019-07-16T09:46:39.000Z | src/online/batch_job.py | jack139/fair | fe0ff64f8edbd794c3fb951ab6af420054e9e585 | [
"BSD-3-Clause"
] | null | null | null | src/online/batch_job.py | jack139/fair | fe0ff64f8edbd794c3fb951ab6af420054e9e585 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import web
from bson.objectid import ObjectId
from config import setting
import helper
db = setting.db_web
url = ('/online/batch_job')
# - 批量处理订单
class handler:
def GET(self):
if helper.logged(helper.PRIV_USER,'BATCH_JOB'):
render = helper.create_render()
#use... | 31.473684 | 95 | 0.538462 | 2,905 | 0.932285 | 0 | 0 | 0 | 0 | 0 | 0 | 1,114 | 0.35751 |
51d82a4a78317f4eced5c0075b91640e53d92d65 | 64 | py | Python | create_browser.py | bannedcoder/selenium-easy-debug | 657c7dea3df4c661198e5461abc95a5abaa9ab30 | [
"MIT"
] | null | null | null | create_browser.py | bannedcoder/selenium-easy-debug | 657c7dea3df4c661198e5461abc95a5abaa9ab30 | [
"MIT"
] | null | null | null | create_browser.py | bannedcoder/selenium-easy-debug | 657c7dea3df4c661198e5461abc95a5abaa9ab30 | [
"MIT"
] | null | null | null | from helpers.reusable_browser import *
create_driver_session()
| 16 | 38 | 0.84375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51d8ae23bd3580d3a4606d438e3b8518ad7289ac | 8,124 | py | Python | attributes/architecture/main.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | null | null | null | attributes/architecture/main.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | 1 | 2021-03-16T20:28:19.000Z | 2021-03-16T20:28:19.000Z | attributes/architecture/main.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | 1 | 2022-03-04T01:21:09.000Z | 2022-03-04T01:21:09.000Z | import os
import re
import subprocess
import json
import networkx
from pygments import lexers, token, util
TOKENTYPE_WHITELIST = [
token.Name,
token.Name.Attribute,
token.Name.Builtin,
token.Name.Builtin.Pseudo,
token.Name.Constant,
token.Name.Decorator,
token.Name.Entity,
token.Name.E... | 31.858824 | 117 | 0.616322 | 435 | 0.053545 | 0 | 0 | 0 | 0 | 0 | 0 | 2,311 | 0.284466 |
51d8b62bf25917e74c95918a73ec119b3673d41b | 1,065 | py | Python | opencv/colordetect/sendimage.py | ronhandler/gitroot | beb81c4b826939f16e57a98ac5845d8acecf151d | [
"Unlicense"
] | null | null | null | opencv/colordetect/sendimage.py | ronhandler/gitroot | beb81c4b826939f16e57a98ac5845d8acecf151d | [
"Unlicense"
] | null | null | null | opencv/colordetect/sendimage.py | ronhandler/gitroot | beb81c4b826939f16e57a98ac5845d8acecf151d | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
import cv2
import numpy as np
import boto
from boto.s3.key import Key
cap = cv2.VideoCapture(0)
ret, new_image = cap.read()
if ret == False:
exit(1)
filename = 'new.jpg'
cv2.imwrite(filename, new_image)
bucket_name = 'ronhandler'
AWS_ACCESS_KEY_ID = 'AKIAIYLDR3LU2X... | 25.97561 | 81 | 0.723005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.398122 |
51dc8e18a95d43bdff9738868787ec57f30ae57c | 2,569 | py | Python | tests/unit/dataactvalidator/test_fabs39_detached_award_financial_assistance_2.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | 1 | 2018-10-29T12:54:44.000Z | 2018-10-29T12:54:44.000Z | tests/unit/dataactvalidator/test_fabs39_detached_award_financial_assistance_2.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_fabs39_detached_award_financial_assistance_2.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | from tests.unit.dataactcore.factories.staging import DetachedAwardFinancialAssistanceFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'fabs39_detached_award_financial_assistance_2'
def test_column_headers(database):
expected_subset = {"row_number", "place_of_performan... | 59.744186 | 112 | 0.671467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 518 | 0.201635 |
51dded95316bf909a713965fa3b3d3c363309051 | 2,782 | py | Python | hipp/utils/utils.py | cmcneil-usgs/hipp | be6f9f8cccdc32b7b96be92172977a5c4006500c | [
"MIT"
] | 12 | 2020-10-07T22:12:11.000Z | 2022-02-15T23:10:53.000Z | hipp/utils/utils.py | cmcneil-usgs/hipp | be6f9f8cccdc32b7b96be92172977a5c4006500c | [
"MIT"
] | 7 | 2020-10-11T23:42:55.000Z | 2021-12-15T23:16:43.000Z | hipp/utils/utils.py | cmcneil-usgs/hipp | be6f9f8cccdc32b7b96be92172977a5c4006500c | [
"MIT"
] | 4 | 2020-10-11T19:48:58.000Z | 2022-03-08T21:32:13.000Z | import glob
import os
import cv2
import hipp.io
import hipp.utils
"""
Library for command line tools.
"""
def optimize_geotif(geotif_file_name,
output_file_name=None,
verbose=False,
print_call=False):
if output_file_name is None:
... | 29.284211 | 83 | 0.515097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 375 | 0.134795 |
51de4c03101e87908bf9ddadb35262f495914dc2 | 1,070 | py | Python | tests/test_explainers/test_core.py | openitnovem/readml | ce5323ff18a1796aef3a81590bb480cdcdcef0b9 | [
"Apache-2.0"
] | null | null | null | tests/test_explainers/test_core.py | openitnovem/readml | ce5323ff18a1796aef3a81590bb480cdcdcef0b9 | [
"Apache-2.0"
] | 12 | 2022-01-19T13:02:58.000Z | 2022-03-31T15:17:23.000Z | tests/test_explainers/test_core.py | openitnovem/readml | ce5323ff18a1796aef3a81590bb480cdcdcef0b9 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:37:50.000Z | 2022-03-18T19:48:58.000Z | import os
import pandas as pd
from fbd_interpreter.explainers.ml.explain_ml import ExplainML
from fbd_interpreter.logger import ROOT_DIR
FEATURES = ["a", "b"]
PREDICTIONS = [0, 0, 0, 0, 1, 1, 1, 1]
TARGETS = pd.Series([0, 0, 0, 0, 1, 1, 1, 1])
DATA = pd.DataFrame(
{"a": [0, 1, 2, 3, 4, 5, 6, 7], "b": [1, 1, 1, 1... | 24.318182 | 85 | 0.613084 | 329 | 0.307477 | 0 | 0 | 0 | 0 | 0 | 0 | 521 | 0.486916 |
51e08e485ba5b37c52a2c10b26fc9af31001557a | 5,836 | py | Python | tests/test_preprocessing/test_encoding.py | ig248/timeserio | afc2a953a83e763418d417059493ef13a17d349c | [
"MIT"
] | 63 | 2019-07-12T17:16:27.000Z | 2022-02-22T11:06:50.000Z | tests/test_preprocessing/test_encoding.py | ig248/timeserio | afc2a953a83e763418d417059493ef13a17d349c | [
"MIT"
] | 34 | 2019-07-30T11:52:09.000Z | 2022-03-28T12:42:02.000Z | tests/test_preprocessing/test_encoding.py | ig248/timeserio | afc2a953a83e763418d417059493ef13a17d349c | [
"MIT"
] | 12 | 2019-08-14T05:51:22.000Z | 2021-03-15T09:34:15.000Z | import numpy as np
import numpy.testing as npt
import pytest
from sklearn.preprocessing import OneHotEncoder
from timeserio.preprocessing import (
FeatureIndexEncoder, StatelessOneHotEncoder,
StatelessTemporalOneHotEncoder, StatelessPeriodicEncoder
)
from timeserio.preprocessing.encoding import PeriodicEncoder... | 32.422222 | 76 | 0.600583 | 5,500 | 0.942426 | 0 | 0 | 4,253 | 0.728753 | 0 | 0 | 264 | 0.045236 |
51e1a411ad9558e7543b3930124feeca7cd75ff5 | 11,654 | py | Python | paper_examples/ex51_validation2D/main.py | jhabriel/mixdim-estimates | aa7041fe3fc7a13b820ef41dacefb759f4b592ff | [
"MIT"
] | 3 | 2022-02-15T14:56:16.000Z | 2022-03-24T10:20:00.000Z | paper_examples/ex51_validation2D/main.py | jhabriel/mixdim-estimates | aa7041fe3fc7a13b820ef41dacefb759f4b592ff | [
"MIT"
] | 3 | 2021-06-15T16:23:46.000Z | 2021-12-05T10:25:41.000Z | paper_examples/ex51_validation2D/main.py | jhabriel/mixdim-estimates | aa7041fe3fc7a13b820ef41dacefb759f4b592ff | [
"MIT"
] | null | null | null | # Importing modules
import numpy as np
import porepy as pp
import itertools
from time import time
from model import model
#%% Functions
def make_constrained_mesh(h=0.1):
"""
Creates unstructured mesh for a given target mesh size for the case of a
single vertical fracture embedded in the domain
Parame... | 32.282548 | 87 | 0.643041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,301 | 0.369058 |
51e203fe102c1df6470ac30a413c9d445b9bab48 | 1,850 | py | Python | sa/profiles/Alcatel/AOS/get_portchannel.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/Alcatel/AOS/get_portchannel.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/Alcatel/AOS/get_portchannel.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Alcatel.AOS.get_portchannel
# ----------------------------------------------------------------------
# Copyright (C) 2007-2016 The NOC Project
# See LICENSE for details
# --------------------------------------------------... | 37.755102 | 86 | 0.452973 | 1,389 | 0.750811 | 0 | 0 | 0 | 0 | 0 | 0 | 674 | 0.364324 |
51e23600088ad593a6f5956c2914181ca7e20049 | 3,398 | py | Python | mysite/finance/migrations/0001_initial.py | brzx/djfinance | 958768e3e665a23dad7118741a9c9fcf769574df | [
"BSD-2-Clause"
] | null | null | null | mysite/finance/migrations/0001_initial.py | brzx/djfinance | 958768e3e665a23dad7118741a9c9fcf769574df | [
"BSD-2-Clause"
] | null | null | null | mysite/finance/migrations/0001_initial.py | brzx/djfinance | 958768e3e665a23dad7118741a9c9fcf769574df | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 2.1.3 on 2019-04-11 09:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('djfauth', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='A... | 45.918919 | 115 | 0.587699 | 3,284 | 0.96305 | 0 | 0 | 0 | 0 | 0 | 0 | 592 | 0.173607 |
51e5e2f9e6590f0c3de91a80f943ddc82d5c24e6 | 226 | py | Python | libpaas/camp/planparser.py | hvishwanath/libpaas | 3df07adca59c003ee754c4e919cf506c13953be1 | [
"MIT"
] | null | null | null | libpaas/camp/planparser.py | hvishwanath/libpaas | 3df07adca59c003ee754c4e919cf506c13953be1 | [
"MIT"
] | null | null | null | libpaas/camp/planparser.py | hvishwanath/libpaas | 3df07adca59c003ee754c4e919cf506c13953be1 | [
"MIT"
] | null | null | null | __author__ = 'hvishwanath'
import yaml
from models import *
class PlanParser(object):
@classmethod
def parse(cls, planfile):
y = yaml.safe_load(file(planfile))
return CAMPPlan.create_from_dict(y)
| 15.066667 | 43 | 0.685841 | 160 | 0.707965 | 0 | 0 | 129 | 0.570796 | 0 | 0 | 13 | 0.057522 |
51e7204783742c4d06205cf3ac4d3a46079650b3 | 22,987 | py | Python | slottools/PhotometryConfigWidget.py | apodemus/pysalt3 | 97bb790ad7bcf1137e3ffd2a7b32840ae7167358 | [
"BSD-3-Clause"
] | null | null | null | slottools/PhotometryConfigWidget.py | apodemus/pysalt3 | 97bb790ad7bcf1137e3ffd2a7b32840ae7167358 | [
"BSD-3-Clause"
] | null | null | null | slottools/PhotometryConfigWidget.py | apodemus/pysalt3 | 97bb790ad7bcf1137e3ffd2a7b32840ae7167358 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T19:43:59.000Z | 2021-07-15T19:43:59.000Z | ################################# LICENSE ##################################
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. #
# #
# Redistribu... | 39.428816 | 131 | 0.525253 | 19,983 | 0.869317 | 0 | 0 | 0 | 0 | 0 | 0 | 8,652 | 0.376387 |
51e720cfeb8235927a5ad18a3477edc29e509a46 | 1,895 | py | Python | Linked Lists/add_two_numbers.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | null | null | null | Linked Lists/add_two_numbers.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | null | null | null | Linked Lists/add_two_numbers.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | 1 | 2021-12-05T12:27:46.000Z | 2021-12-05T12:27:46.000Z | """
Add Two Numbers: Leetcode 2
You are given two non-empty linked lists representing two non-negative integers.
The digits are stored in reverse order, and each of their nodes contains a single digit.
Add the two numbers and return the sum as a linked list.
You may assume the two numbers do not contain any leading ... | 25.958904 | 91 | 0.543008 | 1,375 | 0.725594 | 0 | 0 | 0 | 0 | 0 | 0 | 1,034 | 0.545646 |
51e80509e8407b12965b7a40a0711a4c2dc1fa8b | 243 | py | Python | module1-introduction-to-sql/buddymove_create.py | alexmjn/DS-Unit-3-Sprint-2-SQL-and-Databases | 89d66757d25b7d07090bfb6280a78b897f87fc69 | [
"MIT"
] | 1 | 2020-02-17T17:02:43.000Z | 2020-02-17T17:02:43.000Z | module1-introduction-to-sql/buddymove_create.py | alexmjn/DS-Unit-3-Sprint-2-SQL-and-Databases | 89d66757d25b7d07090bfb6280a78b897f87fc69 | [
"MIT"
] | null | null | null | module1-introduction-to-sql/buddymove_create.py | alexmjn/DS-Unit-3-Sprint-2-SQL-and-Databases | 89d66757d25b7d07090bfb6280a78b897f87fc69 | [
"MIT"
] | null | null | null | import pandas as pd
import sqlite3
df = pd.read_csv("buddymove_holidayiq.csv")
connection = sqlite3.connect("buddymove_holidayiq.sqlite3")
df.to_sql("review", connection)
print(connection.execute("SELECT * FROM review LIMIT 10").fetchall())
| 27 | 69 | 0.781893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.382716 |
51e82124f47a81e7a21c3ded6ba32d9e42bbdaa0 | 6,539 | py | Python | darts_socket/darts_server/display.py | y-azuma/opencv-softdarts | 644778be219fb96cdde32b884157899d39fc14e5 | [
"MIT"
] | 9 | 2019-05-01T18:42:47.000Z | 2021-09-05T09:49:44.000Z | darts_socket/darts_server/display.py | y-azuma/opencv-softdarts | 644778be219fb96cdde32b884157899d39fc14e5 | [
"MIT"
] | null | null | null | darts_socket/darts_server/display.py | y-azuma/opencv-softdarts | 644778be219fb96cdde32b884157899d39fc14e5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tkinter as tk
import sound
import socket
import threading
class ConnClient():
'''
ソケット通信によりラズベリーパイから画像情報を受け取る。
'''
def __init__(self,conn, addr):
self.conn_socket = conn
self.addr = addr
self.recvdata = 0
self.recvdata1 = 0
self.re... | 21.093548 | 76 | 0.570577 | 708 | 0.106131 | 0 | 0 | 0 | 0 | 0 | 0 | 671 | 0.100585 |
51e93219bcf0932e974ca77a974c31a6703b7426 | 159 | py | Python | api/app/api/mutations/types/TokenData.py | VidroX/recommdo | fe518158b1a63225816054fb129f680e1d0c7d9c | [
"MIT"
] | null | null | null | api/app/api/mutations/types/TokenData.py | VidroX/recommdo | fe518158b1a63225816054fb129f680e1d0c7d9c | [
"MIT"
] | null | null | null | api/app/api/mutations/types/TokenData.py | VidroX/recommdo | fe518158b1a63225816054fb129f680e1d0c7d9c | [
"MIT"
] | null | null | null | import graphene
class TokenData(graphene.ObjectType):
access_token = graphene.String(required=False)
refresh_token = graphene.String(required=False)
| 22.714286 | 51 | 0.786164 | 140 | 0.880503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51eaff77f11bb6623d586c575371ad21566bce38 | 857 | py | Python | prosperpy/overlays/bollinger_bands.py | CaptainBriot/prosperpy | 831abb9c9e3b730c81895647e33a59854c4e4648 | [
"MIT"
] | 2 | 2018-01-28T06:11:37.000Z | 2018-02-04T16:01:30.000Z | prosperpy/overlays/bollinger_bands.py | CaptainBriot/prosperpy | 831abb9c9e3b730c81895647e33a59854c4e4648 | [
"MIT"
] | 1 | 2018-03-20T12:10:40.000Z | 2018-03-21T00:08:04.000Z | prosperpy/overlays/bollinger_bands.py | CaptainBriot/prosperpy | 831abb9c9e3b730c81895647e33a59854c4e4648 | [
"MIT"
] | 2 | 2019-04-06T14:33:26.000Z | 2020-06-25T23:34:32.000Z | from . import moving_average
from .. import indicators
class BollingerBands:
def __init__(self, values, multiplier=2, moving_average_class=moving_average.SimpleMovingAverage):
self.moving_average_class = moving_average_class
self.multiplier = multiplier
self.moving_average = self.moving_av... | 31.740741 | 102 | 0.72112 | 799 | 0.932322 | 0 | 0 | 319 | 0.372229 | 0 | 0 | 0 | 0 |
51eb7396a14c0a9adcd7a3d4b7b068d93d1985e2 | 2,566 | py | Python | neutron/tests/unit/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Red Hat
# 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 a... | 37.735294 | 79 | 0.684334 | 1,626 | 0.633671 | 0 | 0 | 0 | 0 | 0 | 0 | 744 | 0.289945 |
51ec05cacfb6953f807cc60da921092f7aeb6965 | 873 | py | Python | app/schema/queries/todo.py | rjNemo/graphql_python_template | 14bc5fd657f6bdba8d7293f21cfcec821fa6374f | [
"MIT"
] | 1 | 2021-05-02T01:47:57.000Z | 2021-05-02T01:47:57.000Z | app/schema/queries/todo.py | rjNemo/graphql_python_template | 14bc5fd657f6bdba8d7293f21cfcec821fa6374f | [
"MIT"
] | null | null | null | app/schema/queries/todo.py | rjNemo/graphql_python_template | 14bc5fd657f6bdba8d7293f21cfcec821fa6374f | [
"MIT"
] | null | null | null | """
Defines the query and how to interact with
"""
from app.schema.types.todo import TodoListResponseField, TodoResponseField
from app.usecases.todo import read_all_todos, read_todo_by_id
def resolve_list_todos(self, info) -> TodoListResponseField:
try:
todos = read_all_todos()
is_success = True
... | 28.16129 | 78 | 0.717068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.091638 |
51edfd8aa7141c159d7380cdc94b6b92242facba | 469 | py | Python | models/EntryRating.py | felix19350/Nature-Trails | 11b91643e38139ec8c15674289fa67dc0fe65ac4 | [
"Unlicense"
] | null | null | null | models/EntryRating.py | felix19350/Nature-Trails | 11b91643e38139ec8c15674289fa67dc0fe65ac4 | [
"Unlicense"
] | null | null | null | models/EntryRating.py | felix19350/Nature-Trails | 11b91643e38139ec8c15674289fa67dc0fe65ac4 | [
"Unlicense"
] | null | null | null | from google.appengine.ext import db
from models.Trail import Trail
class EntryRating(db.Model):
'''
Stores the ratings users give to locations
Parameters:
entry_key
user_id
rating
'''
trail = db.ReferenceProperty(Trail)
user = db.UserProperty(required = True)
rating ... | 26.055556 | 78 | 0.635394 | 392 | 0.835821 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.289979 |
51ef4f3354164b3ce73be7d1b2f9128704be0733 | 8,884 | py | Python | meiduo_mall/apps/orders/views.py | canarysama/meiduo_project | 906cf667e27fa205b18aeb10b009d76dec19b211 | [
"MIT"
] | null | null | null | meiduo_mall/apps/orders/views.py | canarysama/meiduo_project | 906cf667e27fa205b18aeb10b009d76dec19b211 | [
"MIT"
] | null | null | null | meiduo_mall/apps/orders/views.py | canarysama/meiduo_project | 906cf667e27fa205b18aeb10b009d76dec19b211 | [
"MIT"
] | null | null | null | import json
from datetime import datetime
from decimal import Decimal
from django import http
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
# Create your views here.
from django.views import View
from django_redis import get_redis_connection
from apps.goods.models imp... | 31.842294 | 124 | 0.533431 | 8,628 | 0.942951 | 0 | 0 | 0 | 0 | 0 | 0 | 1,954 | 0.213552 |
51f094af4d80238e40eb72e75e31a6ae810f3f62 | 11,159 | py | Python | pie/tray_icon.py | sabaatworld/pie-indexing-service-py | f48ee18023f9c15e18fdb4296ba651fd343aef01 | [
"MIT"
] | 2 | 2020-03-30T18:00:40.000Z | 2020-05-30T17:09:04.000Z | pie/tray_icon.py | sabaatworld/pie-indexing-service-py | f48ee18023f9c15e18fdb4296ba651fd343aef01 | [
"MIT"
] | null | null | null | pie/tray_icon.py | sabaatworld/pie-indexing-service-py | f48ee18023f9c15e18fdb4296ba651fd343aef01 | [
"MIT"
] | null | null | null | import json
import logging
import os
import ssl
import webbrowser
from multiprocessing import Event, Queue
from urllib.request import urlopen
import certifi
from PySide2 import QtCore, QtGui, QtWidgets
from packaging import version
from pie.core import IndexDB, IndexingHelper, MediaProcessor
from pie.domain import In... | 46.690377 | 201 | 0.692087 | 10,685 | 0.957523 | 0 | 0 | 0 | 0 | 0 | 0 | 1,333 | 0.119455 |
51f26ee900478e90c670143eacc36e4d621147c8 | 392 | py | Python | app/api/views/reports/brief.py | ArenaNetworks/dto-digitalmarketplace-api | d0d58924719d889503ed112b0d5801b528b0398c | [
"MIT"
] | 6 | 2017-06-09T03:38:53.000Z | 2021-12-22T02:42:15.000Z | app/api/views/reports/brief.py | ArenaNetworks/dto-digitalmarketplace-api | d0d58924719d889503ed112b0d5801b528b0398c | [
"MIT"
] | 47 | 2016-08-02T05:21:31.000Z | 2022-03-28T01:14:17.000Z | app/api/views/reports/brief.py | AusDTO/dto-digitalmarketplace-api | 937843c9c01a71518cf4688b4daa55bbe7df1965 | [
"MIT"
] | 7 | 2016-09-13T13:07:18.000Z | 2021-02-17T10:16:21.000Z | from flask import jsonify
from app.api import api
from app.api.helpers import require_api_key_auth
from app.api.services.reports import briefs_service
@api.route('/reports/brief/published', methods=['GET'])
@require_api_key_auth
def get_published_briefs():
result = briefs_service.get_published_briefs()
return... | 26.133333 | 55 | 0.737245 | 0 | 0 | 0 | 0 | 238 | 0.607143 | 0 | 0 | 45 | 0.114796 |
51f40f22276db646a119642572727553613d35f0 | 8,903 | py | Python | vis_utils/graphics/geometry/procedural_primitives.py | eherr/vis_utils | b757b01f42e6da02ad62130c3b0e61e9eaa3886f | [
"MIT"
] | 4 | 2020-05-20T03:55:19.000Z | 2020-12-24T06:33:40.000Z | vis_utils/graphics/geometry/procedural_primitives.py | eherr/vis_utils | b757b01f42e6da02ad62130c3b0e61e9eaa3886f | [
"MIT"
] | 1 | 2020-05-18T11:21:35.000Z | 2020-07-07T21:25:57.000Z | vis_utils/graphics/geometry/procedural_primitives.py | eherr/vis_utils | b757b01f42e6da02ad62130c3b0e61e9eaa3886f | [
"MIT"
] | 1 | 2020-07-20T06:57:13.000Z | 2020-07-20T06:57:13.000Z | #!/usr/bin/env python
#
# Copyright 2019 DFKI GmbH.
#
# 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, merg... | 35.75502 | 116 | 0.550826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,657 | 0.186117 |
51f4f2785dcaeca906879c7e62e621e4a846114b | 9,212 | py | Python | src/tokentype.py | londav28/chasm | a5cd97ab2732af30d20aaf05842f3ddad7618660 | [
"MIT"
] | null | null | null | src/tokentype.py | londav28/chasm | a5cd97ab2732af30d20aaf05842f3ddad7618660 | [
"MIT"
] | null | null | null | src/tokentype.py | londav28/chasm | a5cd97ab2732af30d20aaf05842f3ddad7618660 | [
"MIT"
] | null | null | null | # MIT LICENSE Copyright (c) 2018 David Longnecker
# 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, ... | 21.98568 | 78 | 0.65469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,589 | 0.281046 |
51f6b55bf08cd3caaf58fe60b17883de8d75c7aa | 1,803 | py | Python | src/cr/sparse/_src/lop/reshape.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 42 | 2021-06-11T17:11:29.000Z | 2022-03-29T11:51:44.000Z | src/cr/sparse/_src/lop/reshape.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 19 | 2021-06-04T11:36:11.000Z | 2022-01-22T20:13:39.000Z | src/cr/sparse/_src/lop/reshape.py | carnot-shailesh/cr-sparse | 989ebead8a8ac37ade643093e1caa31ae2a3eda1 | [
"Apache-2.0"
] | 5 | 2021-11-21T21:01:11.000Z | 2022-02-28T07:20:03.000Z | # Copyright 2021 CR.Sparse Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 32.781818 | 86 | 0.702718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,102 | 0.611204 |
51f6ed71939071c909f6f821aec31a10daf6299c | 637 | py | Python | innuy_lambda/settings/dev.py | innuy/innuy_lambda | 739d2573919513f08925fe63cad6e301b69323f9 | [
"MIT"
] | null | null | null | innuy_lambda/settings/dev.py | innuy/innuy_lambda | 739d2573919513f08925fe63cad6e301b69323f9 | [
"MIT"
] | 1 | 2020-06-05T18:21:24.000Z | 2020-06-05T18:21:24.000Z | innuy_lambda/settings/dev.py | innuy/innuy_lambda | 739d2573919513f08925fe63cad6e301b69323f9 | [
"MIT"
] | null | null | null | from .base import *
INSTALLED_APPS += [
'debug_toolbar',
'zappa_django_utils',
'storages',
]
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INTERNAL_IPS = [
'127.0.0.1',
]
DATABASES = {
'default': {
'ENGINE': 'zappa_django_utils.db.backends.s3sqlite',
'... | 18.735294 | 70 | 0.6719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.467818 |
51f7369f83b845973e9526f6db9b7f120362742a | 3,658 | py | Python | UNET.py | ArtemBoyarintsev/cell_segmentation | 9c0e70c1edbb20d661e392bab4c42002d13ebf06 | [
"MIT"
] | null | null | null | UNET.py | ArtemBoyarintsev/cell_segmentation | 9c0e70c1edbb20d661e392bab4c42002d13ebf06 | [
"MIT"
] | null | null | null | UNET.py | ArtemBoyarintsev/cell_segmentation | 9c0e70c1edbb20d661e392bab4c42002d13ebf06 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision
class UNET(nn.Module):
THIRD_POOLING_INDEX = 16
FORTH_POOLING_INDEX = 23
def __init__(self, n_class = 1):
super(UNET, self).__init__()
# Contracting Path
self.c1 = UNET.get_conv2d_block(3, 16, 3, 1)
self.p1 = nn.... | 31.264957 | 96 | 0.5462 | 3,603 | 0.984964 | 0 | 0 | 892 | 0.243849 | 0 | 0 | 270 | 0.073811 |
51f8bea04c27110192da44644da602e9cd13a9c7 | 4,538 | py | Python | order_center/api.py | YuaShizuki/order_center | 6f0a8831b7cef82cee5b2f6268822acbee9077c4 | [
"MIT"
] | null | null | null | order_center/api.py | YuaShizuki/order_center | 6f0a8831b7cef82cee5b2f6268822acbee9077c4 | [
"MIT"
] | null | null | null | order_center/api.py | YuaShizuki/order_center | 6f0a8831b7cef82cee5b2f6268822acbee9077c4 | [
"MIT"
] | null | null | null | import frappe
import os
import json
import datetime
import uuid
@frappe.whitelist(allow_guest=True)
def clustering_and_scheduling():
for trip in json.loads(frappe.local.request.values["inputData"]):
build_trip(trip)
def build_trip(dat):
d = frappe.get_doc({
"doctype":"DRS",
"trip_name"... | 34.907692 | 473 | 0.653812 | 0 | 0 | 0 | 0 | 2,432 | 0.535919 | 0 | 0 | 1,594 | 0.351256 |
51f93647e99d693a4f01deefb081bc1f04d2c371 | 1,365 | py | Python | logic_bank/exec_trans_logic/row_sets.py | valhuber/LogicBank | 0df8790395fe260778e910badcc15fba49c23e96 | [
"BSD-3-Clause"
] | 39 | 2020-10-14T02:23:59.000Z | 2022-02-11T14:08:46.000Z | logic_bank/exec_trans_logic/row_sets.py | valhuber/LogicBank | 0df8790395fe260778e910badcc15fba49c23e96 | [
"BSD-3-Clause"
] | 7 | 2020-10-14T23:59:49.000Z | 2022-03-16T16:25:43.000Z | logic_bank/exec_trans_logic/row_sets.py | valhuber/Logic-Bank | 3f31b47786ce3fae53fd96af8795cd693e20547b | [
"BSD-3-Clause"
] | 7 | 2020-10-17T02:59:51.000Z | 2022-03-26T08:56:46.000Z | from __future__ import annotations
from typing import List, TypeVar, Dict
from sqlalchemy.engine import base
from sqlalchemy.ext.declarative import declarative_base
from logic_bank.exec_row_logic.logic_row import LogicRow
class RowSets():
"""
Sets of rows used in transaction
* processed_rows: Dict o... | 31.744186 | 109 | 0.688645 | 1,137 | 0.832967 | 0 | 0 | 0 | 0 | 0 | 0 | 512 | 0.375092 |
51f968ed80d1979d901e48aea3098c1013002f25 | 1,836 | py | Python | monkeytools/array_methods.py | mr-devs/monkeytools | e56197befcc0a14d9d082eb4463ebe27fb967116 | [
"MIT"
] | null | null | null | monkeytools/array_methods.py | mr-devs/monkeytools | e56197befcc0a14d9d082eb4463ebe27fb967116 | [
"MIT"
] | null | null | null | monkeytools/array_methods.py | mr-devs/monkeytools | e56197befcc0a14d9d082eb4463ebe27fb967116 | [
"MIT"
] | null | null | null | """
A collection of array-based algorithms
1. Find maximum sub-array
- https://en.wikipedia.org/wiki/Maximum_subarray_problem
Author: Matthew R. DeVerna
"""
from .utils import check_array
def max_subarray_kadane(given_array):
"""
Find a contiguous subarray with the largest sum.
Note: This algorithm i... | 27.818182 | 83 | 0.622004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,246 | 0.678649 |
51fa66f7327624b0362e31f656c33d867492f9a3 | 2,922 | py | Python | Library/ContractUtils.py | rccannizzaro/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 11 | 2021-12-02T15:41:47.000Z | 2022-03-14T03:49:22.000Z | Library/ContractUtils.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | null | null | null | Library/ContractUtils.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 5 | 2022-02-02T12:07:51.000Z | 2022-02-13T02:24:19.000Z | ########################################################################################
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with... | 48.7 | 132 | 0.558522 | 1,741 | 0.595825 | 0 | 0 | 0 | 0 | 0 | 0 | 1,723 | 0.589665 |
51fad0b66c4e3fa317158550a35e046091d71c7e | 24,945 | py | Python | backtester/backtester.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 91 | 2020-01-31T10:15:35.000Z | 2022-03-27T19:15:12.000Z | backtester/backtester.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 38 | 2019-05-12T02:00:46.000Z | 2019-12-06T14:54:25.000Z | backtester/backtester.py | unbalancedparentheses/backtester_options | 46efd30e405f360c560f8eae8b2ee7d26f4532db | [
"MIT"
] | 20 | 2020-06-12T08:21:30.000Z | 2022-03-28T05:52:59.000Z | from functools import reduce
import numpy as np
import pandas as pd
import pyprind
from .enums import *
class Backtest:
"""Backtest runner class."""
def __init__(self, allocation, initial_capital=1_000_000, shares_per_contract=100):
assets = ('stocks', 'options', 'cash')
total_allocation = s... | 47.066038 | 119 | 0.621768 | 24,838 | 0.995631 | 0 | 0 | 890 | 0.035676 | 0 | 0 | 7,281 | 0.291859 |
51fb7539b1f2f6afaf1c56b1fdd1c2bde6b3883c | 7,948 | py | Python | kicktipper/predictor.py | Kricki/kicktipper | fae146c8df0d9ba9bebe84c1f20cf8df6fc39678 | [
"ISC"
] | 1 | 2016-11-23T16:09:46.000Z | 2016-11-23T16:09:46.000Z | kicktipper/predictor.py | Kricki/kicktipper | fae146c8df0d9ba9bebe84c1f20cf8df6fc39678 | [
"ISC"
] | 1 | 2017-04-21T08:38:39.000Z | 2018-07-19T20:46:10.000Z | kicktipper/predictor.py | Kricki/kicktipper | fae146c8df0d9ba9bebe84c1f20cf8df6fc39678 | [
"ISC"
] | null | null | null | import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
class MatchPredictor:
""" Class to calculates the probabilities for different scores (outcomes) of two teams.
Attributes
----------
l1 : float
Projected score for team 1 (expectation value for Poisson distribution)
... | 37.847619 | 120 | 0.6116 | 7,870 | 0.990186 | 0 | 0 | 1,748 | 0.21993 | 0 | 0 | 4,482 | 0.563915 |
51fbfcfac2b93e98239de7ce36bcc1077cb951a1 | 7,012 | py | Python | app.py | ai4r/SGToolkit | 684df2cfc830eeb8ea23c95a8af1c9199991ec99 | [
"MIT"
] | 16 | 2021-08-11T08:55:41.000Z | 2022-02-11T02:45:55.000Z | app.py | ai4r/SGToolkit | 684df2cfc830eeb8ea23c95a8af1c9199991ec99 | [
"MIT"
] | 9 | 2021-09-07T14:52:59.000Z | 2022-03-24T13:33:00.000Z | app.py | ai4r/SGToolkit | 684df2cfc830eeb8ea23c95a8af1c9199991ec99 | [
"MIT"
] | 2 | 2021-08-25T06:00:43.000Z | 2021-10-07T00:57:49.000Z | from flask import Flask, render_template, request, send_file
from flask_pymongo import PyMongo
import json
import sg_core_api as sgapi
import os
import pathlib
import numpy as np
from bson.json_util import dumps
from bson.objectid import ObjectId
from datetime import datetime
from scipy.interpolate import CubicSpline
... | 33.075472 | 118 | 0.61138 | 0 | 0 | 0 | 0 | 6,372 | 0.908728 | 0 | 0 | 1,262 | 0.179977 |
51fd76c197f06b4f0e3cd25b7c5c3a572cdfb52f | 6,662 | py | Python | azure-devops/azext_devops/dev/common/credential_store.py | keithlemon/azure-devops-cli-extension | 4989e5f53650f186e638ccc186605986c76d59bf | [
"MIT"
] | 326 | 2019-04-10T12:38:23.000Z | 2022-03-31T23:07:49.000Z | azure-devops/azext_devops/dev/common/credential_store.py | keithlemon/azure-devops-cli-extension | 4989e5f53650f186e638ccc186605986c76d59bf | [
"MIT"
] | 562 | 2019-04-10T07:36:12.000Z | 2022-03-28T07:37:54.000Z | azure-devops/azext_devops/dev/common/credential_store.py | keithlemon/azure-devops-cli-extension | 4989e5f53650f186e638ccc186605986c76d59bf | [
"MIT"
] | 166 | 2019-04-10T07:59:40.000Z | 2022-03-16T14:17:13.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 41.123457 | 110 | 0.613029 | 6,061 | 0.909787 | 0 | 0 | 1,138 | 0.17082 | 0 | 0 | 1,535 | 0.230411 |
51fd8b0ddb6e11c4e62343fed936c2c868f66e49 | 1,969 | py | Python | fhir/resources/STU3/tests/test_adverseevent.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 144 | 2019-05-08T14:24:43.000Z | 2022-03-30T02:37:11.000Z | fhir/resources/STU3/tests/test_adverseevent.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 82 | 2019-05-13T17:43:13.000Z | 2022-03-30T16:45:17.000Z | fhir/resources/STU3/tests/test_adverseevent.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 48 | 2019-04-04T14:14:53.000Z | 2022-03-30T06:07:31.000Z | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/AdverseEvent
Release: STU3
Version: 3.0.2
Revision: 11917
Last updated: 2019-10-24T11:53:00+11:00
"""
from pydantic.validators import bytes_validator # noqa: F401
from .. import fhirtypes # noqa: F401
from .. import adverseevent
def impl_... | 35.8 | 80 | 0.702895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 782 | 0.397156 |
51fdc866742d67c3e351348526ab6d8be86c0161 | 473 | py | Python | pins/pins.py | evarga/composite-decomposition | 07de8a21d1d1974a8a3b1346be1d5ee0d7764fa5 | [
"MIT"
] | null | null | null | pins/pins.py | evarga/composite-decomposition | 07de8a21d1d1974a8a3b1346be1d5ee0d7764fa5 | [
"MIT"
] | null | null | null | pins/pins.py | evarga/composite-decomposition | 07de8a21d1d1974a8a3b1346be1d5ee0d7764fa5 | [
"MIT"
] | null | null | null | from math import sqrt
def num_pins_full_row(n: int, k: int) -> int:
return (n // k + 1) * k + n % k + (n % k > 0) if n > 0 else 0
def num_pins_square(n: int, k: int) -> int:
m = int(sqrt(n))
used_pins = (m + 1)**2
n -= m * m
if 0 < n <= m:
used_pins += n + 1
elif n > m:
used_... | 23.65 | 65 | 0.541226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51febf22b0facd552d35748a11b39de2fc7adf8c | 265 | py | Python | poezio/ui/consts.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 50 | 2015-02-11T12:00:25.000Z | 2022-01-18T05:26:40.000Z | poezio/ui/consts.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 3 | 2017-11-27T20:55:42.000Z | 2020-03-20T18:05:53.000Z | poezio/ui/consts.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 15 | 2015-04-22T14:33:36.000Z | 2021-09-29T21:33:50.000Z | from datetime import datetime
FORMAT_CHAR = '\x19'
# These are non-printable chars, so they should never appear in the input,
# I guess. But maybe we can find better chars that are even less risky.
FORMAT_CHARS = '\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x1A'
| 37.857143 | 74 | 0.754717 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.758491 |
51ffbfd3d872b709f2360f5964f2dd0857b13249 | 462 | py | Python | src/glitchygames/movement/horizontal.py | terrysimons/ghettogames | 23773119d1994251b43c42db39c1c99c08386c24 | [
"BSD-3-Clause"
] | 1 | 2019-07-06T02:01:27.000Z | 2019-07-06T02:01:27.000Z | src/glitchygames/movement/horizontal.py | terrysimons/ghettogames | 23773119d1994251b43c42db39c1c99c08386c24 | [
"BSD-3-Clause"
] | 4 | 2021-12-31T04:18:01.000Z | 2022-03-29T13:40:32.000Z | src/glitchygames/movement/horizontal.py | terrysimons/glitchygames | 23773119d1994251b43c42db39c1c99c08386c24 | [
"BSD-3-Clause"
] | 1 | 2019-07-12T19:41:09.000Z | 2019-07-12T19:41:09.000Z | """
Horizontal:
Adds movement functions along the horizontal (X) axis to a game object
"""
class Horizontal:
def __init__(self, speed):
self.speed = speed
self.current_speed = self.speed.x
def _change_speed(self, value):
self.current_speed = value
def left(self):
self._... | 18.48 | 70 | 0.640693 | 368 | 0.796537 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.194805 |
51ffc4f6b6d23170b73a6eacebc5e2ad88e94b17 | 403 | py | Python | utilities/py/factories/factory.py | ItsSeaJay/phphp | c430c1d03fb88a6a94e07b84eba3905d8090cc8e | [
"MIT"
] | null | null | null | utilities/py/factories/factory.py | ItsSeaJay/phphp | c430c1d03fb88a6a94e07b84eba3905d8090cc8e | [
"MIT"
] | null | null | null | utilities/py/factories/factory.py | ItsSeaJay/phphp | c430c1d03fb88a6a94e07b84eba3905d8090cc8e | [
"MIT"
] | null | null | null | import json
class Factory:
def __init__(self):
pass
@staticmethod
def create(self):
pass
@staticmethod
def get_template(self):
pass
def get_config(self):
with open('json/config.json', 'r') as file:
# Convert the contents of the file to a Py... | 20.15 | 69 | 0.575682 | 390 | 0.967742 | 0 | 0 | 102 | 0.253102 | 0 | 0 | 78 | 0.193548 |
a4011bd0d4b895040b6b7aa5271e8dea8a377f95 | 1,248 | py | Python | NREL.py | gregario/NRELDownloader | c098762be22979ff6901079561694ab90206afa3 | [
"BSD-3-Clause"
] | null | null | null | NREL.py | gregario/NRELDownloader | c098762be22979ff6901079561694ab90206afa3 | [
"BSD-3-Clause"
] | null | null | null | NREL.py | gregario/NRELDownloader | c098762be22979ff6901079561694ab90206afa3 | [
"BSD-3-Clause"
] | 1 | 2018-08-07T06:52:45.000Z | 2018-08-07T06:52:45.000Z | #coding: utf-8
# Configuration file for NREL data call
# This file sets up the calls for data from NREL.
# 26/05/2016 Greg Jackson AESE Labs Imperial College
from datetime import date, datetime, timedelta
debug = True
# Location variables, determines locations from which calls will be made
# locations = [("New Y... | 43.034483 | 272 | 0.77484 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.690705 |
a40166e450ee628d6a50ace1f3007f22ec4f1689 | 6,239 | py | Python | blocking_utils.py | colebryant/DeepBlocker | e90bbe2c4fa75f53fccea20cbdebf71b9167584d | [
"BSD-3-Clause"
] | null | null | null | blocking_utils.py | colebryant/DeepBlocker | e90bbe2c4fa75f53fccea20cbdebf71b9167584d | [
"BSD-3-Clause"
] | null | null | null | blocking_utils.py | colebryant/DeepBlocker | e90bbe2c4fa75f53fccea20cbdebf71b9167584d | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import numpy as np
def topK_neighbors_to_candidate_set(topK_neighbors):
#We create a data frame corresponding to topK neighbors.
# We are given a 2D matrix of the form 1: [a1, a2, a3], 2: [b1, b2, b3]
# where a1, a2, a3 are the top-3 neighbors for tuple 1 and so on.
# We will now cr... | 46.559701 | 179 | 0.702036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,188 | 0.350697 |
a4016fb77c28a57f0279db0ce2ae101971c1c395 | 4,316 | py | Python | tests/test_models/test_place.py | lowercaselife/AirBnB_clone | 503c2889a0e1f96dd6ddd497ce7649ca00589a24 | [
"MIT"
] | null | null | null | tests/test_models/test_place.py | lowercaselife/AirBnB_clone | 503c2889a0e1f96dd6ddd497ce7649ca00589a24 | [
"MIT"
] | null | null | null | tests/test_models/test_place.py | lowercaselife/AirBnB_clone | 503c2889a0e1f96dd6ddd497ce7649ca00589a24 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Place unittests"""
import unittest
from models.place import Place
import datetime
import time
class TestPlace(unittest.TestCase):
"""class TestPlace"""
def test_place_class_membership_and_attributes(self):
"""Place is right class with correct attrs"""
place = Place()
... | 39.962963 | 71 | 0.686284 | 4,149 | 0.961307 | 0 | 0 | 0 | 0 | 0 | 0 | 519 | 0.12025 |
a401b7bfe3f33a4fcdd4603c34778103819c8259 | 1,989 | py | Python | project/simulation/naive/iterated_prisoners.py | horken7/game-theory | c5484e6c338646e8143e90290efdc07acf397f22 | [
"MIT"
] | null | null | null | project/simulation/naive/iterated_prisoners.py | horken7/game-theory | c5484e6c338646e8143e90290efdc07acf397f22 | [
"MIT"
] | null | null | null | project/simulation/naive/iterated_prisoners.py | horken7/game-theory | c5484e6c338646e8143e90290efdc07acf397f22 | [
"MIT"
] | null | null | null |
# coding: utf-8
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
both_coorporate_utility = 3
both_defect_utility = 1
looser_utility = 0
winner_utility = 3
a_resources = 2
b_resources = 2
a_actions = []
b_actions = []
a_utility = []
b_utility = []
rounds = 20
# Defect: action 0
# Cooperate... | 26.52 | 86 | 0.711413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 317 | 0.159377 |
a403cb1eb639ba6d23d5ad19b32afabf17e2a3db | 844 | py | Python | higher_lower/__init__.py | simonw/higher-lower | 436810573bfcb0175738b6636b6b4d790b81183b | [
"Apache-2.0"
] | 2 | 2021-02-16T08:45:24.000Z | 2021-02-22T01:30:29.000Z | higher_lower/__init__.py | simonw/higher-lower | 436810573bfcb0175738b6636b6b4d790b81183b | [
"Apache-2.0"
] | 1 | 2021-02-16T07:17:21.000Z | 2021-02-16T19:39:12.000Z | higher_lower/__init__.py | simonw/higher-lower | 436810573bfcb0175738b6636b6b4d790b81183b | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class ActualIs(Enum):
HIGHER = 1
MATCH = 0
LOWER = -1
def higher_lower(min_value, max_value, callback):
assert isinstance(max_value, int)
assert isinstance(min_value, int)
assert max_value > min_value
candidate = midpoint(min_value, max_value)
while True:
... | 25.575758 | 62 | 0.61019 | 65 | 0.077014 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.060427 |
a405507dac4880c95cf65af8bea272bbc90ef96d | 4,819 | py | Python | satcfe/resposta/enviardadosvenda.py | danielgoncalves/satcfe | b460eaa2fc09b891b68a4ad25db5f7c45a1fcf4f | [
"Apache-2.0"
] | 38 | 2015-05-25T02:57:16.000Z | 2022-01-18T21:01:49.000Z | satcfe/resposta/enviardadosvenda.py | danielgoncalves/satcfe | b460eaa2fc09b891b68a4ad25db5f7c45a1fcf4f | [
"Apache-2.0"
] | 15 | 2015-08-19T13:30:46.000Z | 2022-01-19T22:34:17.000Z | satcfe/resposta/enviardadosvenda.py | danielgoncalves/satcfe | b460eaa2fc09b891b68a4ad25db5f7c45a1fcf4f | [
"Apache-2.0"
] | 13 | 2015-05-07T01:10:12.000Z | 2022-02-04T14:30:01.000Z | # -*- coding: utf-8 -*-
#
# satcfe/resposta/enviardadosvenda.py
#
# Copyright 2015 Base4 Sistemas Ltda ME
#
# 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/license... | 31.703947 | 76 | 0.564225 | 3,691 | 0.763076 | 0 | 0 | 1,895 | 0.391772 | 0 | 0 | 2,524 | 0.521811 |
a405cb29a4a6d5faed09ea2ed20051e186fb8ddd | 100 | py | Python | src/apps/songs_artists/apps.py | forever-Agriculture/lyrics_site | 9acac576974578ac52b9e32a760089c8c95d3e6d | [
"BSD-3-Clause"
] | 1 | 2017-05-05T12:07:31.000Z | 2017-05-05T12:07:31.000Z | src/apps/songs_artists/apps.py | forever-Agriculture/lyrics_site | 9acac576974578ac52b9e32a760089c8c95d3e6d | [
"BSD-3-Clause"
] | 7 | 2020-02-11T23:57:39.000Z | 2022-01-13T00:42:36.000Z | src/apps/songs_artists/apps.py | forever-Agriculture/lyrics_site | 9acac576974578ac52b9e32a760089c8c95d3e6d | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class SongsArtistsConfig(AppConfig):
name = 'songs_artists'
| 16.666667 | 36 | 0.78 | 63 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.15 |
a406c16a052bf957c0176f5968826a2acaf62234 | 977 | py | Python | setup.py | hacklabza/arnold | d51f6b751ce6530650555cd33bf707f00b60af59 | [
"BSD-3-Clause"
] | 2 | 2021-08-20T05:19:37.000Z | 2022-01-11T09:39:39.000Z | setup.py | hacklabza/arnold | d51f6b751ce6530650555cd33bf707f00b60af59 | [
"BSD-3-Clause"
] | null | null | null | setup.py | hacklabza/arnold | d51f6b751ce6530650555cd33bf707f00b60af59 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
description_files = ['README.md', 'AUTHORS.md', 'CHANGELOG.md']
setup(
name="arnold",
description="RPi 4 Based Robotic Platform",
long_description="".join([open(f, 'r').read() for f in description_files]),
version="0.0.1",
author='Hacklab',
author_e... | 32.566667 | 79 | 0.637666 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.45957 |
a40784a5c0a876434055151e359d7b556dab11e3 | 769 | py | Python | spaweb/migrations/0010_auto_20201120_2321.py | MokkoFm/formula-spa-django | c1149d61af833f4db2a6ccd483d357462c989765 | [
"MIT"
] | null | null | null | spaweb/migrations/0010_auto_20201120_2321.py | MokkoFm/formula-spa-django | c1149d61af833f4db2a6ccd483d357462c989765 | [
"MIT"
] | null | null | null | spaweb/migrations/0010_auto_20201120_2321.py | MokkoFm/formula-spa-django | c1149d61af833f4db2a6ccd483d357462c989765 | [
"MIT"
] | 1 | 2020-11-12T13:36:36.000Z | 2020-11-12T13:36:36.000Z | # Generated by Django 3.1.3 on 2020-11-20 21:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('spaweb', '0009_product_number_users'),
]
operations = [
migrations.RemoveField(
model_name='pro... | 27.464286 | 182 | 0.616385 | 652 | 0.838046 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.264781 |
a4080e0aba5ecd64976ae2135ad806d510892f8d | 93 | py | Python | webapp/MemberApp/apps.py | AdaFactor/RamaProject | 4da35480e2e7185a6d07f00cc8cdbf51898a7bb7 | [
"MIT"
] | null | null | null | webapp/MemberApp/apps.py | AdaFactor/RamaProject | 4da35480e2e7185a6d07f00cc8cdbf51898a7bb7 | [
"MIT"
] | 7 | 2018-02-16T11:18:24.000Z | 2019-04-23T17:49:04.000Z | webapp/MemberApp/apps.py | AdaFactor/RamaProject | 4da35480e2e7185a6d07f00cc8cdbf51898a7bb7 | [
"MIT"
] | 1 | 2018-01-29T05:15:13.000Z | 2018-01-29T05:15:13.000Z | from django.apps import AppConfig
class MemberappConfig(AppConfig):
name = 'MemberApp'
| 15.5 | 33 | 0.763441 | 56 | 0.602151 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.11828 |
a4097c2af9c121f0f61a10affe12d058da5aad64 | 2,769 | py | Python | bocadillo_cli/helpers.py | bocadilloproject/bocadillo-cli | f11ec438504eb2edd3c4e8f5d2992e804b3da6b0 | [
"MIT"
] | 6 | 2019-04-17T17:07:46.000Z | 2020-08-09T07:37:34.000Z | bocadillo_cli/helpers.py | bocadilloproject/bocadillo-cli | f11ec438504eb2edd3c4e8f5d2992e804b3da6b0 | [
"MIT"
] | 10 | 2019-04-17T21:27:46.000Z | 2019-06-17T05:45:51.000Z | bocadillo_cli/helpers.py | bocadilloproject/bocadillo-cli | f11ec438504eb2edd3c4e8f5d2992e804b3da6b0 | [
"MIT"
] | 1 | 2019-05-12T17:32:45.000Z | 2019-05-12T17:32:45.000Z | import pathlib
import pkgutil
import typing
from contextlib import contextmanager
import click
from jinja2 import Template
from . import formatutils as fmt
class Templates:
def __init__(self, context: dict):
self.context = context
@staticmethod
def _get(name: str) -> Template:
path = st... | 29.774194 | 76 | 0.562658 | 2,605 | 0.940773 | 195 | 0.070423 | 519 | 0.187432 | 0 | 0 | 257 | 0.092813 |
a409daf46a3fa04de8f0e145bfe66c2e1af54b0c | 1,637 | py | Python | extras/cleanup-meshes.py | RQWorldblender/io_scene_numdlb | 8a67c092f1aef9536e6de7cc7665dec77c0d52c6 | [
"MIT"
] | 2 | 2020-12-04T14:55:09.000Z | 2021-03-04T02:11:27.000Z | extras/cleanup-meshes.py | RQWorldblender/io_scene_numdlb | 8a67c092f1aef9536e6de7cc7665dec77c0d52c6 | [
"MIT"
] | null | null | null | extras/cleanup-meshes.py | RQWorldblender/io_scene_numdlb | 8a67c092f1aef9536e6de7cc7665dec77c0d52c6 | [
"MIT"
] | 1 | 2021-03-04T02:11:42.000Z | 2021-03-04T02:11:42.000Z | import bpy, os
# Select Expressions
mesh_expr = ["*Blink*", "*Attack*", "*Ouch*", "*Talk*", "*Capture*", "*Ottotto*", "*Escape*", "*Half*", "*Pattern*", "*Result*", "*Harf*","*Hot*", "*Heavy*", "*Voice*", "*Fura*", "*Throw*", "*Catch*", "*Cliff*", "*FLIP*", "*Bound*", "*Down*", "*Bodybig*", "*Final*", "*Result*", "... | 38.97619 | 362 | 0.596823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 589 | 0.359805 |
a40bad40cfcd7ca531100b5e277511691257c17c | 2,836 | py | Python | inst/python/ee_manage.py | MartinHoldrege/rgee | 8534e547884198f9375428dfbb7f507e3c406bf0 | [
"Apache-2.0"
] | null | null | null | inst/python/ee_manage.py | MartinHoldrege/rgee | 8534e547884198f9375428dfbb7f507e3c406bf0 | [
"Apache-2.0"
] | null | null | null | inst/python/ee_manage.py | MartinHoldrege/rgee | 8534e547884198f9375428dfbb7f507e3c406bf0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
import os
import ee
""" Generate a table with all the tasks that are running (or has finished) in GEE.
>>> genreport()
>>> quota(ID)
This module, which is used for checking earth engine quota,
were obtained from geeup: a Python CLI for Earth Engine Uploads... | 28.36 | 86 | 0.616714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,607 | 0.566643 |
a40db821cdd40995b507a0185d3e87cf108ec33d | 3,104 | py | Python | old/strip_3 - move to file server from Rawful.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | old/strip_3 - move to file server from Rawful.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | old/strip_3 - move to file server from Rawful.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | """
Strip silence from recorded audio, move to file server(s).
(c) Ameryn Media LLC, 2015. All rights reserved.
"""
import os
import datetime
from ConfigParser import ConfigParser
import shutil
import pydub
CONFIG_LOCATION = 'ameryn.ini'
config = ConfigParser()
config.read(CONFIG_LOCATION)
# Input file parameters... | 32 | 141 | 0.746778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.216495 |
cf8bc62feb8e0471e65e54c2a009471153f8ea88 | 636 | py | Python | _sadm/listen/handlers/exec.py | jrmsdev/pysadm | 0d6b3f0c8d870d83ab499c8d9487ec8e3a89fc37 | [
"BSD-3-Clause"
] | 1 | 2019-10-15T08:37:56.000Z | 2019-10-15T08:37:56.000Z | _sadm/listen/handlers/exec.py | jrmsdev/pysadm | 0d6b3f0c8d870d83ab499c8d9487ec8e3a89fc37 | [
"BSD-3-Clause"
] | null | null | null | _sadm/listen/handlers/exec.py | jrmsdev/pysadm | 0d6b3f0c8d870d83ab499c8d9487ec8e3a89fc37 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Jeremías Casteglione <jrmsdev@gmail.com>
# See LICENSE file.
import json
from bottle import request
from _sadm import log
from _sadm.listen.errors import error
from _sadm.listen.webhook.repo.vcs.git import GitRepo
__all__ = ['exech']
_taskman = {
'webhook.repo.git': GitRepo(),
}
def handle(task, a... | 22.714286 | 60 | 0.709119 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.257457 |
cf8d37dd7cc02823d08160694115cee5f64df311 | 255 | py | Python | essentials/old_on_352.py | sonicrules1234/sonicbot | 07a22d08bf86ed33dc715a800957aee3b45f3dde | [
"BSD-3-Clause"
] | 1 | 2019-06-27T08:45:23.000Z | 2019-06-27T08:45:23.000Z | essentials/old_on_352.py | sonicrules1234/sonicbot | 07a22d08bf86ed33dc715a800957aee3b45f3dde | [
"BSD-3-Clause"
] | null | null | null | essentials/old_on_352.py | sonicrules1234/sonicbot | 07a22d08bf86ed33dc715a800957aee3b45f3dde | [
"BSD-3-Clause"
] | null | null | null | import time
minlevel = 1
arguments = ["self", "info"]
keyword = "352"
def main(self, info) :
self.hostnames[info["words"][7]] = info["words"][5]
self.whoislist[info["words"][7]] = info["words"][7] + "!" + info["words"][4] + "@" + info["words"][5]
| 31.875 | 105 | 0.576471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.254902 |
cf8d4235cb878e12f5c58b025ed042e67c4a28fa | 1,266 | py | Python | app.py | Kaoushikkumarr/collab-service | 87388d140e74fe18704e1e3bee4e53d64c63f1d2 | [
"MIT"
] | null | null | null | app.py | Kaoushikkumarr/collab-service | 87388d140e74fe18704e1e3bee4e53d64c63f1d2 | [
"MIT"
] | null | null | null | app.py | Kaoushikkumarr/collab-service | 87388d140e74fe18704e1e3bee4e53d64c63f1d2 | [
"MIT"
] | null | null | null | import os
from flask_migrate import Migrate
from flask_restful import Api
from flask import Flask
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
from config_manager.config_manager import FileConfigManager
from utils.request_controller import RequestsController
app = Flask(__name__)
CORS(app)
api... | 28.772727 | 102 | 0.814376 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.291469 |
cf8e095b2dfd6ed697713c2bc61fb4d1890cfd30 | 579 | py | Python | EstruturaDeRepeticao/exercicio19.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | EstruturaDeRepeticao/exercicio19.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | EstruturaDeRepeticao/exercicio19.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | # Altere o programa anterior para que ele aceite apenas números entre 0 e 1000
condition = True
conjunto = []
while condition:
numero = int(input("Digite os números do conjunto (Digite 0 para parar): "))
if numero == 0:
break
elif numero > 1000 or numero < 0:
print("Digite somente números... | 30.473684 | 80 | 0.659758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.472509 |
cf8e7a839447ed7d56910db5a87efb42a19cb761 | 207 | py | Python | study/aula04.py | RutyRibeiro/facial-recognition-python | c86d13fc7f9e17d86675f7337b70be8f805fcdda | [
"MIT"
] | 2 | 2020-10-16T00:54:23.000Z | 2021-11-11T02:05:32.000Z | study/aula04.py | RutyRibeiro/facial-recognition-python | c86d13fc7f9e17d86675f7337b70be8f805fcdda | [
"MIT"
] | null | null | null | study/aula04.py | RutyRibeiro/facial-recognition-python | c86d13fc7f9e17d86675f7337b70be8f805fcdda | [
"MIT"
] | null | null | null | import cv2
cam = cv2.VideoCapture(0)
while True:
camera,frame = cam.read()
cv2.imshow('imagem camera', frame)
if cv2.waitKey(1) == ord('f'):
break
cam.release()
cv2.destroyAllWindows() | 17.25 | 38 | 0.642512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.086957 |
cf8ef2b45d7d458a65d6c785888a76f8daf2c51b | 750 | py | Python | cogs/help.py | moisesjsanchez/anime-movie-discord-bot | 2979dc28cc6250e56f713c2d6483aaaff7688176 | [
"MIT"
] | null | null | null | cogs/help.py | moisesjsanchez/anime-movie-discord-bot | 2979dc28cc6250e56f713c2d6483aaaff7688176 | [
"MIT"
] | 2 | 2021-05-03T04:48:46.000Z | 2021-05-06T08:29:23.000Z | cogs/help.py | moisesjsanchez/anime-movie-discord-bot | 2979dc28cc6250e56f713c2d6483aaaff7688176 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
class Help(commands.Cog):
def __init__(self, client):
self.client = client
# settings up the custom help functions
@commands.command()
async def help(self, ctx):
embed = discord.Embed(
title='Fathom Chan', description="A bot... | 28.846154 | 141 | 0.665333 | 645 | 0.86 | 0 | 0 | 508 | 0.677333 | 484 | 0.645333 | 246 | 0.328 |
cf8fb65655bb2de90066c1c7dab90f53f736211b | 2,255 | py | Python | summarize/modules/coverage_matrix_attention/coverage_matrix_attention.py | danieldeutsch/summarize | f36a86d58f381ff1f607f356dad3d6ef7b0e0224 | [
"Apache-2.0"
] | 15 | 2019-11-01T11:49:44.000Z | 2021-01-19T06:59:32.000Z | summarize/modules/coverage_matrix_attention/coverage_matrix_attention.py | CogComp/summary-cloze | b38e3e8c7755903477fd92a4cff27125cbf5553d | [
"Apache-2.0"
] | 2 | 2020-03-30T07:54:01.000Z | 2021-11-15T16:27:42.000Z | summarize/modules/coverage_matrix_attention/coverage_matrix_attention.py | CogComp/summary-cloze | b38e3e8c7755903477fd92a4cff27125cbf5553d | [
"Apache-2.0"
] | 3 | 2019-12-06T05:57:51.000Z | 2019-12-11T11:34:21.000Z | import torch
from allennlp.common.registrable import Registrable
from typing import Tuple
class CoverageMatrixAttention(torch.nn.Module, Registrable):
"""
The ``CoverageMatrixAttention`` computes a matrix of attention probabilities
between the encoder and decoder outputs. The attention function has access... | 45.1 | 98 | 0.701552 | 2,162 | 0.958758 | 0 | 0 | 0 | 0 | 0 | 0 | 1,795 | 0.796009 |
cf8fc6f83e41245e2996c4f4fbbce410b6cabeff | 861 | py | Python | accelerator/tests/factories/program_partner_factory.py | masschallenge/django-accelerator | 8af898b574be3b8335edc8961924d1c6fa8b5fd5 | [
"MIT"
] | 6 | 2017-06-14T19:34:01.000Z | 2020-03-08T07:16:59.000Z | accelerator/tests/factories/program_partner_factory.py | masschallenge/django-accelerator | 8af898b574be3b8335edc8961924d1c6fa8b5fd5 | [
"MIT"
] | 160 | 2017-06-20T17:12:13.000Z | 2022-03-30T13:53:12.000Z | accelerator/tests/factories/program_partner_factory.py | masschallenge/django-accelerator | 8af898b574be3b8335edc8961924d1c6fa8b5fd5 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from __future__ import unicode_literals
import swapper
from factory import (
Sequence,
SubFactory,
)
from factory.django import DjangoModelFactory
from accelerator.tests.factories.partner_factory import PartnerFactory
from accelerator.tests.factories.pro... | 27.774194 | 70 | 0.788618 | 330 | 0.383275 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.138211 |