hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54fffcde0435df6ac71fd7c894c28a55193912b1 | 1,168 | py | Python | trace_simexp/task/clean.py | damar-wicaksono/trace-simexp | e2640ff44de461c70ffbd9c8faa68965821b37f2 | [
"MIT"
] | null | null | null | trace_simexp/task/clean.py | damar-wicaksono/trace-simexp | e2640ff44de461c70ffbd9c8faa68965821b37f2 | [
"MIT"
] | null | null | null | trace_simexp/task/clean.py | damar-wicaksono/trace-simexp | e2640ff44de461c70ffbd9c8faa68965821b37f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
trace_simexp.task.clean
***********************
Module to clean up files and directories contents
"""
__author__ = "Damar Wicaksono"
def rm_files(files: list):
"""Remove the listed files
:param csv_files: the list files or directories, fullname
"""
import sub... | 27.809524 | 78 | 0.583904 |
cbe470bae95f7848b51ff3570c5a554f35be0d11 | 5,259 | py | Python | src/cool/Parsing/Lexer.py | matcom-compilers-2019/cool-compiler-greidy-ariel-quevedo | d6d3ecedad5821817cc62040691ded5dcb84e252 | [
"MIT"
] | 1 | 2019-11-21T22:06:45.000Z | 2019-11-21T22:06:45.000Z | src/cool/Parsing/Lexer.py | matcom-compilers-2019/cool-compiler-greidy-ariel-quevedo | d6d3ecedad5821817cc62040691ded5dcb84e252 | [
"MIT"
] | null | null | null | src/cool/Parsing/Lexer.py | matcom-compilers-2019/cool-compiler-greidy-ariel-quevedo | d6d3ecedad5821817cc62040691ded5dcb84e252 | [
"MIT"
] | null | null | null | import ply.lex as lex
from ply.lex import TOKEN
class Lexer(object):
def __init__(self):
self.reserved = self.keyword
self.tokens = self.tokens_list + tuple(self.keyword.values())
self.states = (
('string', 'exclusive'),
('comment', 'exclusive')
)
... | 29.379888 | 85 | 0.512075 |
0930fddd7ce4fc72d52fdd6a6ce54304cc82fe2d | 1,335 | py | Python | src/control/convertStrategy/DOCAlgorithm.py | alfredo-milani/ParseScript | 58847537b53bfb7b88710761963dc94b06041195 | [
"MIT"
] | null | null | null | src/control/convertStrategy/DOCAlgorithm.py | alfredo-milani/ParseScript | 58847537b53bfb7b88710761963dc94b06041195 | [
"MIT"
] | null | null | null | src/control/convertStrategy/DOCAlgorithm.py | alfredo-milani/ParseScript | 58847537b53bfb7b88710761963dc94b06041195 | [
"MIT"
] | null | null | null | from subprocess import Popen, PIPE
from constants import NEW_USER
from control.convertStrategy.ConversionAlgorithm import ConversionAlgorithm
from control.convertStrategy.BaseAlgorithm import BaseAlgorithm
from utils import Common
class DOCAlgorithm(BaseAlgorithm, ConversionAlgorithm):
"""
Classe che definis... | 32.560976 | 97 | 0.665169 |
9e8b4fb8f4563e0745db4ebe70cff51cccd58444 | 177 | py | Python | django/contrib/admin/__init__.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:24:22.000Z | 2016-05-08T12:24:22.000Z | django/contrib/admin/__init__.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | null | null | null | django/contrib/admin/__init__.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2015-11-19T14:45:16.000Z | 2015-11-19T14:45:16.000Z | from django.contrib.admin.options import ModelAdmin
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
| 44.25 | 69 | 0.858757 |
b838e8801e36a8cc92a66943656bdc16a346a2d7 | 666 | py | Python | backoffice/manage.py | AlejandroUPC/pythonmicroservices | 9d42bd6dfd9847ad4a8e6029e808de927292c251 | [
"MIT"
] | null | null | null | backoffice/manage.py | AlejandroUPC/pythonmicroservices | 9d42bd6dfd9847ad4a8e6029e808de927292c251 | [
"MIT"
] | null | null | null | backoffice/manage.py | AlejandroUPC/pythonmicroservices | 9d42bd6dfd9847ad4a8e6029e808de927292c251 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backoffice.settings')
try:
from django.core.management import execute_from_command_line
except I... | 28.956522 | 74 | 0.68018 |
928a17415c9c6c69a860878da03a62449a0581ea | 1,805 | py | Python | fax/competitive/cg.py | niklasschmitz/fax | ab2edcc375a45dedcf715edd407d5037e0f70bf2 | [
"MIT"
] | 4 | 2020-07-20T18:56:13.000Z | 2020-07-31T02:51:12.000Z | fax/competitive/cg.py | niklasschmitz/fax | ab2edcc375a45dedcf715edd407d5037e0f70bf2 | [
"MIT"
] | null | null | null | fax/competitive/cg.py | niklasschmitz/fax | ab2edcc375a45dedcf715edd407d5037e0f70bf2 | [
"MIT"
] | null | null | null | from functools import partial
from jax import lax
from jax import tree_util
from fax import converge
from fax import loop
from fax import math
def cg_step(a_lin_op, i, current_state):
del i
x, r, r_sqr, p = current_state
amat_p = a_lin_op(p)
alpha = r_sqr / math.pytree_dot(p, amat_p)
x_new = tr... | 30.083333 | 80 | 0.655956 |
9c3fa909f08bbba853b962da19fb992763810cfb | 13,771 | py | Python | builder/main.py | vladkozlov69/platform-nordicnrf52 | 0ea23a266125377c2ff410c5e8dc5388254de6b1 | [
"Apache-2.0"
] | null | null | null | builder/main.py | vladkozlov69/platform-nordicnrf52 | 0ea23a266125377c2ff410c5e8dc5388254de6b1 | [
"Apache-2.0"
] | null | null | null | builder/main.py | vladkozlov69/platform-nordicnrf52 | 0ea23a266125377c2ff410c5e8dc5388254de6b1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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 applicabl... | 32.788095 | 112 | 0.582819 |
68bcedbea2eef7ec83cae89ce6881cd71973e85c | 51 | py | Python | hacker/challenges/crypto/duke_box.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | 1 | 2020-04-21T11:39:25.000Z | 2020-04-21T11:39:25.000Z | hacker/challenges/crypto/duke_box.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | 7 | 2020-02-12T01:08:01.000Z | 2022-02-10T11:56:56.000Z | hacker/challenges/crypto/duke_box.py | Tenebrar/codebase | 59c9a35289fb29afedad0e3edd0519b67372ef9f | [
"Unlicense"
] | null | null | null | # See text file for explanation
print('gnomeking')
| 17 | 31 | 0.764706 |
cc01759e4371fa0cdfb1acb1192a75b13e394daf | 2,777 | py | Python | gallery_django/accounts/serializers.py | Reincarnationist/Memory_gallery | 5a916dcc6a7ae734413083bf9c39ee507d3856e9 | [
"MIT",
"Unlicense"
] | 1 | 2022-02-05T15:31:06.000Z | 2022-02-05T15:31:06.000Z | gallery_django/accounts/serializers.py | Reincarnationist/Memory_gallery | 5a916dcc6a7ae734413083bf9c39ee507d3856e9 | [
"MIT",
"Unlicense"
] | null | null | null | gallery_django/accounts/serializers.py | Reincarnationist/Memory_gallery | 5a916dcc6a7ae734413083bf9c39ee507d3856e9 | [
"MIT",
"Unlicense"
] | null | null | null | from rest_framework import serializers
from django.contrib.auth import get_user_model, authenticate, password_validation
from django.core import exceptions
from django.contrib.auth.models import User
#User Serializer
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = get_user_model()
... | 33.059524 | 89 | 0.673389 |
bed7a2c99e9fdc4049a8c0136c5fba5f21cdf428 | 698 | py | Python | src/hebi/settings.py | Xifax/suzu-web | ebe6b87093f73bf8a100d7b78b1d4a83cf203315 | [
"BSD-2-Clause"
] | null | null | null | src/hebi/settings.py | Xifax/suzu-web | ebe6b87093f73bf8a100d7b78b1d4a83cf203315 | [
"BSD-2-Clause"
] | null | null | null | src/hebi/settings.py | Xifax/suzu-web | ebe6b87093f73bf8a100d7b78b1d4a83cf203315 | [
"BSD-2-Clause"
] | null | null | null | # Scrapy settings for hebi project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/topics/settings.html
#
BOT_NAME = 'hebi'
SPIDER_MODULES = ['hebi.spiders']
NEWSPIDER_MODULE = 'hebi.spiders'
# Filter dupl... | 24.068966 | 80 | 0.737822 |
7ba763228abe7d74c5fb7cbfd26db301b15c5abc | 1,628 | py | Python | other/sensor_magnet/calib/plot_magnet_smooth_interpol.py | Gabs48/tigrillo2 | 66ad26c0aff39da74ca76f712b6f01b40d383f34 | [
"MIT"
] | 1 | 2018-11-05T14:21:43.000Z | 2018-11-05T14:21:43.000Z | other/sensor_magnet/calib/plot_magnet_smooth_interpol.py | Gabs48/tigrillo2 | 66ad26c0aff39da74ca76f712b6f01b40d383f34 | [
"MIT"
] | null | null | null | other/sensor_magnet/calib/plot_magnet_smooth_interpol.py | Gabs48/tigrillo2 | 66ad26c0aff39da74ca76f712b6f01b40d383f34 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.interpolate import interp1d
import pickle
import matplotlib
matplotlib.use("Agg")
from matplotlib.mlab import *
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
plt.rc('axes', facecolor='white')
plt.rc('savefig',... | 28.068966 | 102 | 0.678133 |
48b4ba7a2aab16fe16f78f1d9b0dca86c188a0b7 | 150 | py | Python | Waveforms/results/I_ij.py | keefemitman/PostNewtonian | 853d6577cb0002da5eebe1cb55f0c28fbc114324 | [
"MIT"
] | 18 | 2015-03-26T01:04:36.000Z | 2022-02-01T19:26:21.000Z | Waveforms/results/I_ij.py | keefemitman/PostNewtonian | 853d6577cb0002da5eebe1cb55f0c28fbc114324 | [
"MIT"
] | 4 | 2015-01-08T23:46:29.000Z | 2017-09-20T19:13:51.000Z | Waveforms/results/I_ij.py | keefemitman/PostNewtonian | 853d6577cb0002da5eebe1cb55f0c28fbc114324 | [
"MIT"
] | 3 | 2016-05-13T02:36:14.000Z | 2021-11-23T21:36:32.000Z | ( ( ( A*mu*r(t)**2 )*nHat*nHat )
+( ( B*mu*r(t)**2*v(t)**2/c**2 )*lambdaHat*lambdaHat )
+( ( 48*C*G**2*m**2*mu*nu*v(t)/(7*c**5) )*lambdaHat*nHat ) ) | 50 | 61 | 0.48 |
cb2a082e3b4dbeab938640739b2dac8d08de6bd7 | 3,944 | py | Python | bayespy/demos/pattern_search.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | 622 | 2015-01-15T19:46:06.000Z | 2022-03-22T13:40:22.000Z | bayespy/demos/pattern_search.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | 118 | 2015-01-04T06:38:23.000Z | 2021-11-05T17:28:02.000Z | bayespy/demos/pattern_search.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | 160 | 2015-02-16T15:30:43.000Z | 2022-03-14T00:52:36.000Z | ################################################################################
# Copyright (C) 2015 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Demonstration of the pattern search method for PCA.
The pattern s... | 29.214815 | 94 | 0.521805 |
60a92d54c183b789113eb7bc3dae03e478be3d0f | 1,988 | py | Python | sahara_plugin_cdh/plugins/cdh/v5_11_0/resources/cdh_config.py | openstack/sahara-plugin-cdh | 063c3ee8de7e56831ef6b3bc8807706bd5fd7cea | [
"Apache-2.0"
] | 2 | 2019-01-28T22:10:54.000Z | 2019-02-20T08:35:58.000Z | sahara_plugin_cdh/plugins/cdh/v5_11_0/resources/cdh_config.py | openstack/sahara-plugin-cdh | 063c3ee8de7e56831ef6b3bc8807706bd5fd7cea | [
"Apache-2.0"
] | null | null | null | sahara_plugin_cdh/plugins/cdh/v5_11_0/resources/cdh_config.py | openstack/sahara-plugin-cdh | 063c3ee8de7e56831ef6b3bc8807706bd5fd7cea | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Massachusetts Open Cloud
#
# 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... | 30.584615 | 71 | 0.670523 |
31aaaf41cb942aeba5a0b07fcc5af2bf0a65a80a | 217 | py | Python | exemplos/ex008.py | figueiredo-alef/estud-python | f22351ecb966ec84433bb6078d92d4f31d5a0a7e | [
"MIT"
] | null | null | null | exemplos/ex008.py | figueiredo-alef/estud-python | f22351ecb966ec84433bb6078d92d4f31d5a0a7e | [
"MIT"
] | null | null | null | exemplos/ex008.py | figueiredo-alef/estud-python | f22351ecb966ec84433bb6078d92d4f31d5a0a7e | [
"MIT"
] | null | null | null | print('=' * 5, 'EX_008', '=' * 5)
# conversor de medidas
n1 = float(input('Digite a distância (em metros): '))
cm = n1 * 100
mm = n1 * 1000
print('{}m em centímetros é {}cm e em milímetros é {}mm'.format(n1, cm, mm))
| 31 | 76 | 0.608295 |
5434b744bcaf8fd83b2750a3af875fd7a382f1f5 | 1,925 | py | Python | src/server/main.py | lee14257/delphi-epidata | b007d778321e68be5526ca9ce1113b13d24d6fe8 | [
"MIT"
] | null | null | null | src/server/main.py | lee14257/delphi-epidata | b007d778321e68be5526ca9ce1113b13d24d6fe8 | [
"MIT"
] | null | null | null | src/server/main.py | lee14257/delphi-epidata | b007d778321e68be5526ca9ce1113b13d24d6fe8 | [
"MIT"
] | null | null | null | import pathlib
import logging
from typing import Dict, Callable
from flask import request, send_file, Response, send_from_directory, jsonify
from ._config import URL_PREFIX, VERSION
from ._common import app, set_compatibility_mode
from ._exceptions import MissingOrWrongSourceException
from .endpoints import endpoints... | 31.048387 | 86 | 0.743896 |
c3adfa90a2564f83a94546c1994c657a2718aedf | 7,494 | py | Python | p2_continuous-control/agent_reacher.py | parksoy/Soyoung_Udacity_ND_DeepReinforcementLearning | 28c4cd3ce76094a0e682736fcdceeec3f21ba754 | [
"MIT"
] | null | null | null | p2_continuous-control/agent_reacher.py | parksoy/Soyoung_Udacity_ND_DeepReinforcementLearning | 28c4cd3ce76094a0e682736fcdceeec3f21ba754 | [
"MIT"
] | null | null | null | p2_continuous-control/agent_reacher.py | parksoy/Soyoung_Udacity_ND_DeepReinforcementLearning | 28c4cd3ce76094a0e682736fcdceeec3f21ba754 | [
"MIT"
] | null | null | null | import numpy as np
import random
import copy
from collections import namedtuple, deque
from nnmodels_reacher import Actor, Critic
from replay_buffer import ReplayBuffer
import torch
import torch.nn.functional as F
import torch.optim as optim
import os
from config_settings import Args
# %load_ext autoreload
# %autorelo... | 44.607143 | 120 | 0.640112 |
e8c283acc3b8fe8a32fe130368afde6fccb40d4e | 10,582 | py | Python | python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_split.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_split.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_split.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-12-09T08:59:17.000Z | 2021-12-09T08:59:17.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 42.159363 | 85 | 0.460404 |
e4bd32f256917211ba20f6cf259c819461f5fe50 | 2,788 | py | Python | conftest.py | sab0tag/python_training_mantis | 161c1994e8c27ff8ede510da0054abdce978b9cd | [
"Apache-2.0"
] | null | null | null | conftest.py | sab0tag/python_training_mantis | 161c1994e8c27ff8ede510da0054abdce978b9cd | [
"Apache-2.0"
] | null | null | null | conftest.py | sab0tag/python_training_mantis | 161c1994e8c27ff8ede510da0054abdce978b9cd | [
"Apache-2.0"
] | null | null | null | import pytest
import json
import os.path
from fixture.application import Application
import ftputil
fixture = None
target = None
def loadconfig(file):
global target
if target is None:
config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), file)
with open(config_file) as f:
... | 32.418605 | 118 | 0.668938 |
9e362d810a17a7ba7ad101e7816ee5145c392aac | 709 | py | Python | app/controllers/overlay_controller.py | namuan/task-rider | 4474bb1acde98a489f52834ad3b9705f3f6e7034 | [
"MIT"
] | null | null | null | app/controllers/overlay_controller.py | namuan/task-rider | 4474bb1acde98a489f52834ad3b9705f3f6e7034 | [
"MIT"
] | null | null | null | app/controllers/overlay_controller.py | namuan/task-rider | 4474bb1acde98a489f52834ad3b9705f3f6e7034 | [
"MIT"
] | null | null | null | from app.widgets.overlay_widget import Overlay
class OverlayController:
def __init__(self, parent, app):
self.parent = parent
self.app = app
self.overlay = Overlay(self.parent.lst_tasks)
self.overlay.hide()
# app events
self.app.data.app_events.timer_started.conne... | 27.269231 | 76 | 0.675599 |
49e8b29bc57067aaf84fe05308cdf2921994fa52 | 683 | py | Python | mymoney/accounts/models.py | ychab/mymoney-server | 40dc9fdd08b3561287a9153342b25c58de8ad8ce | [
"BSD-3-Clause"
] | 6 | 2015-12-11T13:36:27.000Z | 2018-10-17T03:08:15.000Z | mymoney/accounts/models.py | ychab/mymoney-server | 40dc9fdd08b3561287a9153342b25c58de8ad8ce | [
"BSD-3-Clause"
] | 2 | 2016-06-12T12:42:47.000Z | 2017-12-12T14:05:14.000Z | mymoney/accounts/models.py | ychab/mymoney-server | 40dc9fdd08b3561287a9153342b25c58de8ad8ce | [
"BSD-3-Clause"
] | 1 | 2022-02-21T21:20:51.000Z | 2022-02-21T21:20:51.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
from mymoney.core.utils.currencies import get_currencies
class Account(models.Model):
"""
For the moment, a bank account is a singleton.
"""
label = models.CharField(max_length=255, verbose_name=_('Label'))
balan... | 23.551724 | 69 | 0.647145 |
19e4efc505283a5275f9c45527dc2163a25e0817 | 35,508 | py | Python | src/q-learning-pong-ai-v3.5.py | KumarUniverse/pong-ai | 719d85fc62a206ecc4e4453e7222912274299605 | [
"MIT"
] | null | null | null | src/q-learning-pong-ai-v3.5.py | KumarUniverse/pong-ai | 719d85fc62a206ecc4e4453e7222912274299605 | [
"MIT"
] | null | null | null | src/q-learning-pong-ai-v3.5.py | KumarUniverse/pong-ai | 719d85fc62a206ecc4e4453e7222912274299605 | [
"MIT"
] | null | null | null | # A Q learning Pong AI agent built using Python.
import pyglet
from pyglet import shapes
from pyglet import text
import math
import random
import time
#import multiprocessing
import matplotlib.pyplot as plt
import os
import pickle
# Global variables
DIRECTION = {"IDLE": 0, "UP": 1, "DOWN": 2, "LEFT": 3, "RIGHT": 4}
... | 46.234375 | 138 | 0.594289 |
e7a900a88030cd76a15ce20676fa0bcb0b34607a | 223 | py | Python | __init__.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | __init__.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | __init__.py | aroraumang/email-queue-1 | 1770bda5110b12a24cedeef03e083269e9d9ad46 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
__init__.py
"""
from trytond.pool import Pool
from .email_queue import EmailQueue
def register():
Pool.register(
EmailQueue,
module='email_queue', type_='model'
)
| 13.9375 | 43 | 0.609865 |
4b90bca90ff89406b009615cfd569a3cd95e66b0 | 8,573 | py | Python | djangoproject/settings/docker.py | Vibhu-Agarwal/djangoproject.com | 1382ed115536dcd789eae9825ba746ba72271c4b | [
"BSD-3-Clause"
] | 2 | 2019-09-26T05:47:56.000Z | 2019-09-26T08:19:03.000Z | djangoproject/settings/docker.py | Vibhu-Agarwal/djangoproject.com | 1382ed115536dcd789eae9825ba746ba72271c4b | [
"BSD-3-Clause"
] | 11 | 2020-06-06T00:57:10.000Z | 2022-03-12T00:07:58.000Z | djangoproject/settings/docker.py | Vibhu-Agarwal/djangoproject.com | 1382ed115536dcd789eae9825ba746ba72271c4b | [
"BSD-3-Clause"
] | 3 | 2021-02-09T12:02:56.000Z | 2021-08-13T03:35:05.000Z | # Settings for www.djangoproject.com
import os
from pathlib import Path
# Utilities
PROJECT_PACKAGE = Path(__file__).resolve().parent.parent
# The full path to the repository root.
BASE_DIR = PROJECT_PACKAGE.parent
data_dir_key = 'DJANGOPROJECT_DATA_DIR'
DATA_DIR = Path(os.environ[data_dir_key]) if data_dir_key in o... | 27.044164 | 101 | 0.672343 |
b88392820e6e6b8bfbd47b29aabe04e0b335c0ae | 3,438 | py | Python | util/clean.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | util/clean.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | util/clean.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | '''
clean.py
Description: Performs extensive tweet cleaning procedures including removing
html character codes, links, separating sentences, and fixing ascii.
Copyright (c) 2016, Manan Shah. All rights reserved. Redistribution and use in
source and binary forms, with or without modification, are not permitted without... | 30.696429 | 134 | 0.633799 |
4dee67961f0cfb8e42892a8b6f1b01bbec0b9055 | 1,737 | py | Python | zerver/webhooks/codeship/view.py | noabenefraim/zulip | 708b5e12353513911c2cb8cad35db699a48ea860 | [
"Apache-2.0"
] | 4 | 2020-09-26T17:46:27.000Z | 2021-06-24T16:56:17.000Z | zerver/webhooks/codeship/view.py | noabenefraim/zulip | 708b5e12353513911c2cb8cad35db699a48ea860 | [
"Apache-2.0"
] | 1 | 2016-07-16T16:54:33.000Z | 2016-07-16T16:54:33.000Z | zerver/webhooks/codeship/view.py | noabenefraim/zulip | 708b5e12353513911c2cb8cad35db699a48ea860 | [
"Apache-2.0"
] | 1 | 2020-11-26T14:09:56.000Z | 2020-11-26T14:09:56.000Z | # Webhooks for external integrations.
from typing import Any, Dict
from django.http import HttpRequest, HttpResponse
from zerver.decorator import webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhoo... | 34.058824 | 104 | 0.755901 |
9ac1e938cbfcc013ad82582f3f83ee8a80660614 | 3,114 | py | Python | tests/test_dist.py | loricsstudios/python-semantic-release | 93f28b15c972e0b2a43c5cbe7ab98cbc747bb9b7 | [
"MIT"
] | null | null | null | tests/test_dist.py | loricsstudios/python-semantic-release | 93f28b15c972e0b2a43c5cbe7ab98cbc747bb9b7 | [
"MIT"
] | null | null | null | tests/test_dist.py | loricsstudios/python-semantic-release | 93f28b15c972e0b2a43c5cbe7ab98cbc747bb9b7 | [
"MIT"
] | null | null | null | from semantic_release.dist import build_dists, should_build, should_remove_dist, remove_dists
from . import pytest
@pytest.mark.parametrize(
"commands",
["sdist bdist_wheel", "sdist", "bdist_wheel", "sdist bdist_wheel custom_cmd"],
)
def test_build_command(mocker, commands):
mocker.patch("semantic_releas... | 28.309091 | 93 | 0.51413 |
e625500a33c42da6be01e41bc75f50a774228ecc | 900 | py | Python | libraries/botbuilder-azure/botbuilder/azure/__init__.py | Fl4v/botbuilder-python | 4003d713beb8fb986a01cfd11632eabc65858618 | [
"MIT"
] | 388 | 2019-05-07T15:53:21.000Z | 2022-03-28T20:29:46.000Z | libraries/botbuilder-azure/botbuilder/azure/__init__.py | Fl4v/botbuilder-python | 4003d713beb8fb986a01cfd11632eabc65858618 | [
"MIT"
] | 1,286 | 2019-05-07T23:38:19.000Z | 2022-03-31T10:44:16.000Z | libraries/botbuilder-azure/botbuilder/azure/__init__.py | Fl4v/botbuilder-python | 4003d713beb8fb986a01cfd11632eabc65858618 | [
"MIT"
] | 168 | 2019-05-14T20:23:25.000Z | 2022-03-16T06:49:14.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------------... | 32.142857 | 80 | 0.644444 |
0914ebbb45a3088d755a3b310dc03568b57a7d8e | 23,589 | py | Python | datasets/common_voice/common_voice.py | yazdanbakhsh/datasets | c81e353cffa5a631847bd9cdc106806ec88fe6fe | [
"Apache-2.0"
] | null | null | null | datasets/common_voice/common_voice.py | yazdanbakhsh/datasets | c81e353cffa5a631847bd9cdc106806ec88fe6fe | [
"Apache-2.0"
] | null | null | null | datasets/common_voice/common_voice.py | yazdanbakhsh/datasets | c81e353cffa5a631847bd9cdc106806ec88fe6fe | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | 31.161162 | 292 | 0.514604 |
517047f73c4cf8c74006afd0adac0bc9ff5c86e4 | 2,930 | py | Python | synthesis/evaluation/visual.py | myrthewouters/synthetic_data_generation | b64189fcb8cc4fbba9f307dcfd7d8301e7a09da1 | [
"MIT"
] | null | null | null | synthesis/evaluation/visual.py | myrthewouters/synthetic_data_generation | b64189fcb8cc4fbba9f307dcfd7d8301e7a09da1 | [
"MIT"
] | null | null | null | synthesis/evaluation/visual.py | myrthewouters/synthetic_data_generation | b64189fcb8cc4fbba9f307dcfd7d8301e7a09da1 | [
"MIT"
] | null | null | null | """Module with functions for visualizing the difference between datasets"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from lifelines import KaplanMeierFitter
from synthesis.evaluation import metrics
def plot_feature_distances(x1, x2, labels=None):
x1 = x1.copy()... | 33.295455 | 115 | 0.63413 |
2780bdefaa1b43d4f36384587543524302924bd3 | 5,957 | py | Python | src/global_capitalization_system.py | phseiff/gender-render | 51db02193b46b38284290c4f5bde500208bf1605 | [
"MIT"
] | 24 | 2021-01-08T00:32:50.000Z | 2022-03-06T11:20:26.000Z | src/global_capitalization_system.py | phseiff/gender-render | 51db02193b46b38284290c4f5bde500208bf1605 | [
"MIT"
] | 6 | 2021-01-08T00:19:25.000Z | 2021-03-22T16:27:40.000Z | src/global_capitalization_system.py | phseiff/gender-render | 51db02193b46b38284290c4f5bde500208bf1605 | [
"MIT"
] | null | null | null | """
Implementation of the *global capitalization system* (a concept explained in-depth in the specification), which
analyses and understands capitalization of a tag's context value, stores it into a special section of the tag, and
re-applies said capitalization to the value the tag is rendered to.
The types of capita... | 47.277778 | 120 | 0.684573 |
00eee4b2d78240cbe6ebd532b7e145ecada1a6e4 | 1,147 | py | Python | sites/engadget.py | callback-demons/callback_news_collectors | 0361c0101c782c233cc1c4dd615fbe0697bee79b | [
"MIT"
] | 1 | 2020-06-13T23:07:46.000Z | 2020-06-13T23:07:46.000Z | sites/engadget.py | callback-demons/callback_news_collectors | 0361c0101c782c233cc1c4dd615fbe0697bee79b | [
"MIT"
] | 1 | 2021-03-31T19:49:58.000Z | 2021-03-31T19:49:58.000Z | sites/engadget.py | callback-demons/callback-news-collectors | 0361c0101c782c233cc1c4dd615fbe0697bee79b | [
"MIT"
] | null | null | null | from html2text import html2text
import requests
from bs4 import BeautifulSoup
def extract(url):
print('Engadget extract {}'.format(url))
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html5lib')
article = soup.find('article', {'class': 'c-gray-1'})
content_blocks = article.find... | 33.735294 | 98 | 0.614647 |
36a7420d739f96dd63bd0fd3bb16547a5c968fdc | 6,656 | py | Python | examples/script_eBGP.py | netcloudag/AciL3outModular | fb8e887bbed37e8458b4cad31eb4f8aebd256c2f | [
"MIT"
] | 1 | 2020-06-04T14:02:36.000Z | 2020-06-04T14:02:36.000Z | examples/script_eBGP.py | netcloud/AciL3outModular | fb8e887bbed37e8458b4cad31eb4f8aebd256c2f | [
"MIT"
] | null | null | null | examples/script_eBGP.py | netcloud/AciL3outModular | fb8e887bbed37e8458b4cad31eb4f8aebd256c2f | [
"MIT"
] | null | null | null | # ==============================================================================
from L3Out import ModularL3Out
from configparser import ConfigParser
import os
import sys
import requests
import json
import openpyxl
import warnings
import urllib3
warnings.filterwarnings("ignore", category=DeprecationWarning)
urllib3.dis... | 35.593583 | 118 | 0.565805 |
7fe798aa4817f8076bce09d62d9dac41e9a91ef3 | 1,665 | py | Python | podcast_convert/config.py | MikeDacre/m4a_to_mp3_podcast | 87071a2787d887e23e6f1602c21340128f35e33c | [
"MIT"
] | null | null | null | podcast_convert/config.py | MikeDacre/m4a_to_mp3_podcast | 87071a2787d887e23e6f1602c21340128f35e33c | [
"MIT"
] | null | null | null | podcast_convert/config.py | MikeDacre/m4a_to_mp3_podcast | 87071a2787d887e23e6f1602c21340128f35e33c | [
"MIT"
] | null | null | null | """
Get podcast config info.
Created: 2016-07-04 13:02
Last modified: 2016-02-04 13:45
"""
import os
try:
import configparser as cp
except ImportError:
import ConfigParsers as cp
REQUIRED_CONFIG = {'url': 'The URL of the initial feed',
'folder': 'The folder to write to'}
# Python2/... | 28.220339 | 76 | 0.599399 |
f1d960654fbad3aef9c0fe266b23c8479ccc6b12 | 1,111 | py | Python | test/test_variable_set_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_variable_set_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_variable_set_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 27.097561 | 119 | 0.747975 |
962ff499f7459d5d003128c8a99b1bd7b17acc8e | 14,318 | py | Python | src/application/modules/cb_index.py | maskayman/cbprometheus_python | ff1163512eac0449055113a130a2a216630666be | [
"Apache-2.0"
] | 9 | 2019-10-15T22:46:34.000Z | 2021-07-09T16:07:34.000Z | src/application/modules/cb_index.py | maskayman/cbprometheus_python | ff1163512eac0449055113a130a2a216630666be | [
"Apache-2.0"
] | 76 | 2019-10-08T17:14:24.000Z | 2021-03-04T21:03:22.000Z | src/application/modules/cb_index.py | maskayman/cbprometheus_python | ff1163512eac0449055113a130a2a216630666be | [
"Apache-2.0"
] | 8 | 2019-09-27T04:05:49.000Z | 2021-11-30T14:07:31.000Z | import sys
from application import application
if sys.version_info[0] == 3:
from .cb_utilities import *
from . import cb_cluster, cb_bucket
else:
from cb_utilities import *
import cb_cluster, cb_bucket
class view():
def __init__(self):
self.methods = ["GET"]
self.name = "indexes"
... | 50.77305 | 193 | 0.377846 |
f20941658fabc42dbc3c196dfd98f0aa3438d08a | 19,511 | py | Python | Imbalanced-Class/Santander/train.py | Twinparadox/DeepLearning | 2746c22e987bb509eaa8257744f0d5248a1f1264 | [
"MIT"
] | null | null | null | Imbalanced-Class/Santander/train.py | Twinparadox/DeepLearning | 2746c22e987bb509eaa8257744f0d5248a1f1264 | [
"MIT"
] | null | null | null | Imbalanced-Class/Santander/train.py | Twinparadox/DeepLearning | 2746c22e987bb509eaa8257744f0d5248a1f1264 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 28 19:14:22 2020
@author: nww73
"""
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import warnings
import gc
import os
warnings.filterwarnings('ignore')
from datetime import datetime
from sklearn.feature_selection import Vari... | 37.449136 | 118 | 0.649582 |
148f187374be8779d5ef3799014bc600678117c5 | 1,240 | py | Python | professionnel/migrations/0007_auto_20200915_0205.py | john591/m243 | 8603be4a3a931fc8689d2f2ba11748841d7a60ce | [
"MIT"
] | null | null | null | professionnel/migrations/0007_auto_20200915_0205.py | john591/m243 | 8603be4a3a931fc8689d2f2ba11748841d7a60ce | [
"MIT"
] | null | null | null | professionnel/migrations/0007_auto_20200915_0205.py | john591/m243 | 8603be4a3a931fc8689d2f2ba11748841d7a60ce | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-09-15 00:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('professionnel', '0006_auto_20200915_0141'),
]
operations = [
migrations.AlterField(
model_name='userprofil',
... | 42.758621 | 544 | 0.604839 |
7f150d0ab1181896060906d8b63dae060fd9847a | 389 | py | Python | openstack_dashboard/enabled/_1330_project_snapshots_panel.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | 930 | 2015-01-04T08:06:03.000Z | 2022-03-13T18:47:13.000Z | openstack_dashboard/enabled/_1330_project_snapshots_panel.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | 106 | 2019-01-18T03:06:55.000Z | 2019-11-29T05:06:18.000Z | openstack_dashboard/enabled/_1330_project_snapshots_panel.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | 1,040 | 2015-01-01T18:48:28.000Z | 2022-03-19T08:35:18.000Z | # The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'snapshots'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'volumes'
# Python panel class of the PANEL to be added.
ADD_PANEL ... | 38.9 | 78 | 0.781491 |
633050517350d6a858ee5124aa7e5eec8b2f1a8a | 193 | py | Python | small-problems/fibonacci-sequence/fib2.py | Prateek2506/classic-cs-problems | fa0e3c86fb7cd478888bb90006f7379cc6c7a38b | [
"MIT"
] | null | null | null | small-problems/fibonacci-sequence/fib2.py | Prateek2506/classic-cs-problems | fa0e3c86fb7cd478888bb90006f7379cc6c7a38b | [
"MIT"
] | null | null | null | small-problems/fibonacci-sequence/fib2.py | Prateek2506/classic-cs-problems | fa0e3c86fb7cd478888bb90006f7379cc6c7a38b | [
"MIT"
] | null | null | null | count = 0
def fib2(n: int) -> int:
global count
count = count + 1
if n < 2:
return n
return fib2(n-1) + fib2(n-2)
print(fib2(20))
print('number of calls = ', count)
| 13.785714 | 34 | 0.544041 |
171d4e53f0b0d384a2e40f178e47e2e0fbf96e2f | 109 | py | Python | tech_gallery_bot/commands/__init__.py | ciandt/tech-gallery-chat-bot | f4c83ab626d829b8c8ce6dd549156224a034aa6d | [
"MIT"
] | 1 | 2020-02-19T14:03:25.000Z | 2020-02-19T14:03:25.000Z | tech_gallery_bot/commands/__init__.py | ciandt/tech-gallery-chat-bot | f4c83ab626d829b8c8ce6dd549156224a034aa6d | [
"MIT"
] | null | null | null | tech_gallery_bot/commands/__init__.py | ciandt/tech-gallery-chat-bot | f4c83ab626d829b8c8ce6dd549156224a034aa6d | [
"MIT"
] | 1 | 2020-03-31T15:11:35.000Z | 2020-03-31T15:11:35.000Z | """Commands"""
from .about import About
from .me import Me
from .skills import Skills
from .user import User
| 18.166667 | 26 | 0.752294 |
e933514cb9d5359a4a25da02dbb74ac839480921 | 5,397 | py | Python | tests/webkit_time.py | sydp/dfdatetime | fbb4ed335861a99e0c87802c51e9d1d58c276b98 | [
"Apache-2.0"
] | 17 | 2016-04-12T16:26:14.000Z | 2022-02-18T22:27:36.000Z | tests/webkit_time.py | sydp/dfdatetime | fbb4ed335861a99e0c87802c51e9d1d58c276b98 | [
"Apache-2.0"
] | 149 | 2016-03-10T22:20:13.000Z | 2022-02-19T08:47:56.000Z | tests/webkit_time.py | sydp/dfdatetime | fbb4ed335861a99e0c87802c51e9d1d58c276b98 | [
"Apache-2.0"
] | 15 | 2016-03-10T06:44:27.000Z | 2022-02-07T12:53:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the WebKit time implementation."""
import decimal
import unittest
from dfdatetime import webkit_time
class WebKitTimeEpochTest(unittest.TestCase):
"""Tests for the WebKit time epoch."""
def testInitialize(self):
"""Tests the __init__ function."""
... | 37.22069 | 80 | 0.780248 |
2d2a57955d8637f7ef74b9cca52cab6c461dbe9a | 6,129 | py | Python | memrise/core/modules/actions/db_actions.py | kolesnikov-bn/django-memrise-scraper | 00dddb53f04ce2f794fe3611ea97190ef8265079 | [
"MIT"
] | null | null | null | memrise/core/modules/actions/db_actions.py | kolesnikov-bn/django-memrise-scraper | 00dddb53f04ce2f794fe3611ea97190ef8265079 | [
"MIT"
] | null | null | null | memrise/core/modules/actions/db_actions.py | kolesnikov-bn/django-memrise-scraper | 00dddb53f04ce2f794fe3611ea97190ef8265079 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import List, ClassVar, TYPE_CHECKING
from memrise.core.helpers import generate_custom_id
from memrise.core.modules.actions.base import Actions
from memrise.models import Course, Level, Word
if TYPE_CHECKING:
from memrise.core.domains.entities import CourseEntity, Le... | 32.089005 | 110 | 0.559635 |
091baa76ea791f3f441bd6d1b45bbaacde8e8567 | 696 | py | Python | pytests/test_edit_deployment.py | gozynta/jmespath_demo | 82e190c6bb426ea23d6975f0d14b93ec0881487d | [
"Apache-2.0"
] | null | null | null | pytests/test_edit_deployment.py | gozynta/jmespath_demo | 82e190c6bb426ea23d6975f0d14b93ec0881487d | [
"Apache-2.0"
] | null | null | null | pytests/test_edit_deployment.py | gozynta/jmespath_demo | 82e190c6bb426ea23d6975f0d14b93ec0881487d | [
"Apache-2.0"
] | null | null | null | import pathlib
import edit_deployment
import yaml
SCRIPT_DIR = pathlib.Path(__file__).parent.absolute()
def test_without_jmespath():
# Load fixture
with open(SCRIPT_DIR.joinpath("edited_deployment.yaml")) as yml:
test_deployment = yaml.safe_load(yml)
# Run function and compare results
deplo... | 25.777778 | 68 | 0.742816 |
6ef89f8d7501338bf3b33d0411be52169724b733 | 6,444 | py | Python | Tirex/__init__.py | hjanetzek/TirexStache | f2f6e4a856a7c0d37db00470c6531ac897d1ff81 | [
"BSD-3-Clause"
] | 2 | 2016-10-30T19:00:58.000Z | 2017-08-14T16:03:31.000Z | Tirex/__init__.py | hjanetzek/TirexStache | f2f6e4a856a7c0d37db00470c6531ac897d1ff81 | [
"BSD-3-Clause"
] | null | null | null | Tirex/__init__.py | hjanetzek/TirexStache | f2f6e4a856a7c0d37db00470c6531ac897d1ff81 | [
"BSD-3-Clause"
] | null | null | null | '''
Tirex/TileStache backend
based on https://github.com/mdaines/cover/blob/master/vendor/tirex_backend.rb
@author: Hannes Janetzek
'''
import os
import socket
import pipes
import signal
import sys
import logging
import re
import time
import tempfile
# This must match 'metatile_columns/rows' in tirex.conf
# and ... | 31.281553 | 107 | 0.53802 |
ef2f269b6538a65d43e2b33ece4ebb7db49d9d47 | 1,835 | py | Python | test/mixed_test.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | test/mixed_test.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | test/mixed_test.py | lechat/multiconf | c41cbe9ab3fb768a7d4dbd7b9f5d983b1306bde3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from .. import ConfigRoot, ConfigItem, ConfigBuilder
from ..decorators import nested_repeatables, named_as, repeat, required
from ..envs import EnvFactory
ef = EnvFactory()
prod = ef.Env(... | 28.671875 | 80 | 0.639782 |
4c1ed1c960a58718923a28c8bc489d0e4f374927 | 153 | py | Python | c__65.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | c__65.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | c__65.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1)+fib(n-2)
x = input()
print(fib(x))
| 12.75 | 32 | 0.431373 |
f9d8d4419fb1a4e65d930afdb22c6fe5a3e686c2 | 8,050 | py | Python | util.py | wilkice/PyTorch-1.1.0-YOLO-V3 | e3bb341cc533f5f754685d442e8937289e133ad0 | [
"MIT"
] | null | null | null | util.py | wilkice/PyTorch-1.1.0-YOLO-V3 | e3bb341cc533f5f754685d442e8937289e133ad0 | [
"MIT"
] | null | null | null | util.py | wilkice/PyTorch-1.1.0-YOLO-V3 | e3bb341cc533f5f754685d442e8937289e133ad0 | [
"MIT"
] | null | null | null | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
def predict_transform(prediction, inp_dim, anchors, num_classes, CUDA=True):
batch_size = prediction.size(0)
stride = inp_dim // prediction.size(2)
grid_size = in... | 33.40249 | 87 | 0.593416 |
570767e7d972c186d373ba53acbded69d32398e0 | 17,148 | py | Python | pgAdmin/browser/server_groups/servers/databases/external_tables/tests/test_external_tables_view.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | pgAdmin/browser/server_groups/servers/databases/external_tables/tests/test_external_tables_view.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | pgAdmin/browser/server_groups/servers/databases/external_tables/tests/test_external_tables_view.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
import os
import ... | 39.330275 | 78 | 0.542337 |
66cefe11712ab1e13c38f65ff5910bda5711e88b | 17,546 | py | Python | intersight/models/boot_precision_policy.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/boot_precision_policy.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/boot_precision_policy.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-262
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class BootPrecisionPolicy(object):
"""
NOTE: This c... | 30.251724 | 323 | 0.617292 |
2f41f14740e69380898faf433f71501a12fed254 | 11,571 | py | Python | mux_python/api/exports_api.py | moaazsidat/mux-python | 3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c | [
"MIT"
] | null | null | null | mux_python/api/exports_api.py | moaazsidat/mux-python | 3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c | [
"MIT"
] | 5 | 2021-09-15T05:46:50.000Z | 2021-09-21T01:13:41.000Z | mux_python/api/exports_api.py | moaazsidat/mux-python | 3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Mux API
Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501
The version of the OpenAPI document: v1
Contact: devex@mux.com
Gener... | 40.317073 | 204 | 0.598997 |
c499582726cd6d9d3ec77fa891123677f1eeadb6 | 21 | py | Python | pyopt/__init__.py | vndee/python-options | f518ec4e13c529a12a997a9bddbb54f86e21b55d | [
"MIT"
] | 2 | 2020-11-19T03:17:27.000Z | 2020-11-19T10:19:37.000Z | option/__init__.py | zlasd/novelS | 44905ec0477806f8aee377e098d4311d65aabd18 | [
"MIT"
] | null | null | null | option/__init__.py | zlasd/novelS | 44905ec0477806f8aee377e098d4311d65aabd18 | [
"MIT"
] | 1 | 2020-11-19T10:11:43.000Z | 2020-11-19T10:11:43.000Z | from .option import * | 21 | 21 | 0.761905 |
0521a69c5f80ee2674694001f4e12f435eadafc8 | 3,602 | py | Python | python/tvm/ndarray.py | mli/tvm | 814b46dccb3c340be7611d113a303a546f7b2b2a | [
"Apache-2.0"
] | 1 | 2018-01-30T01:38:38.000Z | 2018-01-30T01:38:38.000Z | python/tvm/ndarray.py | mli/tvm | 814b46dccb3c340be7611d113a303a546f7b2b2a | [
"Apache-2.0"
] | null | null | null | python/tvm/ndarray.py | mli/tvm | 814b46dccb3c340be7611d113a303a546f7b2b2a | [
"Apache-2.0"
] | 1 | 2020-06-11T08:04:06.000Z | 2020-06-11T08:04:06.000Z | """TVM Runtime NDArray API.
tvm.ndarray provides a minimum runtime array API to test
the correctness of the program.
"""
# pylint: disable=invalid-name,unused-import
from __future__ import absolute_import as _abs
import numpy as _np
from ._ffi.ndarray import TVMContext, TVMType, NDArrayBase
from ._ffi.ndarray import ... | 19.576087 | 87 | 0.616602 |
ba2c7bb6668a23f47291b1a1279e5c31da9bcdac | 1,008 | py | Python | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706150854.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706150854.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706150854.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Map Filter Zip List Comprehensions
Higher order functions
A function that takes a function as a parameter and/or returns a function as it's return value
Example: sorted
map _
|
-- modern alternative -> list comprehensions and generator expressions
... | 22.4 | 120 | 0.625992 |
786d708057ae7d806f497088a2b8cc8df49aa7aa | 9,769 | py | Python | tests/test_oauth2client_file.py | manikanta-kondeti/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | 1 | 2015-05-14T00:06:51.000Z | 2015-05-14T00:06:51.000Z | tests/test_oauth2client_file.py | moughamir/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | 1 | 2016-06-23T16:33:52.000Z | 2016-06-23T16:33:52.000Z | tests/test_oauth2client_file.py | moughamir/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.4
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 30.151235 | 79 | 0.717883 |
c0d7000a540d5edad85c548cdaa4e334db504c72 | 19,112 | py | Python | tests/framework/hooks/test_context_hooks.py | avichalbadaya/kedro | a303243947f4da9684ebb852192bdd73acb6ad24 | [
"Apache-2.0"
] | 1 | 2020-08-11T00:33:45.000Z | 2020-08-11T00:33:45.000Z | tests/framework/hooks/test_context_hooks.py | markoke/kedro | 1cbd3e14aaf383d7d44946a20abb57bab7e4ce9c | [
"Apache-2.0"
] | 1 | 2021-05-11T19:22:42.000Z | 2021-05-11T19:22:42.000Z | tests/framework/hooks/test_context_hooks.py | avichalbadaya/kedro | a303243947f4da9684ebb852192bdd73acb6ad24 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... | 35.06789 | 100 | 0.63536 |
990f87e0dcfede9ade52f7feb7e33cb925b53cfe | 18,456 | py | Python | fairseq/modules/transformer_layer.py | hamsik1223/fairseq | 13164c38b0aab4269f8775a2506e2b60f5909114 | [
"MIT"
] | null | null | null | fairseq/modules/transformer_layer.py | hamsik1223/fairseq | 13164c38b0aab4269f8775a2506e2b60f5909114 | [
"MIT"
] | null | null | null | fairseq/modules/transformer_layer.py | hamsik1223/fairseq | 13164c38b0aab4269f8775a2506e2b60f5909114 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Dict, List, Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import utils
from fai... | 41.755656 | 101 | 0.624675 |
8f18368740403a944ed29ef774492d941296a7c7 | 18,093 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 43.702899 | 232 | 0.681092 |
15a4f6a789ac7fb86ea1e16c988246d371720460 | 13,735 | py | Python | gneiss/util.py | biocore/gneiss | 5d253d68ef14fa82e26b5f74118ff170f1990585 | [
"BSD-3-Clause"
] | 48 | 2016-10-26T21:10:18.000Z | 2022-03-12T03:25:04.000Z | gneiss/util.py | biocore/gneiss | 5d253d68ef14fa82e26b5f74118ff170f1990585 | [
"BSD-3-Clause"
] | 287 | 2016-06-30T00:33:43.000Z | 2022-03-02T03:44:04.000Z | gneiss/util.py | biocore/gneiss | 5d253d68ef14fa82e26b5f74118ff170f1990585 | [
"BSD-3-Clause"
] | 27 | 2016-06-30T00:40:25.000Z | 2021-11-09T14:13:36.000Z | """
Utility functions (:mod:`gneiss.util`)
======================================
.. currentmodule:: gneiss.util
This module contains helper functions for aligning metadata tables,
contingency tables and trees.
Functions
---------
.. autosummary::
:toctree: generated/
match
match_tips
rename_internal_n... | 29.411135 | 79 | 0.62024 |
7ba60b921e095c2bbc587414fc697746618645fb | 1,378 | py | Python | chapter1/3n+1/3n+1.py | OrghoN/programmingChallengesUVa | 0704a37609714ce8fbce11c255fa1c208115689d | [
"MIT"
] | null | null | null | chapter1/3n+1/3n+1.py | OrghoN/programmingChallengesUVa | 0704a37609714ce8fbce11c255fa1c208115689d | [
"MIT"
] | null | null | null | chapter1/3n+1/3n+1.py | OrghoN/programmingChallengesUVa | 0704a37609714ce8fbce11c255fa1c208115689d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
global cache
cache = [0] * 1000000
def cyclesFastCache(number):
cycles = 1
numbers = []
while number > 1:
if cache[number] != 0:
for index, num in enumerate(numbers):
cache[num] = cache[number] + len(numbers) - index + 1
re... | 22.590164 | 71 | 0.546444 |
f95b0720021f0b313bf0128451f9d01d43ebe5f6 | 6,665 | py | Python | notify_sdk/model/health_assessment/health_assessment_rule_version_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | notify_sdk/model/health_assessment/health_assessment_rule_version_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | notify_sdk/model/health_assessment/health_assessment_rule_version_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: health_assessment_rule_version.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
f... | 56.008403 | 865 | 0.812153 |
0377295e3bc51da268998e59e051fb496fd099ad | 10,942 | py | Python | storage/team17/Estructura_ArbolB.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | null | null | null | storage/team17/Estructura_ArbolB.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | null | null | null | storage/team17/Estructura_ArbolB.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | null | null | null | # File: B Tree Structure
# License: Released under MIT License
# Notice: Copyright (c) 2020 TytusDB Team
import os
# ------------- CREACION DE LOS NODOS -------------#
class NodoB:
def __init__(self, grado): #INICIALIZAR NODO
self.llaves = []
self.padre = None
self.hijos = []
... | 31.715942 | 151 | 0.497258 |
1b09f75771ea9be531db48aab3c804d21b7db7eb | 11,293 | py | Python | examples/ex15.py | mfem/PyMFEM | b7b7c3d3de1082eac1015e3a313cf513db06fd7b | [
"BSD-3-Clause"
] | 93 | 2017-03-01T16:45:33.000Z | 2022-03-27T22:10:33.000Z | examples/ex15.py | GabrielJie/PyMFEM | fa654447ac6819c5aa0341397b91a299f4ce5492 | [
"BSD-3-Clause"
] | 64 | 2017-03-15T21:47:31.000Z | 2022-03-31T23:59:00.000Z | examples/ex15.py | GabrielJie/PyMFEM | fa654447ac6819c5aa0341397b91a299f4ce5492 | [
"BSD-3-Clause"
] | 32 | 2017-03-02T22:13:38.000Z | 2022-03-26T13:09:31.000Z | '''
MFEM example 15
How to run:
python <arguments>
Example of arguments:
ex15.py
ex15.py -o 1 -y 0.4
ex15.py -o 4 -y 0.1
ex15.py -n 5
ex15.py -p 1 -n 3
Other meshes:
ex15.py -m square-disc-nurbs.mesh
ex15.py -m disc-nurbs.mesh
ex15.py -m fichera.m... | 34.117825 | 81 | 0.635526 |
851dfa43090f410aea68d07d8df17b0273e3e853 | 2,782 | py | Python | utils/cv_sentlen_results.py | duanbiao-nlp/DESC_MOL-DDIE | add555a7136e4be13f369320fd694a9aae11eb4f | [
"MIT"
] | 14 | 2020-11-03T13:53:23.000Z | 2022-03-23T07:26:50.000Z | utils/cv_sentlen_results.py | duanbiao-nlp/DESC_MOL-DDIE | add555a7136e4be13f369320fd694a9aae11eb4f | [
"MIT"
] | 1 | 2022-02-09T09:56:39.000Z | 2022-02-09T09:56:39.000Z | utils/cv_sentlen_results.py | duanbiao-nlp/DESC_MOL-DDIE | add555a7136e4be13f369320fd694a9aae11eb4f | [
"MIT"
] | 4 | 2020-11-04T04:31:05.000Z | 2021-11-05T07:49:27.000Z | import sys
import os
import pickle
import statistics
import numpy as np
from metrics_ddie import ddie_compute_metrics
from scipy.special import softmax
from transformers import BertTokenizer
_, tsv_dir, cv_dir, k = sys.argv
k = int(k)
tokenizer = BertTokenizer.from_pretrained('/mnt/model/scibert_scivocab_uncased', d... | 31.258427 | 113 | 0.595255 |
763f1d8b60e4c9db3f2df63fb793e8973bc0c24a | 4,226 | py | Python | pymanopt/manifolds/positive_definite.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null | pymanopt/manifolds/positive_definite.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null | pymanopt/manifolds/positive_definite.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from pymanopt.manifolds.manifold import RiemannianSubmanifold
from pymanopt.tools.multi import (
multiexpm,
multilogm,
multiqr,
multisym,
multitransp,
)
class SymmetricPositiveDefinite(RiemannianSubmanifold):
"""Manifold of symmetric positive definite matrices.
Points ... | 31.774436 | 79 | 0.614056 |
52873ec2168c8a0c7d713b3189edb3abbb3602c3 | 2,381 | py | Python | drdown/appointments/urls.py | fga-gpp-mds/2018.1-Cris-Down | 3423374360105b06ac2c57a320bf2ee8deaa08a3 | [
"MIT"
] | 11 | 2018-03-11T01:21:43.000Z | 2018-06-19T21:51:33.000Z | drdown/appointments/urls.py | fga-gpp-mds/2018.1-Grupo12 | 3423374360105b06ac2c57a320bf2ee8deaa08a3 | [
"MIT"
] | 245 | 2018-03-13T19:07:14.000Z | 2018-07-07T22:46:00.000Z | drdown/appointments/urls.py | fga-gpp-mds/2018.1-Grupo12 | 3423374360105b06ac2c57a320bf2ee8deaa08a3 | [
"MIT"
] | 12 | 2018-08-24T13:26:04.000Z | 2021-03-27T16:28:22.000Z | from django.conf.urls import url
from drdown.appointments.views.view_appointment import (
AppointmentListView,
AppointmentCreateView,
AppointmentUpdateView,
AppointmentMonthArchiveView,
AppointmentUpdateStatusView,
AppointmentFromRequestCreateView,
)
from drdown.appointments.views.view_request i... | 26.455556 | 68 | 0.616128 |
fd1687f7539b1658fe752cd075a60ec7e20e5b21 | 5,156 | py | Python | fkie_node_manager/src/fkie_node_manager/editor/yaml_highlighter.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 194 | 2015-01-21T12:46:42.000Z | 2022-03-29T08:22:22.000Z | fkie_node_manager/src/fkie_node_manager/editor/yaml_highlighter.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 146 | 2015-01-13T23:02:24.000Z | 2022-03-23T05:54:02.000Z | fkie_node_manager/src/fkie_node_manager/editor/yaml_highlighter.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 103 | 2015-02-08T23:20:02.000Z | 2022-03-27T12:45:48.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko
# based on code of Timo Roehling
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * R... | 41.918699 | 116 | 0.67339 |
b94eb564d968ac85a04a1d9191b04daba4d3e127 | 3,142 | py | Python | swagger_client/models/delete_fleets_fleet_id_members_member_id_not_found.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | swagger_client/models/delete_fleets_fleet_id_members_member_id_not_found.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | swagger_client/models/delete_fleets_fleet_id_members_member_id_not_found.py | rseichter/bootini-star | a80258f01a05e4df38748b8cb47dfadabd42c20d | [
"MIT"
] | null | null | null | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DeleteFleetsFleetIdMembersMemberIdNotFound(object):
"... | 27.321739 | 99 | 0.574157 |
e007f455c9f147e015610e9d17125a02432f3926 | 17,994 | py | Python | tests/integration/sts/topology/base_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | tests/integration/sts/topology/base_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | tests/integration/sts/topology/base_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Ahmed El-Hassany
#
# 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 wri... | 39.634361 | 89 | 0.694843 |
2378e828acdc06e96075f80b4d479eb2f9609c90 | 260 | py | Python | psx/_dump_/25/_dump_ida_/overlay_3/set_vars.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 15 | 2018-06-28T01:11:25.000Z | 2021-09-27T15:57:18.000Z | psx/_dump_/25/_dump_ida_/overlay_3/set_vars.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-29T04:08:23.000Z | 2019-10-17T13:57:22.000Z | psx/_dump_/25/_dump_ida_/overlay_3/set_vars.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-28T01:11:34.000Z | 2020-05-23T09:21:48.000Z | del_items(0x800A0E14)
SetType(0x800A0E14, "char StrDate[12]")
del_items(0x800A0E20)
SetType(0x800A0E20, "char StrTime[9]")
del_items(0x800A0E2C)
SetType(0x800A0E2C, "char *Words[118]")
del_items(0x800A1004)
SetType(0x800A1004, "struct MONTH_DAYS MonDays[12]")
| 28.888889 | 52 | 0.792308 |
8b215a3e58508968d735b24e38eee0e3fe6db24d | 5,745 | py | Python | tftpy/TftpClient.py | pucgenie/tftpy | 40146f92fabe872b1d942bd7695cb2cde308ae4a | [
"MIT"
] | null | null | null | tftpy/TftpClient.py | pucgenie/tftpy | 40146f92fabe872b1d942bd7695cb2cde308ae4a | [
"MIT"
] | null | null | null | tftpy/TftpClient.py | pucgenie/tftpy | 40146f92fabe872b1d942bd7695cb2cde308ae4a | [
"MIT"
] | null | null | null | # vim: ts=4 sw=4 et ai:
# -*- coding: utf8 -*-
"""This module implements the TFTP Client functionality. Instantiate an
instance of the client, and then use its upload or download method. Logging is
performed via a standard logging object set in TftpShared."""
import types
import logging
from .TftpShared import *
from... | 49.525862 | 109 | 0.584334 |
9e762225da9ca9d3712266725ae137a7b263d362 | 156 | py | Python | Exercicios-Desafios python/Desafios/desafio019.py | ThiagoPereira232/python-curso-em-video-mundo01 | 9cecf3f91672ec5a1fa85ca5d018e158b0d31bae | [
"MIT"
] | null | null | null | Exercicios-Desafios python/Desafios/desafio019.py | ThiagoPereira232/python-curso-em-video-mundo01 | 9cecf3f91672ec5a1fa85ca5d018e158b0d31bae | [
"MIT"
] | null | null | null | Exercicios-Desafios python/Desafios/desafio019.py | ThiagoPereira232/python-curso-em-video-mundo01 | 9cecf3f91672ec5a1fa85ca5d018e158b0d31bae | [
"MIT"
] | null | null | null | import random
alunos = input('Digite os alunos separados por ; ').split(";")
escolhido = random.choice(alunos)
print(f'O aluno escolhido foi {escolhido}')
| 26 | 62 | 0.730769 |
0fde9497eb43844aa9202c7402fccf8be3ba3ef0 | 1,610 | py | Python | ccdproc/tests/pytest_fixtures.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | ccdproc/tests/pytest_fixtures.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | ccdproc/tests/pytest_fixtures.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function
import numpy as np
from astropy.tests.helper import pytest
from astropy import units as u
from astropy.utils import NumpyRNGContext
from ..ccddata import CCDData
# If additional pytest markers are defined the key in the dictionary below
# should be the name of the mar... | 27.288136 | 77 | 0.711801 |
084939578ee7787dc63d202219cddb044567601a | 637 | py | Python | thevoid/whispers/migrations/0002_auto_20180926_0203.py | CBR0MS/telematicEnvironment | 6b3130347cad06c6b3aa453010c91d9990bc9cb8 | [
"MIT"
] | null | null | null | thevoid/whispers/migrations/0002_auto_20180926_0203.py | CBR0MS/telematicEnvironment | 6b3130347cad06c6b3aa453010c91d9990bc9cb8 | [
"MIT"
] | 2 | 2020-06-05T19:00:38.000Z | 2021-06-10T20:51:00.000Z | thevoid/whispers/migrations/0002_auto_20180926_0203.py | cbroms/telematicEnvironment | 6b3130347cad06c6b3aa453010c91d9990bc9cb8 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.7 on 2018-09-26 02:03
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('whispers', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='whisper',
name='display_te... | 25.48 | 131 | 0.605965 |
1909ab484d482a8566794cbe612e4029f9d013d4 | 5,714 | py | Python | sdk/python/pulumi_azure_native/authorization/v20161201/get_policy_definition.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/authorization/v20161201/get_policy_definition.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/authorization/v20161201/get_policy_definition.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 34.215569 | 163 | 0.641232 |
d81251b788e15d60102454e6d8285e021a3b61cf | 9,491 | py | Python | Scripts/sims4communitylib/utils/sims/common_gender_utils.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 118 | 2019-08-31T04:33:18.000Z | 2022-03-28T21:12:14.000Z | Scripts/sims4communitylib/utils/sims/common_gender_utils.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 15 | 2019-12-05T01:29:46.000Z | 2022-02-18T17:13:46.000Z | Scripts/sims4communitylib/utils/sims/common_gender_utils.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 28 | 2019-09-07T04:11:05.000Z | 2022-02-07T18:31:40.000Z | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
from typing import Union
from sims.sim_info import SimInfo... | 46.072816 | 217 | 0.704035 |
107d460280d46044e03041a687e052a4f4899906 | 5,420 | py | Python | experimentalTest/marketing_nn.py | ProjetEtudeMLFI/TensorFI | 961a0205ec90935a238c58112e8119c34a70ba7c | [
"MIT"
] | null | null | null | experimentalTest/marketing_nn.py | ProjetEtudeMLFI/TensorFI | 961a0205ec90935a238c58112e8119c34a70ba7c | [
"MIT"
] | null | null | null | experimentalTest/marketing_nn.py | ProjetEtudeMLFI/TensorFI | 961a0205ec90935a238c58112e8119c34a70ba7c | [
"MIT"
] | null | null | null | #!/usr/bin/python
""" Neural Network.
A 2-Hidden Layers Fully Connected Neural Network (a.k.a Multilayer Perceptron)
implementation with TensorFlow. This example is using the MNIST database
of handwritten digits (http://yann.lecun.com/exdb/mnist/).
Links:
[MNIST Dataset](http://yann.lecun.com/exdb/mnist/).
Autho... | 30.971429 | 80 | 0.64428 |
7b2ce129be1bb99e2e28ab2868b52d70b370ea5c | 3,424 | py | Python | networkx/algorithms/approximation/tests/test_clique.py | rakschahsa/networkx | 6cac55b1064c3c346665f9281680fa3b66442ad0 | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/approximation/tests/test_clique.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/approximation/tests/test_clique.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | # test_clique.py - unit tests for the approximation.clique module
#
# Copyright 2015 NetworkX developers.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENSE.txt for more
# information.
"""Unit tests for the :mod:`networkx.algorithms.approximation.clique`
module.
"""
from __... | 28.533333 | 78 | 0.677862 |
9863f8c14b2fb40467535f328a3f02dfadb46f00 | 6,380 | py | Python | pynodegl-utils/pynodegl_utils/ui/gl_view.py | mrobertseidowsky-gpsw/node.gl.ci_test | e882d01fa9b91489b3325151c0c49052f6f04075 | [
"Apache-2.0"
] | null | null | null | pynodegl-utils/pynodegl_utils/ui/gl_view.py | mrobertseidowsky-gpsw/node.gl.ci_test | e882d01fa9b91489b3325151c0c49052f6f04075 | [
"Apache-2.0"
] | null | null | null | pynodegl-utils/pynodegl_utils/ui/gl_view.py | mrobertseidowsky-gpsw/node.gl.ci_test | e882d01fa9b91489b3325151c0c49052f6f04075 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 GoPro Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
#... | 30.526316 | 87 | 0.642633 |
c728e9af64770faa186b859b7dd1c18e24c1a590 | 1,695 | py | Python | setup.py | litecoinfinance/electrumx | 8f71fa565ba30f3f77855c00a85829d26eedbbf3 | [
"MIT"
] | null | null | null | setup.py | litecoinfinance/electrumx | 8f71fa565ba30f3f77855c00a85829d26eedbbf3 | [
"MIT"
] | null | null | null | setup.py | litecoinfinance/electrumx | 8f71fa565ba30f3f77855c00a85829d26eedbbf3 | [
"MIT"
] | 1 | 2021-08-05T09:04:08.000Z | 2021-08-05T09:04:08.000Z | import setuptools
version = '1.16.0'
setuptools.setup(
name='e-x',
version=version,
scripts=['electrumx_server', 'electrumx_rpc', 'electrumx_compact_history'],
python_requires='>=3.7',
install_requires=['aiorpcX[ws]>=0.18.5,<0.19', 'attrs',
'plyvel', 'pylru', 'aiohttp>=3.3,<4'... | 36.847826 | 79 | 0.575811 |
30e3a64bedf5d972327d7eefc2652153a242917f | 777 | py | Python | src/services/cached.py | BoaVaga/boavaga_server | 7d25a68832d3b9f4f5666d0a3d55c99025498511 | [
"MIT"
] | null | null | null | src/services/cached.py | BoaVaga/boavaga_server | 7d25a68832d3b9f4f5666d0a3d55c99025498511 | [
"MIT"
] | null | null | null | src/services/cached.py | BoaVaga/boavaga_server | 7d25a68832d3b9f4f5666d0a3d55c99025498511 | [
"MIT"
] | null | null | null | from pymemcache import serde, PooledClient
class Cached:
def __init__(self, host: str, port: int):
self.client = PooledClient((host, port), serde=serde.pickle_serde)
def get(self, group: str, key: str):
return self.client.get(self._gen_key_name(group, key))
def contains(self, group: str,... | 29.884615 | 74 | 0.649936 |
35c2109304af9356b1c37410f9830e5db6953259 | 602 | py | Python | tests.py | iSab01/deep-FinGAF | 688a4ea0860b25e15847d7fb0e0bd4ff6d7f22d0 | [
"MIT"
] | null | null | null | tests.py | iSab01/deep-FinGAF | 688a4ea0860b25e15847d7fb0e0bd4ff6d7f22d0 | [
"MIT"
] | null | null | null | tests.py | iSab01/deep-FinGAF | 688a4ea0860b25e15847d7fb0e0bd4ff6d7f22d0 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from DataGeneration.GramianAngularField import normalize, polar_encoding, make_gaf
def test_normalize():
x = np.arange(100)
x = normalize(x)
assert (max(x), min(x)) == (1, -1)
def test_polar_encoding():
x = np.array([1, -1, 0, 0.5])
time_stamp = np.array([0, 1, 2... | 28.666667 | 90 | 0.642857 |
8ba61bce3d0fe6d1377c618893ca5fb3ad407289 | 2,185 | py | Python | SelectConsortiumArchitecture_2Ssakuranetine/Scripts/EcPp3_individualTestFLYCOP_v0_generalized.py | ivanmm25/FLYCOPtools | 46e4b96d506e1e29e131f0d1b1cea6a7a10d6fdf | [
"MIT"
] | 1 | 2021-10-19T11:09:25.000Z | 2021-10-19T11:09:25.000Z | SelectConsortiumArchitecture_2Ssakuranetine/Scripts/EcPp3_individualTestFLYCOP_v0_generalized.py | ivanmm25/FLYCOPtools | 46e4b96d506e1e29e131f0d1b1cea6a7a10d6fdf | [
"MIT"
] | null | null | null | SelectConsortiumArchitecture_2Ssakuranetine/Scripts/EcPp3_individualTestFLYCOP_v0_generalized.py | ivanmm25/FLYCOPtools | 46e4b96d506e1e29e131f0d1b1cea6a7a10d6fdf | [
"MIT"
] | 1 | 2021-12-01T17:41:11.000Z | 2021-12-01T17:41:11.000Z | #!/usr/bin/python3
############ FLYCOP ############
# Author: Beatriz García-Jiménez, Iván Martín Martín
# April 2018, June 2021
################################
"""
INDIVIDUAL TEST FILE for repeated execution of the optimal configuration found through FLYCOP.
Functions used in the current script:
* SelectCo... | 30.347222 | 168 | 0.643021 |
0a4de3658870809d76535399c2e4b5b99a627cb7 | 18,552 | py | Python | owslib/coverage/wcs100.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | null | null | null | owslib/coverage/wcs100.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | null | null | null | owslib/coverage/wcs100.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2004, 2006 Sean C. Gillies
# Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#
# Authors :
# Dominic Lowe <d.lowe@rl.ac.uk>
#
# Contact email: d.lowe@rl.ac.uk
# =======================... | 44.489209 | 323 | 0.610069 |
3ec7523cb9a2ca0c2804169920266a1a1d5c400b | 9,266 | py | Python | tests/pytest/fft_tests/test_fft_numpy1_18_1.py | SX-Aurora/nlcpy | 0a53eec8778073bc48b12687b7ce37ab2bf2b7e0 | [
"BSD-3-Clause"
] | 11 | 2020-07-31T02:21:55.000Z | 2022-03-10T03:12:11.000Z | tests/pytest/fft_tests/test_fft_numpy1_18_1.py | SX-Aurora/nlcpy | 0a53eec8778073bc48b12687b7ce37ab2bf2b7e0 | [
"BSD-3-Clause"
] | null | null | null | tests/pytest/fft_tests/test_fft_numpy1_18_1.py | SX-Aurora/nlcpy | 0a53eec8778073bc48b12687b7ce37ab2bf2b7e0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import, print_function
import numpy
import nlcpy as np
import pytest
from nlcpy.random import random
from nlcpy.testing import ( # NOQA
assert_array_equal, assert_allclose)
from numpy.testing import assert_raises
# import threading
# import sys
# if sys.version_info[0] >=... | 38.131687 | 85 | 0.529355 |
6c298c8e0fa8c5f6f57f978604a0c598bdf7f407 | 1,859 | py | Python | tests/test_core_query_shell.py | Padraic-O-Mhuiris/fava | 797ae1ee1f7378c8e7347d2970fc52c4be366b01 | [
"MIT"
] | null | null | null | tests/test_core_query_shell.py | Padraic-O-Mhuiris/fava | 797ae1ee1f7378c8e7347d2970fc52c4be366b01 | [
"MIT"
] | null | null | null | tests/test_core_query_shell.py | Padraic-O-Mhuiris/fava | 797ae1ee1f7378c8e7347d2970fc52c4be366b01 | [
"MIT"
] | null | null | null | # pylint: disable=missing-docstring
from __future__ import annotations
import pytest
from beancount.query.query import run_query
from .conftest import data_file
from fava.core import FavaLedger
from fava.helpers import FavaAPIException
LEDGER = FavaLedger(data_file("query-example.beancount"))
QUERY = LEDGER.query_sh... | 28.166667 | 77 | 0.651963 |
58b974e804197ce71d7ee508d32beb3e7163a314 | 22,730 | py | Python | src/lib/2 Eye Tracking/preprocess_eye.py | galbiati/mnk-cleaning-analysis | d8e8b13b7a2c6431e453430588fa85fd694b3373 | [
"MIT"
] | null | null | null | src/lib/2 Eye Tracking/preprocess_eye.py | galbiati/mnk-cleaning-analysis | d8e8b13b7a2c6431e453430588fa85fd694b3373 | [
"MIT"
] | null | null | null | src/lib/2 Eye Tracking/preprocess_eye.py | galbiati/mnk-cleaning-analysis | d8e8b13b7a2c6431e453430588fa85fd694b3373 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Wei Ji Ma Lab, New York University Center for Neural Science
# By: Gianni Galbiati
# Standard Python Libraries (alphabetical order)
import os
# Scientific Python Libraries (alphabetical order)
import numpy as np
import pandas as pd
from scipy.stats import multivariate... | 41.630037 | 118 | 0.578003 |
5f989bf661f0036ae5041ebc6f5f97c40af1c7e5 | 5,105 | py | Python | tests/unit/test_oneview_appliance_device_snmp_v3_users.py | SHANDCRUZ/test-codecov | f7aca851423641570fa86d3f8233235d14c71756 | [
"Apache-2.0"
] | 10 | 2020-12-14T19:06:14.000Z | 2022-03-24T15:36:49.000Z | tests/unit/test_oneview_appliance_device_snmp_v3_users.py | SHANDCRUZ/test-codecov | f7aca851423641570fa86d3f8233235d14c71756 | [
"Apache-2.0"
] | 40 | 2020-10-12T11:45:25.000Z | 2022-03-29T14:43:47.000Z | tests/unit/test_oneview_appliance_device_snmp_v3_users.py | SHANDCRUZ/test-codecov | f7aca851423641570fa86d3f8233235d14c71756 | [
"Apache-2.0"
] | 16 | 2020-10-05T14:48:56.000Z | 2022-03-11T12:52:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###
# Copyright (2021) Hewlett Packard Enterprise Development LP
#
# 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/licens... | 33.149351 | 139 | 0.736141 |
c5ad2a0a8d271fe47fa77dbc1cee0234beb54ace | 99 | py | Python | locke/patterns/__init__.py | ciphertechsolutions/locke | 848f68d34332c9ced32826216f912ee1db2610d0 | [
"BSD-3-Clause"
] | null | null | null | locke/patterns/__init__.py | ciphertechsolutions/locke | 848f68d34332c9ced32826216f912ee1db2610d0 | [
"BSD-3-Clause"
] | null | null | null | locke/patterns/__init__.py | ciphertechsolutions/locke | 848f68d34332c9ced32826216f912ee1db2610d0 | [
"BSD-3-Clause"
] | null | null | null | from locke.patterns.manager import Manager
from locke.patterns.pattern_plugin import PatternPlugin
| 33 | 55 | 0.878788 |
61aec8ce08e19eea3241fb12d9ad23acf441a14c | 9,762 | py | Python | examples/song_recommendation.py | hcook/gmm | 2f858619c01b02c3e961e988037670e14276abcb | [
"BSD-3-Clause"
] | 34 | 2015-04-16T00:27:50.000Z | 2019-08-20T05:19:22.000Z | examples/song_recommendation.py | hcook/gmm | 2f858619c01b02c3e961e988037670e14276abcb | [
"BSD-3-Clause"
] | null | null | null | examples/song_recommendation.py | hcook/gmm | 2f858619c01b02c3e961e988037670e14276abcb | [
"BSD-3-Clause"
] | 11 | 2015-09-03T02:05:13.000Z | 2020-04-27T18:51:22.000Z | import unittest
import pylab as pl
import matplotlib as mpl
import itertools
import sys
import math
import timeit
import copy
import time
import struct
import scipy.stats.mstats as stats
import ConfigParser
import os
import getopt
import h5py
import random as rnd
import cPickle as pickle
import operator
from gmm.gmm_s... | 36.561798 | 173 | 0.61555 |
63ddb31cc7dde2ddc532470bd973f4f926f234fa | 889 | py | Python | tests/networking/shared_vpc_gke/test_plan.py | sekhon67/cloud-foundation-fabric | 7e429425fe8a3598a38b490f35a6359ba13a25ff | [
"Apache-2.0"
] | null | null | null | tests/networking/shared_vpc_gke/test_plan.py | sekhon67/cloud-foundation-fabric | 7e429425fe8a3598a38b490f35a6359ba13a25ff | [
"Apache-2.0"
] | null | null | null | tests/networking/shared_vpc_gke/test_plan.py | sekhon67/cloud-foundation-fabric | 7e429425fe8a3598a38b490f35a6359ba13a25ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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, ... | 31.75 | 74 | 0.758155 |
25fb964e620aa8c797f5ee59273c7000ed359165 | 16,134 | py | Python | app/R64/_GPIO.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | null | null | null | app/R64/_GPIO.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | null | null | null | app/R64/_GPIO.py | JonathanArrance/speedbot | 33cadaae157ccfb35688147c4662eaa7383e3f02 | [
"MIT"
] | 1 | 2020-10-30T21:14:25.000Z | 2020-10-30T21:14:25.000Z | #!/usr/bin/env python
# Allison Creely, 2018, LGPLv3 License
# Rock 64 GPIO Library for Python
# Import modules
import os.path
from multiprocessing import Process, Value
from time import time
from time import sleep
# Define static module variables
var_gpio_root = '/sys/class/gpio'
ROCK = 'ROCK'
BOARD = 'BOARD'
BCM =... | 39.160194 | 246 | 0.583364 |
991cec01a8b7a19069b00806947cc7fb2d59297a | 34,507 | py | Python | sensorml2iso/sensorml2iso.py | emiliom/sensorml2iso | 1759aad507b18e56ac9f1030e92c3b001f61d924 | [
"MIT"
] | null | null | null | sensorml2iso/sensorml2iso.py | emiliom/sensorml2iso | 1759aad507b18e56ac9f1030e92c3b001f61d924 | [
"MIT"
] | null | null | null | sensorml2iso/sensorml2iso.py | emiliom/sensorml2iso | 1759aad507b18e56ac9f1030e92c3b001f61d924 | [
"MIT"
] | null | null | null | import os
import errno
import io
import sys
from datetime import datetime, timedelta
from dateutil import parser
import pytz
from six import iteritems
try:
from urllib.parse import unquote, unquote_plus, urlencode, urlparse # Python 3
except ImportError:
from urllib import unquote, unquote_plus, urlencode #... | 58.885666 | 658 | 0.632422 |
01a4ab4758ad4615ae1d2fa82ff586dc380afd19 | 304 | py | Python | fairscale/experimental/nn/__init__.py | zhaojuanmao/fairscale | 61ece000bd1b70029270e2dccab66ffa2ca16d51 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 1,662 | 2020-07-15T21:40:19.000Z | 2022-03-31T10:45:12.000Z | fairscale/experimental/nn/__init__.py | zhaojuanmao/fairscale | 61ece000bd1b70029270e2dccab66ffa2ca16d51 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 648 | 2020-07-21T19:00:32.000Z | 2022-03-30T23:11:41.000Z | fairscale/experimental/nn/__init__.py | zhaojuanmao/fairscale | 61ece000bd1b70029270e2dccab66ffa2ca16d51 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 170 | 2020-07-16T00:28:01.000Z | 2022-03-15T19:39:21.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from .offload import OffloadModel
from .sync_batchnorm import SyncBatchNorm
__all__: List[str] = []
| 25.333333 | 65 | 0.769737 |
16194eec1d4843138a1bc866b7081025b6d2c776 | 230 | py | Python | src/aiquscanner.py | shlei/aiquFileTool | 44a7f981fa9b665f6df67c9af226215df1b7914b | [
"MIT"
] | 1 | 2019-12-13T04:36:49.000Z | 2019-12-13T04:36:49.000Z | src/aiquscanner.py | shlei/aiquFileTool | 44a7f981fa9b665f6df67c9af226215df1b7914b | [
"MIT"
] | null | null | null | src/aiquscanner.py | shlei/aiquFileTool | 44a7f981fa9b665f6df67c9af226215df1b7914b | [
"MIT"
] | null | null | null | from os.path import isdir as isPath
from os.path import isfile as isFile
from os.path import join as pathJoin
def dir_scan(root_dir, options):
print("dir scanning")
def file_scan(root_dir, options):
print("dir scanning") | 25.555556 | 36 | 0.756522 |
7180680bc24b0095b472c7f2163ad5b951b1cbb9 | 7,428 | py | Python | test/unit/test_graph_selection.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 1 | 2020-11-18T21:25:53.000Z | 2020-11-18T21:25:53.000Z | test/unit/test_graph_selection.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 50 | 2021-11-02T06:20:50.000Z | 2022-03-31T06:23:16.000Z | test/unit/test_graph_selection.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 1 | 2021-11-23T20:28:07.000Z | 2021-11-23T20:28:07.000Z | import unittest
from unittest import mock
import pytest
import string
import dbt.exceptions
import dbt.graph.selector as graph_selector
import dbt.graph.cli as graph_cli
from dbt.node_types import NodeType
import networkx as nx
def _get_graph():
integer_graph = nx.balanced_tree(2, 2, nx.DiGraph())
package... | 37.515152 | 123 | 0.522348 |
4cc0ffa0912e3dcf4bf84e644a8108717a333bec | 1,442 | py | Python | jwt/tests/test_utils.py | dizballanze/python-jwt | a3feebcc6c4638a3e66dc78fca3c9c98f4fdbf4c | [
"Apache-2.0"
] | null | null | null | jwt/tests/test_utils.py | dizballanze/python-jwt | a3feebcc6c4638a3e66dc78fca3c9c98f4fdbf4c | [
"Apache-2.0"
] | null | null | null | jwt/tests/test_utils.py | dizballanze/python-jwt | a3feebcc6c4638a3e66dc78fca3c9c98f4fdbf4c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017 Gehirn Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 30.680851 | 74 | 0.700416 |
5206b84de62863846233c7deeb95c9ab3896de23 | 4,799 | py | Python | atnlp/data/reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | atnlp/data/reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | atnlp/data/reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
reuters.py
~~~~~~~~~~
Functionality to read in Reuters corpus using the nltk module
"""
__author__ = "Will Davey"
__email__ = "wedavey@gmail.com"
__created__ = "2018-05-05"
__copyright__ = "Copyright 2018 Will Davey"
__license__ = "MIT https://opensource.org/licenses/MIT"
# standard imports
# ... | 28.39645 | 94 | 0.697645 |
bec8aa45fcf825c40b3c1f4634f5127be8d3d36a | 8,579 | py | Python | languages/fr.py | marian-vignau/OpenLex | e65a5ede23dacf356786aa32fbd70cee8a3743ce | [
"Linux-OpenIB"
] | 8 | 2018-12-14T15:58:23.000Z | 2021-04-08T02:23:02.000Z | languages/fr.py | marian-vignau/OpenLex | e65a5ede23dacf356786aa32fbd70cee8a3743ce | [
"Linux-OpenIB"
] | null | null | null | languages/fr.py | marian-vignau/OpenLex | e65a5ede23dacf356786aa32fbd70cee8a3743ce | [
"Linux-OpenIB"
] | 4 | 2019-01-29T03:35:16.000Z | 2019-06-20T11:40:56.000Z | # coding: utf8
{'!langcode!': 'fr',
'!langname!': 'Français',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\... | 45.152632 | 297 | 0.629327 |
b723e8414b8341949fccc941923dfdf0bef93a80 | 164 | py | Python | khatangatao/asgi.py | khatangatao/khatangatao | 58ecf793f2dfdaceee90e5a2d6b60559f208a131 | [
"MIT"
] | null | null | null | khatangatao/asgi.py | khatangatao/khatangatao | 58ecf793f2dfdaceee90e5a2d6b60559f208a131 | [
"MIT"
] | null | null | null | khatangatao/asgi.py | khatangatao/khatangatao | 58ecf793f2dfdaceee90e5a2d6b60559f208a131 | [
"MIT"
] | null | null | null | import os
from channels.asgi import get_channel_layer
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "khatangatao.settings")
channel_layer = get_channel_layer()
| 23.428571 | 71 | 0.835366 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.