hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 130 | 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 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85b1527e81795a67da561b6fc694b9544c6fff5c | 1,832 | py | Python | wt/pygardena/rest_api.py | geeak/wt.pygardena | d2c6e838b837d87e3e622bc78551c9023444256d | [
"Apache-2.0"
] | null | null | null | wt/pygardena/rest_api.py | geeak/wt.pygardena | d2c6e838b837d87e3e622bc78551c9023444256d | [
"Apache-2.0"
] | null | null | null | wt/pygardena/rest_api.py | geeak/wt.pygardena | d2c6e838b837d87e3e622bc78551c9023444256d | [
"Apache-2.0"
] | null | null | null | import requests
from urllib.parse import urljoin | 32.140351 | 112 | 0.576419 |
85b4a682b79e9072768842bcf0126988de1c0549 | 272 | py | Python | django-todos/todosite/todosapp/urls.py | rockchalkwushock/pdx-code-labs | 9953fda1c1b727c98834d5b10ea6a742967af470 | [
"MIT"
] | null | null | null | django-todos/todosite/todosapp/urls.py | rockchalkwushock/pdx-code-labs | 9953fda1c1b727c98834d5b10ea6a742967af470 | [
"MIT"
] | 12 | 2020-06-05T18:47:42.000Z | 2021-06-10T20:53:28.000Z | django-todos/todosite/todosapp/urls.py | rockchalkwushock/pdx-code-labs | 9953fda1c1b727c98834d5b10ea6a742967af470 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'todos'
urlpatterns = [
path('', views.index, name="index"),
path('add', views.add, name="add"),
path('complete', views.complete, name="complete"),
path('delete', views.delete, name="delete")
]
| 22.666667 | 54 | 0.647059 |
85b577080a0e6e1949e13130cd725e21728ff5fa | 1,464 | bzl | Python | specs2/specs2.bzl | ittaym/rules_scala | 4666a7e4efa6f7c9eaedf10863af23ce184111d3 | [
"Apache-2.0"
] | 2 | 2019-06-17T19:20:57.000Z | 2020-04-22T15:39:04.000Z | specs2/specs2.bzl | ittaym/rules_scala | 4666a7e4efa6f7c9eaedf10863af23ce184111d3 | [
"Apache-2.0"
] | 1 | 2017-06-28T15:43:25.000Z | 2017-08-13T15:56:34.000Z | specs2/specs2.bzl | ittaym/rules_scala | 4666a7e4efa6f7c9eaedf10863af23ce184111d3 | [
"Apache-2.0"
] | 3 | 2017-07-12T07:04:11.000Z | 2018-12-11T12:31:17.000Z | load("//scala:scala_cross_version.bzl",
"scala_mvn_artifact",
)
| 34.046512 | 118 | 0.741803 |
85b9254a8d92c3d4a3f37fcacd58cd3dde572655 | 2,158 | py | Python | graphite_feeder/handler/appliance/handler.py | majamassarini/automate-graphite-feeder | 0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0 | [
"MIT"
] | null | null | null | graphite_feeder/handler/appliance/handler.py | majamassarini/automate-graphite-feeder | 0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0 | [
"MIT"
] | null | null | null | graphite_feeder/handler/appliance/handler.py | majamassarini/automate-graphite-feeder | 0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0 | [
"MIT"
] | null | null | null | import logging
from graphite_feeder.handler.graph import Graph
from graphite_feeder.handler.appliance.registry import Registry
from graphite_feeder.handler.event.registry import mapper
| 30.828571 | 96 | 0.58202 |
85b9d73931a1a3a5f2a12915b8b01497ab128c23 | 521,619 | py | Python | sympy/integrals/rubi/rules/inverse_hyperbolic.py | STALKER2010/sympy-bleeding-edge | 81233029a9a30866747f6da2c0e9604d1681d474 | [
"BSD-3-Clause"
] | 2 | 2018-12-05T02:30:43.000Z | 2020-11-14T01:43:15.000Z | sympy/integrals/rubi/rules/inverse_hyperbolic.py | STALKER2010/sympy-bleeding-edge | 81233029a9a30866747f6da2c0e9604d1681d474 | [
"BSD-3-Clause"
] | 1 | 2017-10-23T06:56:43.000Z | 2017-10-23T06:56:43.000Z | sympy/integrals/rubi/rules/inverse_hyperbolic.py | STALKER2010/sympy-bleeding-edge | 81233029a9a30866747f6da2c0e9604d1681d474 | [
"BSD-3-Clause"
] | 1 | 2020-10-02T15:05:03.000Z | 2020-10-02T15:05:03.000Z | from sympy.external import import_module
matchpy = import_module("matchpy")
from sympy.utilities.decorator import doctest_depends_on
if matchpy:
from matchpy import Pattern, ReplacementRule, CustomConstraint
from sympy.integrals.rubi.utility_function import (Int, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ,... | 185.563501 | 6,553 | 0.591269 |
85bb2503e8a4d18e5ab73f60b15a9282ddc38ed1 | 3,211 | py | Python | bin/run_percolation.py | twesterhout/percolation | f82358ce628c2b48cf7f8435673af17eab08c527 | [
"BSD-3-Clause"
] | null | null | null | bin/run_percolation.py | twesterhout/percolation | f82358ce628c2b48cf7f8435673af17eab08c527 | [
"BSD-3-Clause"
] | null | null | null | bin/run_percolation.py | twesterhout/percolation | f82358ce628c2b48cf7f8435673af17eab08c527 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright Tom Westerhout (c) 2018
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# noti... | 41.166667 | 81 | 0.691996 |
85bb9bec051a6a3ad3862441eaf5e8246dcc5f16 | 1,817 | py | Python | tests/test_rectangle.py | trejsu/shaper | 03837d80f5818f807067dae51afd8b8180971d0e | [
"MIT"
] | null | null | null | tests/test_rectangle.py | trejsu/shaper | 03837d80f5818f807067dae51afd8b8180971d0e | [
"MIT"
] | null | null | null | tests/test_rectangle.py | trejsu/shaper | 03837d80f5818f807067dae51afd8b8180971d0e | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from shapes.shape import Quadrangle
| 39.5 | 100 | 0.641167 |
85bcdc21f579b7929c0b7ee732de0cbf359150ce | 10,829 | py | Python | common_utils/file_utils.py | CroP-BioDiv/zcitools | 52332b4013486e983f962c085236189292228a02 | [
"MIT"
] | null | null | null | common_utils/file_utils.py | CroP-BioDiv/zcitools | 52332b4013486e983f962c085236189292228a02 | [
"MIT"
] | null | null | null | common_utils/file_utils.py | CroP-BioDiv/zcitools | 52332b4013486e983f962c085236189292228a02 | [
"MIT"
] | null | null | null | import os
import errno
import sys
import shutil
import csv
import yaml
import json
from zipfile import ZipFile, ZIP_DEFLATED
yaml.Dumper.ignore_aliases = lambda *args: True
# Settings
settings_defaults = dict(
ps_viewer='evince',
image_viewer='gpicview',
email=None,
workflow=None,
workflow_parame... | 30.248603 | 109 | 0.65103 |
85bd7de36de00c7d9a50732e7ab11a05618580b2 | 7,857 | py | Python | modules/vacations/vacations/builders.py | vasyukvv42/metabot | f66bccf14c7a1accef8ac6feb545ac04d471cf7f | [
"MIT"
] | null | null | null | modules/vacations/vacations/builders.py | vasyukvv42/metabot | f66bccf14c7a1accef8ac6feb545ac04d471cf7f | [
"MIT"
] | null | null | null | modules/vacations/vacations/builders.py | vasyukvv42/metabot | f66bccf14c7a1accef8ac6feb545ac04d471cf7f | [
"MIT"
] | null | null | null | from datetime import date
from decimal import Decimal
from typing import List, Dict, Iterable, Optional
from vacations.config import (
APPROVE_BUTTON_ACTION_ID,
DENY_BUTTON_ACTION_ID,
DATEPICKER_START_ACTION_ID,
DATEPICKER_END_ACTION_ID,
REASON_INPUT_ACTION_ID,
REQUEST_VIEW_ID,
LEAVE_TYPES,... | 27.472028 | 80 | 0.390353 |
85bdfe99465860c0e5ef243c43925cbed19e1e66 | 250 | py | Python | Proyecto_Global_Hitss_RF_v1/Funciones/Obtener_hora_actual.py | marlonsale08/Marlon | 07570fb4aefd2427564e77c45a15e36e3fca3b19 | [
"MIT"
] | null | null | null | Proyecto_Global_Hitss_RF_v1/Funciones/Obtener_hora_actual.py | marlonsale08/Marlon | 07570fb4aefd2427564e77c45a15e36e3fca3b19 | [
"MIT"
] | null | null | null | Proyecto_Global_Hitss_RF_v1/Funciones/Obtener_hora_actual.py | marlonsale08/Marlon | 07570fb4aefd2427564e77c45a15e36e3fca3b19 | [
"MIT"
] | null | null | null | from datetime import datetime | 25 | 38 | 0.64 |
85bf00ac4caf154cfe0c143d45872cf80a298415 | 1,876 | py | Python | Algorithms/Merge Sort/LinkedListMergeSort.py | TeacherManoj0131/HacktoberFest2020-Contributions | c7119202fdf211b8a6fc1eadd0760dbb706a679b | [
"MIT"
] | 256 | 2020-09-30T19:31:34.000Z | 2021-11-20T18:09:15.000Z | Algorithms/Merge Sort/LinkedListMergeSort.py | TeacherManoj0131/HacktoberFest2020-Contributions | c7119202fdf211b8a6fc1eadd0760dbb706a679b | [
"MIT"
] | 293 | 2020-09-30T19:14:54.000Z | 2021-06-06T02:34:47.000Z | Algorithms/Merge Sort/LinkedListMergeSort.py | TeacherManoj0131/HacktoberFest2020-Contributions | c7119202fdf211b8a6fc1eadd0760dbb706a679b | [
"MIT"
] | 1,620 | 2020-09-30T18:37:44.000Z | 2022-03-03T20:54:22.000Z | #Program for merge sort in linked list
def printList(head):
if head is None:
print(' ')
return
curr_node = head
while curr_node:
print(curr_node.data, end = " ")
curr_node = curr_node.next
print(' ')
# Main Code
if __name__ == '__main__':
li = LinkedList()
li.append(67)
li.append(98)
li.append(45)
l... | 18.213592 | 44 | 0.66791 |
85bf136fa60a04f01883578c41339c1d2cfbffdd | 9,668 | py | Python | FinHelper/dialogwin/transaction_window.py | felipepo/FinancialHelper---PyQT | f959f968ffe6b598035edadaddbe57766dab778d | [
"MIT"
] | null | null | null | FinHelper/dialogwin/transaction_window.py | felipepo/FinancialHelper---PyQT | f959f968ffe6b598035edadaddbe57766dab778d | [
"MIT"
] | 1 | 2019-07-01T12:01:02.000Z | 2019-07-01T12:01:02.000Z | FinHelper/dialogwin/transaction_window.py | felipepo/FinancialHelper---PyQT | f959f968ffe6b598035edadaddbe57766dab778d | [
"MIT"
] | null | null | null | from PySide2 import QtCore, QtGui, QtWidgets
from decimal import Decimal
from ..utilities import funs
from . import category_window | 50.617801 | 146 | 0.655048 |
85c14f36f86ee4b39faf9909c6cf433df6eceb23 | 2,135 | py | Python | training_v1_backup/training/pytorchLearning/logrTorch.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | training_v1_backup/training/pytorchLearning/logrTorch.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | training_v1_backup/training/pytorchLearning/logrTorch.py | prasoonpatidar/multiagentRL-resource-sharing | e63ba7fc3c7ab019e9fd109cd45b739e3322152f | [
"MIT"
] | null | null | null | '''
0) Setup Data
1) Design Model (input_size, output_size, forward_pass)
2) Construct Loss, Optimizer
3) Training Loop
- forward pass
- gradients
- update weights
'''
import torch
import torch as th
import torch.nn as nn
import numpy as np
# Data process
from sklearn import datasets
from sklearn.preproces... | 21.565657 | 88 | 0.705386 |
85c1df0fa58fd5ecdb5fdc648144e9c0a77048c0 | 1,763 | py | Python | backend/api/serializers.py | Kovszasz/MYG | fc932bef8b67d568ac60bba5604009550570fca9 | [
"MIT"
] | null | null | null | backend/api/serializers.py | Kovszasz/MYG | fc932bef8b67d568ac60bba5604009550570fca9 | [
"MIT"
] | 7 | 2020-06-06T00:58:09.000Z | 2022-02-26T20:03:02.000Z | backend/api/serializers.py | Kovszasz/MYG | fc932bef8b67d568ac60bba5604009550570fca9 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import *
import backend.settings.dev as settings
from rest_framework.validators import UniqueValidator
import jwt
from rest_framework_jwt.utils import jwt_payload_handler
| 32.648148 | 122 | 0.678389 |
85c40a66badc32cefedcc7c692b5c7a596d52390 | 13,176 | py | Python | SuperficiesRevolucion/SuperficiesRevolucion.py | ranea/Bachelor-Projects | 88e9526c52eb5a7d90c53404d2dc4ba429a4751f | [
"MIT"
] | null | null | null | SuperficiesRevolucion/SuperficiesRevolucion.py | ranea/Bachelor-Projects | 88e9526c52eb5a7d90c53404d2dc4ba429a4751f | [
"MIT"
] | null | null | null | SuperficiesRevolucion/SuperficiesRevolucion.py | ranea/Bachelor-Projects | 88e9526c52eb5a7d90c53404d2dc4ba429a4751f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Superficies de revolucion
import OpenGL
OpenGL.ERROR_ON_COPY = True
from OpenGL.GL import *
from OpenGL.GLU import gluOrtho2D
from OpenGL.GLUT import *
import sys, time
from sympy.core.sympify import sympify
from sympy import *
from OpenGL.constants import GLfloat
from OpenGL.GL.ARB.multisampl... | 26.511066 | 129 | 0.631299 |
85c49c913427b26d9207926ed407065125bfe9c0 | 50,825 | py | Python | sdk/cwl/tests/test_submit.py | tomclegg/arvados | 138eedbea2658ef397c7a58ce48d6f06077ba140 | [
"Apache-2.0"
] | null | null | null | sdk/cwl/tests/test_submit.py | tomclegg/arvados | 138eedbea2658ef397c7a58ce48d6f06077ba140 | [
"Apache-2.0"
] | null | null | null | sdk/cwl/tests/test_submit.py | tomclegg/arvados | 138eedbea2658ef397c7a58ce48d6f06077ba140 | [
"Apache-2.0"
] | null | null | null | import copy
import cStringIO
import functools
import hashlib
import json
import logging
import mock
import sys
import unittest
import arvados
import arvados.collection
import arvados_cwl
import arvados_cwl.runner
import arvados.keep
from .matcher import JsonDiffMatcher
from .mock_discovery import get_rootDesc
import... | 42.854132 | 170 | 0.548411 |
85c4f8f4a9a018c1ff7fe00760540a263ba0d414 | 3,263 | py | Python | api/DirLoad.py | BhasherBEL/LittleFather | 2ad4d8fcd05d33414c2ad4ce065330137587145c | [
"MIT"
] | 5 | 2019-08-27T12:16:50.000Z | 2020-10-23T18:35:04.000Z | api/DirLoad.py | BhasherBEL/LittleFather | 2ad4d8fcd05d33414c2ad4ce065330137587145c | [
"MIT"
] | null | null | null | api/DirLoad.py | BhasherBEL/LittleFather | 2ad4d8fcd05d33414c2ad4ce065330137587145c | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
from api.Error import raise_error, ErrorLevel
import os
import importlib
import importlib.util
| 31.07619 | 209 | 0.716519 |
85c502100ae204a4f87ac93af0a11ae403e29ecd | 4,094 | py | Python | tests/routes/v1/test_datasets.py | NASA-IMPACT/covid-api | 62fa23918861438090367a85c1dca5300871b9c7 | [
"MIT"
] | 14 | 2020-05-27T14:22:37.000Z | 2022-03-31T04:44:25.000Z | tests/routes/v1/test_datasets.py | NASA-IMPACT/covid-api | 62fa23918861438090367a85c1dca5300871b9c7 | [
"MIT"
] | 47 | 2020-05-27T02:43:08.000Z | 2021-11-30T17:50:45.000Z | tests/routes/v1/test_datasets.py | NASA-IMPACT/covid-api | 62fa23918861438090367a85c1dca5300871b9c7 | [
"MIT"
] | 3 | 2021-05-29T14:15:28.000Z | 2021-07-01T01:20:09.000Z | """Test /v1/datasets endpoints"""
import json
from unittest.mock import patch
import boto3
import botocore
from moto import mock_s3
from covid_api.core.config import INDICATOR_BUCKET
DATASET_METADATA_FILENAME = "dev-dataset-metadata.json"
DATASET_METADATA_GENERATOR_FUNCTION_NAME = "dev-dataset-metadata-generator"
... | 31.251908 | 87 | 0.509282 |
85c689c0c223234396fe26601b1d33f6c48083a4 | 1,699 | py | Python | classes.py | ploggingdev/python_learn | 0b056c0a57e21d9a0c86eb8bbd6e14b236e4d215 | [
"MIT"
] | 10 | 2017-06-23T07:30:52.000Z | 2019-09-11T20:14:08.000Z | classes.py | ploggingdev/python_learn | 0b056c0a57e21d9a0c86eb8bbd6e14b236e4d215 | [
"MIT"
] | null | null | null | classes.py | ploggingdev/python_learn | 0b056c0a57e21d9a0c86eb8bbd6e14b236e4d215 | [
"MIT"
] | 11 | 2017-01-12T15:34:17.000Z | 2019-07-12T11:16:16.000Z | import copy
def print_point(point):
"""print contents of given point"""
print("x={} y={}".format(point.x,point.y))
point = Point(10,20)
print(point)
print(point.details)
print(point.get_sum())
new_point = Point(2,4)
print(new_point)
point.add_point(new_point)
print(point)
print_point(new_point)
copied_po... | 20.719512 | 88 | 0.616833 |
85c7248c5f7b74ca201de147525cc98df11221a7 | 5,814 | py | Python | dusty/systems/docker/testing_image.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 421 | 2015-06-02T16:29:59.000Z | 2021-06-03T18:44:42.000Z | dusty/systems/docker/testing_image.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 404 | 2015-06-02T20:23:42.000Z | 2019-08-21T16:59:41.000Z | dusty/systems/docker/testing_image.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 16 | 2015-06-16T17:21:02.000Z | 2020-03-27T02:27:09.000Z | from __future__ import absolute_import
import docker
from ...compiler.compose import container_code_path, get_volume_mounts
from ...compiler.spec_assembler import get_expanded_libs_specs
from ...log import log_to_client
from ...command_file import dusty_command_file_name, lib_install_commands_for_app_or_lib
from .comm... | 41.827338 | 121 | 0.722222 |
85c78e4b8b4ecd4139b82df85e431bd18412acb6 | 1,714 | py | Python | cog/constants.py | William-Hill/COG | 4f87fa7cb19d67ee27bae3b991be73427ee449bf | [
"BSD-3-Clause"
] | null | null | null | cog/constants.py | William-Hill/COG | 4f87fa7cb19d67ee27bae3b991be73427ee449bf | [
"BSD-3-Clause"
] | null | null | null | cog/constants.py | William-Hill/COG | 4f87fa7cb19d67ee27bae3b991be73427ee449bf | [
"BSD-3-Clause"
] | null | null | null | '''
CoG application-level constants.
'''
SECTION_DEFAULT = 'DEFAULT'
SECTION_ESGF = 'ESGF'
SECTION_EMAIL = 'EMAIL'
SECTION_GLOBUS = 'GLOBUS'
SECTION_PID = 'PID'
# note: use lower case
VALID_MIME_TYPES = { '.bmp': ['image/bmp', 'image/x-windows-bmp'],
'.csv': ['text/plain'],
... | 50.411765 | 177 | 0.563594 |
85c79914bdd90b98f0604e1d7179a76a1a86f2d2 | 589 | py | Python | ios_code_generator/models/__init__.py | banxi1988/iOSCodeGenerator | bb07930660f87378040b8783d203a6a2637b289e | [
"MIT"
] | 34 | 2016-12-22T13:18:01.000Z | 2018-04-23T05:53:32.000Z | ios_code_generator/models/__init__.py | codetalks-new/iOSCodeGenerator | bb07930660f87378040b8783d203a6a2637b289e | [
"MIT"
] | 3 | 2017-05-13T08:07:22.000Z | 2018-01-03T00:28:16.000Z | ios_code_generator/models/__init__.py | codetalks-new/iOSCodeGenerator | bb07930660f87378040b8783d203a6a2637b289e | [
"MIT"
] | 6 | 2016-12-23T00:37:37.000Z | 2019-05-29T02:15:33.000Z | # -*- coding: utf-8 -*-
__author__ = 'banxi'
from .core import *
# Model generator , ,.
_auto_import_models()
| 25.608696 | 77 | 0.66893 |
a40f241fa41dd6b74dd8f0d7a47f67d994f0edf9 | 3,239 | py | Python | AUTOENCODERS/DataPreparing/KIBANAPreprocessor.py | pawelptak/AI-Anomaly-Detection | 0d3e6072e273d6cc59ba79d5f8c73f393d1ec4e5 | [
"MIT"
] | 1 | 2022-03-23T10:18:17.000Z | 2022-03-23T10:18:17.000Z | AUTOENCODERS/DataPreparing/KIBANAPreprocessor.py | pawelptak/AI-Anomaly-Detection | 0d3e6072e273d6cc59ba79d5f8c73f393d1ec4e5 | [
"MIT"
] | null | null | null | AUTOENCODERS/DataPreparing/KIBANAPreprocessor.py | pawelptak/AI-Anomaly-Detection | 0d3e6072e273d6cc59ba79d5f8c73f393d1ec4e5 | [
"MIT"
] | null | null | null | import enum
from sklearn.preprocessing import StandardScaler, LabelEncoder, MinMaxScaler, OneHotEncoder
import numpy as np
import pandas as pd
import tqdm
from datetime import datetime
"""
Class for Preprocessing The Data
"""
| 39.5 | 91 | 0.629207 |
a40f4d051e35983ca5e18a95bf594aa5be649bf8 | 7,298 | py | Python | netrino/views/orders.py | HieronymusCrouse/netrino | dcecbfa8a4e5f79c6f74fb1a711698e384feee7e | [
"BSD-3-Clause"
] | 2 | 2018-05-17T15:50:54.000Z | 2019-05-16T16:57:30.000Z | netrino/views/orders.py | HieronymusCrouse/netrino | dcecbfa8a4e5f79c6f74fb1a711698e384feee7e | [
"BSD-3-Clause"
] | 46 | 2018-04-18T08:37:50.000Z | 2019-06-06T13:15:13.000Z | netrino/views/orders.py | HieronymusCrouse/netrino | dcecbfa8a4e5f79c6f74fb1a711698e384feee7e | [
"BSD-3-Clause"
] | 8 | 2018-02-26T08:16:24.000Z | 2019-12-27T12:11:05.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019 Dave Kruger.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list... | 35.6 | 79 | 0.593176 |
a40f9453890799712835356101e88756d7eb378e | 2,254 | py | Python | rayvision_api/exception.py | loonghao/rayvision_api | bc786def2d86b5e838bee91c69a5687dc1a4afaa | [
"Apache-2.0"
] | null | null | null | rayvision_api/exception.py | loonghao/rayvision_api | bc786def2d86b5e838bee91c69a5687dc1a4afaa | [
"Apache-2.0"
] | null | null | null | rayvision_api/exception.py | loonghao/rayvision_api | bc786def2d86b5e838bee91c69a5687dc1a4afaa | [
"Apache-2.0"
] | null | null | null | """The exception for the rayvision api."""
| 31.746479 | 77 | 0.588731 |
a40fd5e1de3110cf25bd98e5e56b203e5c209d3b | 2,281 | py | Python | sync_comments_articles.py | chucknado/ZMT | d701c54e58c188db4bf4650d52aecae1106fed01 | [
"MIT"
] | 1 | 2020-01-25T16:12:14.000Z | 2020-01-25T16:12:14.000Z | sync_comments_articles.py | chucknado/ZMT | d701c54e58c188db4bf4650d52aecae1106fed01 | [
"MIT"
] | null | null | null | sync_comments_articles.py | chucknado/ZMT | d701c54e58c188db4bf4650d52aecae1106fed01 | [
"MIT"
] | 1 | 2020-07-19T02:13:01.000Z | 2020-07-19T02:13:01.000Z | import arrow
from helpers import read_data, write_data, get_settings, package_comment
import api
settings = get_settings()
sync_dates = read_data('sync_dates')
last_sync = arrow.get(sync_dates['comments'])
article_map = read_data('article_map')
comment_map = read_data('comment_map')
comment_article_map = read_data('... | 43.865385 | 106 | 0.654976 |
a4113c943204252f7802e11beac1c26acf4f0ea2 | 5,400 | py | Python | src/bayesian_changepoint_detection/online_changepoint_detection.py | YAU1YAN/Bayesian_HD_sparse_changepoint_online_detection | c121099a024e33548c7aab8e50f1c32214575bff | [
"MIT"
] | 1 | 2021-01-22T01:02:28.000Z | 2021-01-22T01:02:28.000Z | src/bayesian_changepoint_detection/online_changepoint_detection.py | YAU1YAN/Bayesian_HD_sparse_changepoint_online_detection | c121099a024e33548c7aab8e50f1c32214575bff | [
"MIT"
] | null | null | null | src/bayesian_changepoint_detection/online_changepoint_detection.py | YAU1YAN/Bayesian_HD_sparse_changepoint_online_detection | c121099a024e33548c7aab8e50f1c32214575bff | [
"MIT"
] | 1 | 2019-01-10T23:36:18.000Z | 2019-01-10T23:36:18.000Z | from __future__ import division
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
from math import log, pow
| 36.986301 | 195 | 0.562222 |
a411769dd15573018077c0c2f1d5693c451b5292 | 2,893 | py | Python | Nessus.py | ucstone/Nessus-Tranlator | 5d4f072baf75a624a42327878b209666b8b55ab5 | [
"MIT"
] | 26 | 2017-05-08T09:33:29.000Z | 2020-11-03T05:38:37.000Z | Nessus.py | ucstone/Nessus-Tranlator | 5d4f072baf75a624a42327878b209666b8b55ab5 | [
"MIT"
] | 1 | 2019-01-18T02:15:53.000Z | 2019-01-18T02:15:53.000Z | Nessus.py | ucstone/Nessus-Tranlator | 5d4f072baf75a624a42327878b209666b8b55ab5 | [
"MIT"
] | 8 | 2018-04-21T11:40:52.000Z | 2020-09-28T06:46:56.000Z | # coding: utf-8
# !/usr/bin/env python3
import csv
import os, os.path
import sys
import argparse
from WriteExcel import Excel
from log import debug, info, error
from baidu_traslate import *
if __name__ == '__main__':
args = get_args()
path = args['p']
output = args['s']
if path is None or output... | 27.037383 | 110 | 0.563429 |
a415a1bcbbcbc8271a90c22cbc41d72649251e55 | 5,292 | py | Python | Char4 A2C/A2C-CartPole-v0.py | rh01/Deep-reinforcement-learning-with-pytorch | fd1853495b885514927c82834f562d2a4df06b28 | [
"MIT"
] | null | null | null | Char4 A2C/A2C-CartPole-v0.py | rh01/Deep-reinforcement-learning-with-pytorch | fd1853495b885514927c82834f562d2a4df06b28 | [
"MIT"
] | null | null | null | Char4 A2C/A2C-CartPole-v0.py | rh01/Deep-reinforcement-learning-with-pytorch | fd1853495b885514927c82834f562d2a4df06b28 | [
"MIT"
] | 2 | 2021-05-25T06:40:50.000Z | 2021-09-20T12:38:55.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
import numpy as np
import math
import random
import os
import gym
import warnings
warnings.filterwarnings('ignore')
# Hyper Parameters
STATE_DIM = 4
ACTION_DIM = 2
STEP = 2000
SAMPLE_N... | 33.923077 | 120 | 0.636054 |
a41604c3c640169a0c96cc9f98da120d48810dfb | 1,818 | py | Python | filters.py | kaniblu/enwiki-mysql | 0a9cc4e273512e20c727c4da13286953895bf39f | [
"MIT"
] | 2 | 2018-12-06T05:19:28.000Z | 2019-06-19T13:38:45.000Z | filters.py | kaniblu/enwiki-mysql | 0a9cc4e273512e20c727c4da13286953895bf39f | [
"MIT"
] | 1 | 2019-06-27T20:50:45.000Z | 2019-07-01T18:44:55.000Z | filters.py | kaniblu/enwiki-mysql | 0a9cc4e273512e20c727c4da13286953895bf39f | [
"MIT"
] | 1 | 2020-01-16T12:22:39.000Z | 2020-01-16T12:22:39.000Z | # encoding: utf-8
from __future__ import unicode_literals
import re
import string
import six
import gensim
| 27.969231 | 81 | 0.569857 |
a416ef3fb2de2753c6954394b2da57d87adeea0e | 4,676 | py | Python | SysReview/mainapp/tests.py | Alistair401/WAD | f4695516daad5b17bedc8557f82362fd89a5b239 | [
"MIT"
] | 1 | 2018-11-28T00:37:09.000Z | 2018-11-28T00:37:09.000Z | SysReview/mainapp/tests.py | Alistair401/10C | f4695516daad5b17bedc8557f82362fd89a5b239 | [
"MIT"
] | null | null | null | SysReview/mainapp/tests.py | Alistair401/10C | f4695516daad5b17bedc8557f82362fd89a5b239 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.core.urlresolvers import reverse
from mainapp.forms import CreateReviewForm
from mainapp.models import Researcher, Review, Paper, Query
from django.contrib.auth.models import User
# tests for ... | 22.699029 | 124 | 0.680068 |
a418f30be67e74f37f6d483c86e7442d6adafeb7 | 225 | py | Python | examples/dir.py | dmytrostriletskyi/design-kit | 6b7cf8657ffe18cd6a43c6cfb73b071084f0331e | [
"MIT"
] | 107 | 2019-03-02T22:31:04.000Z | 2022-01-24T09:57:15.000Z | examples/dir.py | dmytrostriletskyi/accessify | 6b7cf8657ffe18cd6a43c6cfb73b071084f0331e | [
"MIT"
] | 161 | 2019-03-02T17:46:20.000Z | 2020-11-13T15:45:53.000Z | examples/dir.py | dmytrostriletskyi/design-kit | 6b7cf8657ffe18cd6a43c6cfb73b071084f0331e | [
"MIT"
] | 8 | 2019-03-04T13:01:40.000Z | 2022-03-31T06:40:46.000Z | from accessify import accessify, private
if __name__ == '__main__':
car = Car()
assert 'start_engine' not in dir(car)
| 15 | 41 | 0.657778 |
a41a3584d47653dd2b897f2654eeed6f9c1edc8d | 6,285 | py | Python | webDe/settings.py | dannybombastic/Cockfight | ea02132053a590ff407b53dee98ab0d22bfae0dd | [
"Apache-2.0"
] | null | null | null | webDe/settings.py | dannybombastic/Cockfight | ea02132053a590ff407b53dee98ab0d22bfae0dd | [
"Apache-2.0"
] | null | null | null | webDe/settings.py | dannybombastic/Cockfight | ea02132053a590ff407b53dee98ab0d22bfae0dd | [
"Apache-2.0"
] | null | null | null | """
Django settings for webDe project.
Generated by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
from... | 29.78673 | 91 | 0.724582 |
a41b2ad16277f9a6e1aded9ba8f7bf4037d30226 | 14,183 | py | Python | rstfinder/rst_eval.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 75 | 2015-03-31T07:03:34.000Z | 2020-08-28T06:55:15.000Z | rstfinder/rst_eval.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 20 | 2015-04-14T17:38:54.000Z | 2020-09-15T14:28:12.000Z | rstfinder/rst_eval.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 17 | 2015-05-16T13:03:32.000Z | 2020-08-28T06:55:16.000Z | #!/usr/bin/env python
"""
Script to evaluate the RST parser.
:author: Michael Heilman
:author: Nitin Madnani
:organization: ETS
"""
import argparse
import json
import logging
from collections import Counter
from operator import itemgetter
from nltk.tree import ParentedTree
from .collapse_rst_labels import collapse... | 36.743523 | 119 | 0.582317 |
a41c8e50b0c70eef5aa82e699a4fb84a00b348ab | 2,629 | py | Python | Projeto_Capitulo/randomQuizGenerator.py | alexcarlos06/Automatize_Tarefas_Ma-antes | da4c02de415fb6dec703b3009b40925ccb77a4d8 | [
"MIT"
] | null | null | null | Projeto_Capitulo/randomQuizGenerator.py | alexcarlos06/Automatize_Tarefas_Ma-antes | da4c02de415fb6dec703b3009b40925ccb77a4d8 | [
"MIT"
] | null | null | null | Projeto_Capitulo/randomQuizGenerator.py | alexcarlos06/Automatize_Tarefas_Ma-antes | da4c02de415fb6dec703b3009b40925ccb77a4d8 | [
"MIT"
] | null | null | null | #! python3
# randomQUizGenerator.py - Cria provas com perguntas e respostas em ordem aleatria
# juntamente com os gabaritos contendo as respostas.
import random
captals = {'Acre (AC)': 'Rio Branco', 'Alagoas (AL)': 'Macei', 'Amap (AP)': 'Macap', 'Amazonas (AM)': 'Manaus',
'Bahia (BA)': 'Salvador', 'Cear (C... | 51.54902 | 118 | 0.63218 |
a41d08ded38fdb43acb2688c8c63d0d20b8d1461 | 919 | py | Python | setup.py | TeengardenB/cramer | dbd974580df3b54ecbf616ee3db065638575b8ac | [
"MIT"
] | null | null | null | setup.py | TeengardenB/cramer | dbd974580df3b54ecbf616ee3db065638575b8ac | [
"MIT"
] | null | null | null | setup.py | TeengardenB/cramer | dbd974580df3b54ecbf616ee3db065638575b8ac | [
"MIT"
] | null | null | null | import pathlib
from setuptools import find_packages, setup
HERE = pathlib.Path(__file__).parent
VERSION = '0.0.0'
PACKAGE_NAME = 'cramer'
AUTHOR = 'Teengarden B'
AUTHOR_EMAIL = 'teengardenb@gmail.com'
URL = 'https://github.com/TeengardenB/cramer'
LICENSE = 'MIT'
DESCRIPTION = 'This is a library design... | 26.257143 | 115 | 0.710555 |
a41ecc3eebbded681375d2265bef2c5e5ddfe45d | 433 | py | Python | docs/examples/container/rancher/search_containers.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 1,435 | 2015-01-07T05:32:51.000Z | 2022-03-25T19:39:34.000Z | docs/examples/container/rancher/search_containers.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 1,158 | 2015-01-04T18:08:42.000Z | 2022-03-24T14:34:57.000Z | docs/examples/container/rancher/search_containers.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 832 | 2015-01-05T09:20:21.000Z | 2022-03-24T19:22:19.000Z | from libcloud.container.types import Provider
from libcloud.container.providers import get_driver
driver = get_driver(Provider.RANCHER)
connection = driver("MYRANCHERACCESSKEY", "MYRANCHERSECRETKEY",
host="172.30.22.1", port=8080, secure=False)
search_results = connection.ex_search_containers(
... | 33.307692 | 68 | 0.748268 |
a41ee16c11a22caabeb9c2d8e601622abe31911d | 285 | py | Python | data/groups.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | data/groups.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | data/groups.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | from models.model_group import Group
testdata = [Group(group_name='', group_header='', group_footer=''),
Group(group_name='name1', group_header='name1', group_footer='name1'),
Group(group_name='name2', group_header='name2', group_footer='name2')
] | 40.714286 | 82 | 0.65614 |
a4205f48906e1687b0ee96005e30c911b5f53629 | 680 | py | Python | scripts/create_py_file_with_template_docs.py | TralahM/automate_the_boring_stuff | 56945962646a1dfcb984afe861c6ec4e1f904863 | [
"MIT"
] | 1 | 2019-05-28T05:53:34.000Z | 2019-05-28T05:53:34.000Z | scripts/create_py_file_with_template_docs.py | TralahM/automate_the_boring_stuff | 56945962646a1dfcb984afe861c6ec4e1f904863 | [
"MIT"
] | null | null | null | scripts/create_py_file_with_template_docs.py | TralahM/automate_the_boring_stuff | 56945962646a1dfcb984afe861c6ec4e1f904863 | [
"MIT"
] | 1 | 2019-11-14T17:05:07.000Z | 2019-11-14T17:05:07.000Z | #!/usr/bin/env python
import sys
import os
from datetime import datetime
from argparse import ArgumentParser
template="""#!/usr/bin/env python
'''
File: {0}
Author: Tralah M Brian <musyoki.tralah@students.jkuat.ac.ke>
Org: TralahTek LLC <https://github.com/TralahTek>
Date: {1}
'''
""".format(sys.argv[1],datetime.no... | 25.185185 | 89 | 0.697059 |
a420de6c75911a02dd25f8d0b43de337f96e1f22 | 5,634 | py | Python | src/text_to_speech.py | robhaslinger/Simple-Voice-Activated-Dialogue | a8311567f3923ad2d80243ab2dbcbf29202eb111 | [
"MIT"
] | null | null | null | src/text_to_speech.py | robhaslinger/Simple-Voice-Activated-Dialogue | a8311567f3923ad2d80243ab2dbcbf29202eb111 | [
"MIT"
] | null | null | null | src/text_to_speech.py | robhaslinger/Simple-Voice-Activated-Dialogue | a8311567f3923ad2d80243ab2dbcbf29202eb111 | [
"MIT"
] | null | null | null | import zmq
import simpleaudio as sa
import os
from time import sleep
# ----------------------------------------------------------------------------------------------------------------------
# A few ways of playing .wav files ... comment these out but keep for reference
# import pyaudio
# import wave
# from pydub impo... | 36.348387 | 120 | 0.592474 |
a4231d9ebb1a9fdc4a81aec0b543a74474670f0f | 2,100 | py | Python | design_pattern/memento/implementation.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | design_pattern/memento/implementation.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | design_pattern/memento/implementation.py | AustinHellerRepo/DesignPatternDemo | 2409315eb7494ff738e64e1ca51206fb46083040 | [
"MIT"
] | null | null | null | from __future__ import annotations
from design_pattern.memento.framework import Originator, Memento, Caretaker
from typing import List
from abc import ABC, abstractmethod
| 21 | 77 | 0.717143 |
a4240ee1b9db3f17a8dd298ac6bf093a45330092 | 1,266 | py | Python | api/src/controller/feature/FeatureDataController.py | SamuelJansen/FeatureManager | 6b259aeb073ff705273e7d1f283232272fd629c9 | [
"MIT"
] | 1 | 2021-11-21T21:18:32.000Z | 2021-11-21T21:18:32.000Z | api/src/controller/feature/FeatureDataController.py | SamuelJansen/FeatureManager | 6b259aeb073ff705273e7d1f283232272fd629c9 | [
"MIT"
] | null | null | null | api/src/controller/feature/FeatureDataController.py | SamuelJansen/FeatureManager | 6b259aeb073ff705273e7d1f283232272fd629c9 | [
"MIT"
] | null | null | null | from python_framework import Controller, ControllerMethod, HttpStatus
from Role import *
from dto.FeatureDataDto import *
| 42.2 | 109 | 0.750395 |
a42417cf892903846a33b5f67340a94ae1ceca6b | 3,251 | py | Python | onadata/libs/tests/test_authentication.py | aondiaye/myhelpline | d72120ee31b6713cbaec79f299f5ee8bcb7ea429 | [
"BSD-3-Clause"
] | 1 | 2020-01-28T07:50:44.000Z | 2020-01-28T07:50:44.000Z | onadata/libs/tests/test_authentication.py | aondiaye/myhelpline | d72120ee31b6713cbaec79f299f5ee8bcb7ea429 | [
"BSD-3-Clause"
] | 14 | 2018-07-10T12:48:46.000Z | 2022-03-11T23:24:51.000Z | onadata/libs/tests/test_authentication.py | aondiaye/myhelpline | d72120ee31b6713cbaec79f299f5ee8bcb7ea429 | [
"BSD-3-Clause"
] | 5 | 2018-07-04T07:59:14.000Z | 2020-01-28T07:50:18.000Z | from datetime import timedelta
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
from onadata.apps.api.models.temp_token import TempToken
from onadata.libs.authentication import (DigestAuthentication,
TempTokenAuthenti... | 38.247059 | 79 | 0.690557 |
a42497da92f6de02b52dcb1300d62ba8d55c4d68 | 1,918 | py | Python | protein_transformer/models/transformer/Encoder.py | joegomes/protein-transformer | 3ac6d4d8e632e8e610191447c0ad950247f6987a | [
"BSD-3-Clause"
] | 77 | 2019-11-17T20:36:01.000Z | 2022-02-19T23:41:16.000Z | protein_transformer/models/transformer/Encoder.py | joegomes/protein-transformer | 3ac6d4d8e632e8e610191447c0ad950247f6987a | [
"BSD-3-Clause"
] | 8 | 2020-02-10T23:00:11.000Z | 2020-07-06T17:28:08.000Z | protein_transformer/models/transformer/Encoder.py | joegomes/protein-transformer | 3ac6d4d8e632e8e610191447c0ad950247f6987a | [
"BSD-3-Clause"
] | 16 | 2020-02-16T12:35:04.000Z | 2022-02-19T23:41:23.000Z | import torch
from .Attention import MultiHeadedAttention
from .Sublayers import PositionwiseFeedForward, PositionalEncoding, \
SublayerConnection, Embeddings
| 35.518519 | 122 | 0.683003 |
a42561eef40ebc9c8026f949326c153bc04718cb | 2,701 | py | Python | pycmbs/utils/download.py | pygeo/pycmbs | 0df863e1575ffad21c1ea9790bcbd3a7982d99c6 | [
"MIT"
] | 9 | 2015-04-01T04:22:25.000Z | 2018-08-31T03:51:34.000Z | pycmbs/utils/download.py | pygeo/pycmbs | 0df863e1575ffad21c1ea9790bcbd3a7982d99c6 | [
"MIT"
] | 14 | 2015-01-27T20:33:10.000Z | 2016-06-02T07:23:25.000Z | pycmbs/utils/download.py | pygeo/pycmbs | 0df863e1575ffad21c1ea9790bcbd3a7982d99c6 | [
"MIT"
] | 8 | 2015-02-07T20:46:42.000Z | 2019-10-25T00:36:32.000Z | # -*- coding: utf-8 -*-
"""
This file is part of pyCMBS.
(c) 2012- Alexander Loew
For COPYING and LICENSE details, please refer to the LICENSE file
"""
import os
from pycmbs.data import Data
import tempfile
def get_example_directory():
""" returns directory where this file is located """
testfile = 'xxxxdow... | 28.431579 | 176 | 0.626064 |
a426764515c1012ef25910725cad904015539dd7 | 3,926 | py | Python | tunediagram.py | levondov/Tune-Resonance-Diagram-Python | ba2092660d90497ed32aaeb77e90c56d8e6b4e5b | [
"MIT"
] | null | null | null | tunediagram.py | levondov/Tune-Resonance-Diagram-Python | ba2092660d90497ed32aaeb77e90c56d8e6b4e5b | [
"MIT"
] | null | null | null | tunediagram.py | levondov/Tune-Resonance-Diagram-Python | ba2092660d90497ed32aaeb77e90c56d8e6b4e5b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
def tunediagram(order=range(1,4),integer=[0,0],lines=[1,1,1,1],colors='ordered',linestyle='-',fig=plt.gcf()):
'''
plot resonance diagram up to specified order
mx + ny = p
x = (p-ny)/m
x = 1 where y = (p-m)/n
EXAMPLE:
tunediagram(order=... | 47.878049 | 180 | 0.553235 |
a4282424135e431f104c0bf3824b99ca40e73998 | 109 | py | Python | playground/read_wifi_name.py | Shingirai98/EEE3097 | b3880e163d1d195c52af16046e7d9f64fcb25676 | [
"Apache-2.0"
] | 12 | 2016-10-24T21:53:38.000Z | 2021-01-09T12:07:53.000Z | playground/read_wifi_name.py | Shingirai98/EEE3097 | b3880e163d1d195c52af16046e7d9f64fcb25676 | [
"Apache-2.0"
] | 14 | 2017-02-27T15:39:18.000Z | 2019-11-25T19:58:16.000Z | playground/read_wifi_name.py | Shingirai98/EEE3097 | b3880e163d1d195c52af16046e7d9f64fcb25676 | [
"Apache-2.0"
] | 5 | 2018-09-27T13:57:47.000Z | 2021-01-09T12:07:11.000Z | import os
wifi_name = os.popen("iw dev wlan0 link | grep SSID | awk '{print $2}'").read()
print(wifi_name)
| 18.166667 | 79 | 0.669725 |
a42a770af867da5fb6d28b2e7fd62f3f91b177ae | 852 | py | Python | hooks/tests/test_unit/test_validate_django_model_field_names/test_get_validator.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 4 | 2021-07-06T12:45:55.000Z | 2021-12-22T10:18:00.000Z | hooks/tests/test_unit/test_validate_django_model_field_names/test_get_validator.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 2 | 2021-04-02T13:13:09.000Z | 2021-04-07T09:09:16.000Z | hooks/tests/test_unit/test_validate_django_model_field_names/test_get_validator.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 9 | 2021-03-22T13:13:37.000Z | 2021-12-21T15:08:53.000Z | from __future__ import annotations
import pytest
from hooks.validate_django_model_field_names import boolean_validator, date_validator, datetime_validator, get_validator
| 34.08 | 120 | 0.714789 |
a42aaaefabd1777c05c0079ecb079385be873761 | 3,432 | py | Python | cloudify_agent/tests/api/test_factory.py | cloudify-cosmo/cloudify-agent | 9036842a31a31e0f5a25895dc9097a2f37c3eba9 | [
"Apache-2.0"
] | 12 | 2016-01-23T00:54:47.000Z | 2021-11-23T19:04:02.000Z | cloudify_agent/tests/api/test_factory.py | cloudify-cosmo/cloudify-agent | 9036842a31a31e0f5a25895dc9097a2f37c3eba9 | [
"Apache-2.0"
] | 122 | 2015-08-18T19:34:44.000Z | 2022-02-03T13:16:19.000Z | cloudify_agent/tests/api/test_factory.py | cloudify-cosmo/cloudify-agent | 9036842a31a31e0f5a25895dc9097a2f37c3eba9 | [
"Apache-2.0"
] | 22 | 2015-07-15T14:28:18.000Z | 2021-05-11T02:18:02.000Z | import os
import pytest
import shutil
from cloudify_agent.api import exceptions
from cloudify_agent.api import utils
from cloudify_agent.tests.utils import get_daemon_storage
from cloudify_agent.tests import random_id
| 33.980198 | 76 | 0.699301 |
a42dbc9e79d12c05738cde026c154e4692c14146 | 1,871 | py | Python | src/Build-models.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | 1 | 2021-12-08T19:21:07.000Z | 2021-12-08T19:21:07.000Z | src/Build-models.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | null | null | null | src/Build-models.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import logging
from sys import argv
from Classifier import regData
from configData import configData
import pickle
from dataInterface import read_features, load_molcounts_data
"""
Only build model with the input full data and dump with pickle
"""
if __name__ == "__main__":
main()
| 32.258621 | 127 | 0.73597 |
a43013b7968759fcfdbb2461db7345083080107c | 355 | py | Python | gquant/cuindicator/__init__.py | miguelangel/gQuant | 0bb5e392ce703d58baaf60668006e9a1f71d64ce | [
"Apache-2.0"
] | 2 | 2021-08-13T03:02:22.000Z | 2022-03-13T15:00:01.000Z | gquant/cuindicator/__init__.py | miguelangel/gQuant | 0bb5e392ce703d58baaf60668006e9a1f71d64ce | [
"Apache-2.0"
] | 3 | 2020-10-06T16:07:34.000Z | 2021-04-28T20:30:14.000Z | gquant/cuindicator/__init__.py | miguelangel/gQuant | 0bb5e392ce703d58baaf60668006e9a1f71d64ce | [
"Apache-2.0"
] | null | null | null | from .ewm import Ewm
from .indicator import * # noqa: F403
from .pewm import PEwm
from .rolling import Rolling
from .util import (shift, diff, substract, summation,
multiply, division, scale, cumsum)
__all__ = ["Ewm", "PEwm", "Rolling", "shift", "diff", "substract",
"summation", "multipl... | 35.5 | 66 | 0.642254 |
a4305c430ee540a2cfbbd8de175313f63a2e5be0 | 1,063 | py | Python | backblaze/tests/awaiting/test_files.py | WardPearce/aiob2 | 3dcff9c3aa7612ce7b43375fca379c1358121a4a | [
"MIT"
] | null | null | null | backblaze/tests/awaiting/test_files.py | WardPearce/aiob2 | 3dcff9c3aa7612ce7b43375fca379c1358121a4a | [
"MIT"
] | null | null | null | backblaze/tests/awaiting/test_files.py | WardPearce/aiob2 | 3dcff9c3aa7612ce7b43375fca379c1358121a4a | [
"MIT"
] | 1 | 2019-07-16T03:38:49.000Z | 2019-07-16T03:38:49.000Z | import asynctest
from uuid import uuid4
from .client import CLIENT
from ...settings import BucketSettings
from ...models.file import FileModel
from ...bucket.awaiting import AwaitingFile
| 23.108696 | 66 | 0.585136 |
a4313a8cb9b42c4803f94ed9278e0e452cf914fe | 1,044 | py | Python | requestForProposals.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | requestForProposals.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | requestForProposals.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | # Import external modules.
from google.appengine.ext import ndb
import logging
# Import local modules.
from configuration import const as conf
from constants import Constants
const = Constants()
const.MAX_RETRY = 3
# Parent key: none
| 29.828571 | 103 | 0.750958 |
a432127ca424bf2078e641f02350e6a86d7a56dc | 3,943 | py | Python | RelevantRecommendation.py | ma-zhiyuan/DynameDB-data-transfer | 481d321f4ba21ac190f9ac65995f7373447aad46 | [
"Apache-2.0"
] | null | null | null | RelevantRecommendation.py | ma-zhiyuan/DynameDB-data-transfer | 481d321f4ba21ac190f9ac65995f7373447aad46 | [
"Apache-2.0"
] | null | null | null | RelevantRecommendation.py | ma-zhiyuan/DynameDB-data-transfer | 481d321f4ba21ac190f9ac65995f7373447aad46 | [
"Apache-2.0"
] | null | null | null | #-*-coding:utf8-*-
from __future__ import print_function # Python 2/3 compatibility
import boto3
import time
import json
import decimal
import datetime
import json
from boto3.dynamodb.conditions import Key, Attr
from botocore.exceptions import ClientError
if __name__ =="__main__":
print("start...")
... | 33.700855 | 127 | 0.492772 |
a4322add8a068e7ab80e2464fbfab257f4b3067a | 5,465 | py | Python | library/docker/docker.py | Kafkamorph/shutit | e281be48d6f102518506ad07754116452781a369 | [
"MIT"
] | null | null | null | library/docker/docker.py | Kafkamorph/shutit | e281be48d6f102518506ad07754116452781a369 | [
"MIT"
] | null | null | null | library/docker/docker.py | Kafkamorph/shutit | e281be48d6f102518506ad07754116452781a369 | [
"MIT"
] | null | null | null | #Copyright (C) 2014 OpenBet Limited
#
#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, publish, distribu... | 34.588608 | 115 | 0.699726 |
a4333fa56aa32283420d3b251efd39d130b3d048 | 170 | py | Python | old_code/src_python/nmpccodegen/example_models/__init__.py | kul-forbes/nmpc-codegen | 0b96da0840504817472b2bdc62c29c98bdf29c8f | [
"MIT"
] | 24 | 2017-11-13T02:17:10.000Z | 2021-03-15T13:47:20.000Z | old_code/src_python/nmpccodegen/example_models/__init__.py | kul-optec/nmpc-codegen | 0b96da0840504817472b2bdc62c29c98bdf29c8f | [
"MIT"
] | 14 | 2018-01-13T20:20:47.000Z | 2020-05-12T11:21:12.000Z | old_code/src_python/nmpccodegen/example_models/__init__.py | kul-optec/nmpc-codegen | 0b96da0840504817472b2bdc62c29c98bdf29c8f | [
"MIT"
] | 5 | 2018-08-14T14:27:41.000Z | 2020-12-17T08:13:41.000Z | from .example_model import get_chain_model,get_trailer_model
from .trailer_printer import trailer_print,draw_rectangular_obstacle,draw_rectangular_obstacle_around_center | 85 | 109 | 0.923529 |
a435fdb348bc83572643037370a05d49026aaf60 | 11,637 | py | Python | fixture/contact.py | asmirnova-code/python-training | 20fdae3d916ae919c7529df4fb0f8db85e0713c1 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | asmirnova-code/python-training | 20fdae3d916ae919c7529df4fb0f8db85e0713c1 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | asmirnova-code/python-training | 20fdae3d916ae919c7529df4fb0f8db85e0713c1 | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.support.ui import Select
from model.contact import Contact
import re
| 39.181818 | 124 | 0.640801 |
a436e3db21c5de4499c7dacad151e9a9365a2dd6 | 18,815 | py | Python | Tac Tac Toe/ttt.py | promitbasak/TicTacToe-Pygame | 6114cee9498d70942f48a0b6eb360f02bcf72df0 | [
"MIT"
] | 3 | 2020-06-15T13:50:51.000Z | 2021-08-18T05:10:17.000Z | Tac Tac Toe/ttt.py | promitbasak/TicTacToe-Pygame | 6114cee9498d70942f48a0b6eb360f02bcf72df0 | [
"MIT"
] | null | null | null | Tac Tac Toe/ttt.py | promitbasak/TicTacToe-Pygame | 6114cee9498d70942f48a0b6eb360f02bcf72df0 | [
"MIT"
] | 1 | 2020-06-15T13:52:49.000Z | 2020-06-15T13:52:49.000Z | import random
import time
CELLS = 9
PLAYERS = 2
CORNERS = [1, 3, 7, 9]
NON_CORNERS = [2, 4, 6, 8]
board = {}
for i in range(9):
board[i + 1] = 0
signs = {0: " ", 1: "X", 2: "O"}
winner = None
def getintinput(prompt, lower, upper):
while True:
print()
try... | 33.359929 | 113 | 0.427212 |
a436e482639b0abf6bcb6515fdce626a869a39e5 | 130 | py | Python | textattack/models/__init__.py | fighting41love/TextAttack | 24e48f0022dc3a7bdcd5cbb3430f1c72cfcb522d | [
"MIT"
] | 2 | 2020-07-08T08:55:37.000Z | 2020-09-03T00:57:38.000Z | textattack/models/__init__.py | SatoshiRobatoFujimoto/TextAttack | a809a9bddddff9f41750949e26edde26c8af6cfa | [
"MIT"
] | null | null | null | textattack/models/__init__.py | SatoshiRobatoFujimoto/TextAttack | a809a9bddddff9f41750949e26edde26c8af6cfa | [
"MIT"
] | null | null | null | from . import classification
from . import entailment
from . import translation
from . import summarization
from . import helpers | 21.666667 | 28 | 0.807692 |
a4386ceade7d6fdac9ada37366e735be1d6b8d27 | 4,843 | py | Python | tests/test_analysis/test_plotters.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 326 | 2021-11-18T15:30:50.000Z | 2022-03-31T09:44:15.000Z | tests/test_analysis/test_plotters.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 305 | 2021-11-17T10:28:31.000Z | 2022-03-31T18:05:03.000Z | tests/test_analysis/test_plotters.py | martins0n/etna | 51e9cec5183da2499ca247b0e2db215507246ceb | [
"Apache-2.0"
] | 29 | 2021-11-21T12:10:48.000Z | 2022-03-31T22:55:06.000Z | import numpy as np
import pandas as pd
import pytest
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import TheilSenRegressor
from etna.analysis import get_residuals
from etna.analysis import plot_residuals
from etna.analysis import plot_trend
from etna.analysis.plotters import _get_labels_... | 39.696721 | 118 | 0.730539 |
a43986ed893a75e4ed1f463ade811aae336ec616 | 219 | py | Python | tests/EntityForTest.py | novaweb-mobi/nova-api | 2887118ff10d18f366ce661262bd25bb96648470 | [
"MIT"
] | 3 | 2020-09-08T23:33:41.000Z | 2021-12-24T20:50:13.000Z | tests/EntityForTest.py | novaweb-mobi/nova-api | 2887118ff10d18f366ce661262bd25bb96648470 | [
"MIT"
] | 39 | 2020-07-29T12:34:14.000Z | 2022-03-05T16:50:29.000Z | tests/EntityForTest.py | novaweb-mobi/nova-api | 2887118ff10d18f366ce661262bd25bb96648470 | [
"MIT"
] | 1 | 2021-03-05T19:41:58.000Z | 2021-03-05T19:41:58.000Z | from dataclasses import dataclass, field
from nova_api.entity import Entity
| 21.9 | 75 | 0.748858 |
a43ac4fa369c690b6e23eab07071fcaf7fb064ef | 1,022 | py | Python | scripts/downloadcsv.py | payalbal/gbifprocessing | 96919f58de03ed84cf47d852a2567718026bd923 | [
"Apache-2.0"
] | null | null | null | scripts/downloadcsv.py | payalbal/gbifprocessing | 96919f58de03ed84cf47d852a2567718026bd923 | [
"Apache-2.0"
] | 2 | 2022-03-11T04:22:44.000Z | 2022-03-11T04:24:37.000Z | scripts/downloadcsv.py | payalbal/gbifprocessing | 96919f58de03ed84cf47d852a2567718026bd923 | [
"Apache-2.0"
] | null | null | null | import requests
import io
import zipfile
import shutil
STOREPATH = '/data/csv/'
url = 'http://api.gbif.org/v1/occurrence/download/request/0020324-191105090559680.zip'
dirpath = '/data/csv/'
download_chunk(url, dirpath)
unzip_chunk( dirpath )
| 29.2 | 86 | 0.664384 |
a43b6bd99ed126f9facb51ef643c518482f41775 | 2,200 | py | Python | cookbook/c08/p18_mixin_classes.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 3 | 2018-09-19T06:44:13.000Z | 2019-03-24T10:07:07.000Z | cookbook/c08/p18_mixin_classes.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 2 | 2020-09-19T17:10:23.000Z | 2020-10-17T16:43:52.000Z | cookbook/c08/p18_mixin_classes.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 1 | 2020-12-22T06:33:18.000Z | 2020-12-22T06:33:18.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic:
Desc : Minxin
Mixin
"""
d = LoggedDict()
d['x'] = 23
print(d['x'])
del d['x']
from collections import defaultdict
d = SetOnceDefaultDict(list)
d['x'].append(2)
d['x'].append(3)
# d['x'] = 23 # KeyError: 'x already set'
def LoggedMapping(cls):
... | 21.568627 | 59 | 0.630909 |
a43b7b785ea2069cf30bf58f80e9cd62796231df | 387 | py | Python | setup.py | exord/cobmcmc | 162ba8d4fab35aa44bc8a4828eb51e25df13c4e2 | [
"MIT"
] | null | null | null | setup.py | exord/cobmcmc | 162ba8d4fab35aa44bc8a4828eb51e25df13c4e2 | [
"MIT"
] | null | null | null | setup.py | exord/cobmcmc | 162ba8d4fab35aa44bc8a4828eb51e25df13c4e2 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(name='cobmcmc',
description='Change-of-Basis, '
'a flexible Metropolis-Hastings MCMC algorithm.',
version='0.1.0',
author='Rodrigo F. Diaz',
author_email='rodrigo.diaz@unige.ch',
url='',
long_description='**COMING SOON**',
... | 27.642857 | 67 | 0.589147 |
a43b8626c307f4008f5105138f5bf011afcc7ed3 | 2,081 | py | Python | tradebook/funds/serializers.py | isuryanarayanan/tradebook-backend | 86c9e3c5adccb13b95945604c3d1e5c43066532c | [
"MIT"
] | null | null | null | tradebook/funds/serializers.py | isuryanarayanan/tradebook-backend | 86c9e3c5adccb13b95945604c3d1e5c43066532c | [
"MIT"
] | null | null | null | tradebook/funds/serializers.py | isuryanarayanan/tradebook-backend | 86c9e3c5adccb13b95945604c3d1e5c43066532c | [
"MIT"
] | null | null | null | """ Serializers for API views """
# Module imports
from rest_framework import serializers
from django.contrib.auth import authenticate
from funds.models import Wallet
| 31.530303 | 79 | 0.697741 |
a43d0d4f8d7041f95539b622510fd027dd14e5bf | 947 | py | Python | examples/customers.py | AbdulMoeed-140212/mailwizz-python-sdk | 669fd974382a8d61036e569f8c4a99838d045fa4 | [
"MIT"
] | 6 | 2019-10-25T22:26:36.000Z | 2021-02-28T22:17:58.000Z | examples/customers.py | AbdulMoeed-140212/mailwizz-python-sdk | 669fd974382a8d61036e569f8c4a99838d045fa4 | [
"MIT"
] | 5 | 2020-01-11T17:39:07.000Z | 2022-02-13T18:17:13.000Z | examples/customers.py | AbdulMoeed-140212/mailwizz-python-sdk | 669fd974382a8d61036e569f8c4a99838d045fa4 | [
"MIT"
] | 7 | 2019-07-23T06:34:44.000Z | 2021-09-27T14:05:44.000Z | from setup_api import setup
from mailwizz.endpoint.customers import Customers
"""
SETUP THE API
"""
setup()
"""
CREATE THE ENDPOINT
"""
endpoint = Customers()
"""
CREATE CUSTOMER
"""
response = endpoint.create({
'customer': {
'first_name': 'John',
'last_name': 'Doe',
'email': 'john.doe@do... | 22.547619 | 105 | 0.608237 |
a43e0055a13be7d6f22f7eebb5c56991292274e9 | 1,384 | py | Python | package.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | package.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | package.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | #!/bin/env python
###############################################################################
# Copyright (c) Lawrence Livermore National Security, LLC and other Ascent
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to... | 33.756098 | 87 | 0.527457 |
a43edff2bca252c202547a4220b20784da0fb45a | 2,757 | py | Python | Assignment_3.py | Lee-Lilly/Embedded-python | 57a3da93be9ce27c5f196b76a3ad83340e44451c | [
"MIT"
] | null | null | null | Assignment_3.py | Lee-Lilly/Embedded-python | 57a3da93be9ce27c5f196b76a3ad83340e44451c | [
"MIT"
] | null | null | null | Assignment_3.py | Lee-Lilly/Embedded-python | 57a3da93be9ce27c5f196b76a3ad83340e44451c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# ---
# # Python Basics - Assingment 3 ToDo
#
# ---
# **Exercise 1**
#
# **Task 1** Define a function called **repeat_stuff** that takes in two inputs, **stuff**, and **num_repeats**.
#
# We will want to make this function print a string with stuff repeated num_repeats amount o... | 24.184211 | 164 | 0.665579 |
a4412e6d819800bfa4c95e8966db3d3ce6218c2c | 875 | py | Python | cogs/moderation.py | robonone/RoboNone | 8795367ee38fac2110b4b5fc6d1f733a07f7caa4 | [
"MIT"
] | 6 | 2019-03-16T05:55:14.000Z | 2019-04-05T10:10:37.000Z | cogs/moderation.py | robonone/RoboNone | 8795367ee38fac2110b4b5fc6d1f733a07f7caa4 | [
"MIT"
] | 6 | 2019-03-09T07:29:27.000Z | 2019-04-07T17:57:14.000Z | cogs/moderation.py | peteranytime/RoboNone | 8795367ee38fac2110b4b5fc6d1f733a07f7caa4 | [
"MIT"
] | 3 | 2019-06-07T11:08:33.000Z | 2021-02-13T07:33:10.000Z | import argparse
import copy
import datetime
import re
import shlex
from typing import Union
import time
import discord
from discord.ext import commands
| 22.435897 | 89 | 0.684571 |
a4413159fd227ec62328bd4292601f85b5ced963 | 2,486 | py | Python | examples.py | JayakrishnanAjayakumar/pcml | 1ac37e95ef68c1661fd4a0b1e6f500a14f103ecb | [
"BSD-3-Clause"
] | 1 | 2018-03-07T20:35:15.000Z | 2018-03-07T20:35:15.000Z | examples.py | Jindam/HPCGISLab | 54ec030cd87b3f6f46ea68cdf007b21344517515 | [
"BSD-3-Clause"
] | null | null | null | examples.py | Jindam/HPCGISLab | 54ec030cd87b3f6f46ea68cdf007b21344517515 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
"""
Copyright (c) 2014 High-Performance Computing and GIS (HPCGIS) Laboratory. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Authors and contributors: Eric Shook (eshook@kent.edu); Zhengliang Feng (odayfans@gmail.com, zfeng2@kent... | 28.906977 | 109 | 0.678198 |
a4426592f5f9a887ec3c6cdd36ebe20492020363 | 484 | py | Python | magichour/validate/splitter.py | Lab41/magichour | 69c03e87fe5d067068f298a5cf9e005a97b337db | [
"Apache-2.0"
] | 34 | 2016-01-10T22:03:10.000Z | 2020-06-29T08:06:58.000Z | magichour/validate/splitter.py | Lab41/magichour | 69c03e87fe5d067068f298a5cf9e005a97b337db | [
"Apache-2.0"
] | 2 | 2017-07-24T16:45:42.000Z | 2017-10-20T20:18:49.000Z | magichour/validate/splitter.py | Lab41/magichour | 69c03e87fe5d067068f298a5cf9e005a97b337db | [
"Apache-2.0"
] | 20 | 2015-12-14T19:45:02.000Z | 2019-07-10T14:51:48.000Z | from random import shuffle
| 26.888889 | 62 | 0.650826 |
a442c144831d337a7da0927dc8fc3b093e18af2f | 1,085 | py | Python | newton.py | Robokkie/NA | bce44ecd6f64ecea79d256cad4115d57e80e9576 | [
"MIT"
] | null | null | null | newton.py | Robokkie/NA | bce44ecd6f64ecea79d256cad4115d57e80e9576 | [
"MIT"
] | null | null | null | newton.py | Robokkie/NA | bce44ecd6f64ecea79d256cad4115d57e80e9576 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import math
from function import Function
import function
if __name__ == '__main__':
print "please input the number that a,b,c,d for function"
a,b,c,d = map(int, raw_input('input a,b,c,d=').split(","))
func=Function(a,b,c,d)
func.showinfo()
while True:
print "in... | 20.865385 | 63 | 0.62212 |
a443c72d8156330059da24b74344db7357392bbb | 12,006 | py | Python | tests/amply_tests.py | ruxkor/pulp-or | 94f3cbe182e8adbd52bf996623f1f5e0ceb8e5ad | [
"MIT"
] | 2 | 2016-01-12T15:56:56.000Z | 2019-09-05T07:13:29.000Z | tests/amply_tests.py | ruxkor/pulp-or | 94f3cbe182e8adbd52bf996623f1f5e0ceb8e5ad | [
"MIT"
] | null | null | null | tests/amply_tests.py | ruxkor/pulp-or | 94f3cbe182e8adbd52bf996623f1f5e0ceb8e5ad | [
"MIT"
] | 7 | 2015-02-09T04:36:15.000Z | 2020-01-04T15:21:14.000Z | from pulp.amply import Amply, AmplyError
from StringIO import StringIO
from nose.tools import assert_raises
| 24.06012 | 71 | 0.4337 |
a4440ecfd59d5c586b8a71aa35706350a290fc0b | 143 | py | Python | toggldash/__init__.py | bigpappathanos-web/Toggl-Dashboard | 1c52191efb3bcbcff0cb941640979201d035d9a1 | [
"MIT"
] | 13 | 2020-12-30T18:19:58.000Z | 2022-03-02T11:58:18.000Z | toggldash/__init__.py | bigpappathanos-web/Toggl-Dashboard | 1c52191efb3bcbcff0cb941640979201d035d9a1 | [
"MIT"
] | 4 | 2021-02-28T06:28:11.000Z | 2021-04-06T18:22:51.000Z | toggldash/__init__.py | bigpappathanos-web/Toggl-Dashboard | 1c52191efb3bcbcff0cb941640979201d035d9a1 | [
"MIT"
] | 1 | 2021-02-21T04:05:40.000Z | 2021-02-21T04:05:40.000Z | from .response import process_response
from .response import get_response
from .app import run
# __all__ = ["process_response", "get_response"] | 35.75 | 48 | 0.804196 |
a4441378c3135c8d9a9f00c4a3a64345ab77f794 | 6,482 | py | Python | fourq-master/impl/compare.py | rikard-sics/group-oscore-key | 463163334e42da86ecf26374ed89e2cb750f6e18 | [
"BSD-3-Clause"
] | 1 | 2022-01-07T13:46:08.000Z | 2022-01-07T13:46:08.000Z | fourq-master/impl/compare.py | rikard-sics/group-oscore-key | 463163334e42da86ecf26374ed89e2cb750f6e18 | [
"BSD-3-Clause"
] | null | null | null | fourq-master/impl/compare.py | rikard-sics/group-oscore-key | 463163334e42da86ecf26374ed89e2cb750f6e18 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from random import getrandbits
from time import time
from fields import GFp2, GFp25519, p1271, p25519
import curve4q
import curve25519
# Adjust these if you want more/fewer samples
FIELD_TEST_LOOPS = 1000
DH_TEST_LOOPS = 100
if __name__ == "__main__":
compare_fields()
compare_ops()
... | 28.808889 | 107 | 0.597346 |
a4463b95c1d4eeb9a2a5beb88b29bf8801a14e7e | 1,005 | py | Python | var/spack/repos/builtin/packages/py-flit-core/package.py | zygyz/spack | e0f044561e9b3cb384bfb0f364555e5875b1a492 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/py-flit-core/package.py | LLNL/spack | 0b2507053e58ef4058631c10e5d9bf7ea2222c20 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/py-flit-core/package.py | hfp/spack | 0b2507053e58ef4058631c10e5d9bf7ea2222c20 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os
import zipfile
from spack import *
| 30.454545 | 95 | 0.681592 |
a4463e72421b8daeaa7e0c541bd74faeb28995dc | 49 | py | Python | apps/pyexe/hello_world.py | gzvulon/pydocflow | 9184894630903f2aaf238cd70fff2d0cc9132b81 | [
"MIT"
] | null | null | null | apps/pyexe/hello_world.py | gzvulon/pydocflow | 9184894630903f2aaf238cd70fff2d0cc9132b81 | [
"MIT"
] | null | null | null | apps/pyexe/hello_world.py | gzvulon/pydocflow | 9184894630903f2aaf238cd70fff2d0cc9132b81 | [
"MIT"
] | 2 | 2021-05-28T11:01:43.000Z | 2021-05-30T15:14:32.000Z | #cython: language_level=3
print("Hello World!")
| 12.25 | 25 | 0.734694 |
a4469c6f07cac8a79a9455db3229c5a1f7adc714 | 298 | py | Python | commercia/offers/config.py | commoncode/economica | 3de2415d7f0e0e81cc6ac7a054839daeb1ba6748 | [
"IJG"
] | 2 | 2015-09-14T10:13:39.000Z | 2015-09-14T12:53:45.000Z | commercia/offers/config.py | commoncode/economica | 3de2415d7f0e0e81cc6ac7a054839daeb1ba6748 | [
"IJG"
] | null | null | null | commercia/offers/config.py | commoncode/economica | 3de2415d7f0e0e81cc6ac7a054839daeb1ba6748 | [
"IJG"
] | null | null | null | from django.apps import AppConfig
from django.utils.importlib import import_module | 29.8 | 53 | 0.741611 |
a4474528822317d73d77d6d9db96f75001ee8d9a | 1,549 | py | Python | tracardi/tests/unit/mocks/mock_storage.py | ryomahan/read-tracardi | 216b05395d70a869593a60e2804e0a71b58dfc8f | [
"MIT"
] | 29 | 2021-04-17T06:04:46.000Z | 2021-11-25T10:22:43.000Z | tracardi/tests/unit/mocks/mock_storage.py | ryomahan/read-tracardi | 216b05395d70a869593a60e2804e0a71b58dfc8f | [
"MIT"
] | 77 | 2021-04-03T21:20:04.000Z | 2021-10-17T10:12:23.000Z | tracardi/tests/unit/mocks/mock_storage.py | ryomahan/read-tracardi | 216b05395d70a869593a60e2804e0a71b58dfc8f | [
"MIT"
] | 17 | 2021-06-29T13:13:18.000Z | 2021-10-17T10:52:57.000Z | sessions = [{
"1": {
"type": "session",
"source": {"id": "scope"},
"id": "1",
'profile': {"id": "1"}
}
}]
profiles = [
{"1": {'id': "1", "traits": {}}},
{"2": {'id': "2", "traits": {}}},
]
| 24.203125 | 80 | 0.551323 |
a44841b11738814c53965ad661b4157e05b3b4ca | 7,255 | py | Python | 7_VAE.py | shenkev/Pyro-Tutorial | a07e38dfa841379d31db6b5f760cc717b0ef939d | [
"Apache-2.0"
] | null | null | null | 7_VAE.py | shenkev/Pyro-Tutorial | a07e38dfa841379d31db6b5f760cc717b0ef939d | [
"Apache-2.0"
] | null | null | null | 7_VAE.py | shenkev/Pyro-Tutorial | a07e38dfa841379d31db6b5f760cc717b0ef939d | [
"Apache-2.0"
] | null | null | null | import os
import matplotlib.pyplot as plt
from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter(log_dir="./logs")
from tqdm import tqdm
import numpy as np
import torch
import torchvision.datasets as dset
import torch.nn as nn
import torchvision.transforms as transforms
import pyro
import pyro.distr... | 38.590426 | 161 | 0.682702 |
a44a4231fa12b52d4dbb4a4c31e144cce9f32f67 | 491 | py | Python | examples/null_support/client.py | amrhgh/django-grpc-framework | 158e1d9001bd426410ca962e2f72b14ee3e2f935 | [
"Apache-2.0"
] | 269 | 2020-05-06T03:22:43.000Z | 2022-03-26T21:05:24.000Z | examples/null_support/client.py | amrhgh/django-grpc-framework | 158e1d9001bd426410ca962e2f72b14ee3e2f935 | [
"Apache-2.0"
] | 19 | 2020-06-03T03:46:39.000Z | 2022-03-30T20:24:55.000Z | examples/null_support/client.py | amrhgh/django-grpc-framework | 158e1d9001bd426410ca962e2f72b14ee3e2f935 | [
"Apache-2.0"
] | 39 | 2020-05-27T07:23:12.000Z | 2022-03-27T13:10:24.000Z | import grpc
import snippets_pb2
import snippets_pb2_grpc
from google.protobuf.struct_pb2 import NullValue
with grpc.insecure_channel('localhost:50051') as channel:
stub = snippets_pb2_grpc.SnippetControllerStub(channel)
request = snippets_pb2.Snippet(id=1, title='snippet title')
# send non-null value
... | 30.6875 | 63 | 0.753564 |
a44b6adc9aad47b1e7a576d3052c852674c75f05 | 1,194 | py | Python | backend/core/service/column_generator/faker_generator/person.py | pecimuth/synthia | a54265ca6f772959d395de789bfe16bf054d97ad | [
"MIT"
] | null | null | null | backend/core/service/column_generator/faker_generator/person.py | pecimuth/synthia | a54265ca6f772959d395de789bfe16bf054d97ad | [
"MIT"
] | null | null | null | backend/core/service/column_generator/faker_generator/person.py | pecimuth/synthia | a54265ca6f772959d395de789bfe16bf054d97ad | [
"MIT"
] | null | null | null | from typing import Optional
from core.service.column_generator.base import GeneratorCategory, RegisteredGenerator
from core.service.column_generator.faker_generator.base import FakerGenerator
from core.service.types import Types
| 24.875 | 85 | 0.770519 |
a44b81be4b5f996c49caae17c4954ab5a2d79374 | 31 | py | Python | ddtrace/contrib/vertica/constants.py | melancholy/dd-trace-py | 32d463e5465466bc876c85a45880a84824d9b47c | [
"Apache-2.0",
"BSD-3-Clause"
] | 308 | 2016-12-07T16:49:27.000Z | 2022-03-15T10:06:45.000Z | ddtrace/contrib/vertica/constants.py | melancholy/dd-trace-py | 32d463e5465466bc876c85a45880a84824d9b47c | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,928 | 2016-11-28T17:13:18.000Z | 2022-03-31T21:43:19.000Z | ddtrace/contrib/vertica/constants.py | melancholy/dd-trace-py | 32d463e5465466bc876c85a45880a84824d9b47c | [
"Apache-2.0",
"BSD-3-Clause"
] | 311 | 2016-11-27T03:01:49.000Z | 2022-03-18T21:34:03.000Z | # Service info
APP = "vertica"
| 10.333333 | 15 | 0.677419 |
a44c48f3e3ce5e20e3e7b72b596dd9b53b3b830c | 326 | py | Python | exercicios_mundo-I/ex008.py | Lucas-Lourencao/ExerciciosPython | e43ce23dbddd126abb9ce6c02bd39dac3677856e | [
"MIT"
] | null | null | null | exercicios_mundo-I/ex008.py | Lucas-Lourencao/ExerciciosPython | e43ce23dbddd126abb9ce6c02bd39dac3677856e | [
"MIT"
] | null | null | null | exercicios_mundo-I/ex008.py | Lucas-Lourencao/ExerciciosPython | e43ce23dbddd126abb9ce6c02bd39dac3677856e | [
"MIT"
] | null | null | null | m = float(input('Digite uma distncia em metros: '))
k = m/1000
hct = m/100
dct = m/10
dcm = m*10
cm = m*100
mm = m*1000
print('A distncia de {} metros informada corresponde a: \n{} Quilmetros;\n{} Hectmetros;\n{}Decmetros;\n{:.0f}Decmetros;\n{:.0f}Centmetros e;\n{:.0f}Milmetros.'.format(m, k, hct, dct, dcm, cm, mm))
| 36.222222 | 204 | 0.662577 |
a44d59b00e3227d6fcc0b5b424ab2c91d5b4da9f | 5,153 | py | Python | tests/units/round_messages/reach_quorum_test.py | iconloop/LFT2 | 3862d63aaf148f99240c6d4a54408dc2520b94c6 | [
"Apache-2.0"
] | 23 | 2020-02-10T10:08:20.000Z | 2021-11-17T02:02:06.000Z | tests/units/round_messages/reach_quorum_test.py | iconloop/LFT2 | 3862d63aaf148f99240c6d4a54408dc2520b94c6 | [
"Apache-2.0"
] | 3 | 2020-03-05T07:18:16.000Z | 2020-06-01T09:03:11.000Z | tests/units/round_messages/reach_quorum_test.py | iconloop/LFT2 | 3862d63aaf148f99240c6d4a54408dc2520b94c6 | [
"Apache-2.0"
] | 6 | 2020-02-21T02:02:40.000Z | 2021-12-01T23:35:07.000Z | import os
import random
import pytest
from typing import Tuple, Sequence
from lft.app.vote import DefaultVoteFactory, DefaultVote
from lft.consensus.round import RoundMessages
Setup = Tuple[Sequence[bytes], Sequence[DefaultVoteFactory], int, RoundMessages]
| 39.638462 | 110 | 0.627984 |
a44e7d114157939edcf2937f9e9b775fb40d7665 | 11,031 | py | Python | rally/common/logging.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | rally/common/logging.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | rally/common/logging.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014: Mirantis Inc.
# 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 b... | 32.830357 | 79 | 0.607651 |
a44fad2f5fcb3a41ba9515338dc41d23a0ccb179 | 8,128 | py | Python | kivyapp.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | 1 | 2021-02-11T04:42:28.000Z | 2021-02-11T04:42:28.000Z | kivyapp.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | null | null | null | kivyapp.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | null | null | null | from kivy.uix.screenmanager import Screen
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivymd.app import MDApp
from kivymd.uix.tab import MDTabsBase
from kivymd.icon_definitions import md_icons
from kivymd.uix.button import MDRectangleFlatButton
from kivy.lang import... | 32.126482 | 100 | 0.542815 |
a450260365598db276731bd5e9a50fe2e149415c | 180 | py | Python | ta_bot/__main__.py | ToxicPie/discord-ta-bot | 7ea163b11491039d2a287195d2026c4ed4b50b3b | [
"MIT"
] | null | null | null | ta_bot/__main__.py | ToxicPie/discord-ta-bot | 7ea163b11491039d2a287195d2026c4ed4b50b3b | [
"MIT"
] | null | null | null | ta_bot/__main__.py | ToxicPie/discord-ta-bot | 7ea163b11491039d2a287195d2026c4ed4b50b3b | [
"MIT"
] | null | null | null | import os
from . import setup_bot
bot_token = os.environ.get('DISCORD_BOT_TOKEN')
bot_prefix = os.environ.get('COMMAND_PREFIX')
bot = setup_bot(bot_prefix)
bot.run(bot_token)
| 15 | 47 | 0.766667 |
a45248cf312dc4dfd2b49dde543093e49b1a2175 | 724 | py | Python | bluebottle/geo/urls/api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/geo/urls/api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/geo/urls/api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | from django.conf.urls import url
from ..views import CountryList, CountryDetail, LocationList, GeolocationList, OfficeList, OfficeDetail
urlpatterns = [
url(r'^countries/$', CountryList.as_view(),
name='country-list'),
url(r'^countries/(?P<pk>\d+)$', CountryDetail.as_view(),
name='country-deta... | 31.478261 | 103 | 0.649171 |
a453f35423943d09ee98cc3713636f0e0c38c6c2 | 321 | py | Python | modules/controller/commands/key.py | TheSlimvReal/PSE---LA-meets-ML | 7614db17ae746c7b02dd95bd44d2c91ee3c1e662 | [
"BSD-2-Clause"
] | 4 | 2018-11-01T16:14:21.000Z | 2019-11-21T14:13:53.000Z | modules/controller/commands/key.py | TheSlimvReal/PSE---LA-meets-ML | 7614db17ae746c7b02dd95bd44d2c91ee3c1e662 | [
"BSD-2-Clause"
] | 56 | 2018-10-31T15:09:05.000Z | 2020-04-25T13:10:27.000Z | modules/controller/commands/key.py | TheSlimvReal/PSE---LA-meets-ML | 7614db17ae746c7b02dd95bd44d2c91ee3c1e662 | [
"BSD-2-Clause"
] | 1 | 2019-03-14T15:26:42.000Z | 2019-03-14T15:26:42.000Z | from enum import Enum
## enum that represents the possible keys a user can enter
#
# @extends Enum to get the enum logic
| 16.05 | 59 | 0.579439 |
a45509dc24a0723e173a7e22b62263a951a2051f | 9,690 | py | Python | quarkchain/evm/tests/new_statetest_utils.py | QuarkChain/pyquarkchain | af1dd06a50d918aaf45569d9b0f54f5ecceb6afe | [
"MIT"
] | 237 | 2018-09-18T00:47:14.000Z | 2022-03-21T21:43:07.000Z | quarkchain/evm/tests/new_statetest_utils.py | QuarkChain/pyquarkchain | af1dd06a50d918aaf45569d9b0f54f5ecceb6afe | [
"MIT"
] | 409 | 2018-09-18T01:02:29.000Z | 2022-01-24T20:51:58.000Z | quarkchain/evm/tests/new_statetest_utils.py | QuarkChain/pyquarkchain | af1dd06a50d918aaf45569d9b0f54f5ecceb6afe | [
"MIT"
] | 125 | 2018-09-18T00:47:28.000Z | 2022-03-24T20:00:46.000Z | import sys
from quarkchain.evm.state import State
from quarkchain.evm.common import FakeHeader
from quarkchain.evm.utils import (
decode_hex,
parse_int_or_hex,
sha3,
to_string,
remove_0x_head,
encode_hex,
big_endian_to_int,
)
from quarkchain.evm.config import default_config, Env
from quarkc... | 36.844106 | 126 | 0.577709 |
a458b2ebd0a58640f8c90b64f4898797fff32429 | 708 | py | Python | twitterprofiling/User.py | bisite/TwitterProfiling | 60148b7eaa93c2e5437af373c323601597a843ad | [
"MIT"
] | null | null | null | twitterprofiling/User.py | bisite/TwitterProfiling | 60148b7eaa93c2e5437af373c323601597a843ad | [
"MIT"
] | null | null | null | twitterprofiling/User.py | bisite/TwitterProfiling | 60148b7eaa93c2e5437af373c323601597a843ad | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import threading
from multiprocessing import Pool
from twitterprofiling.auxiliar import *
from twitterprofiling.twitter_manager import *
| 22.83871 | 72 | 0.673729 |
a45ce806ea7645021c9468e9821b10a0add3d443 | 785 | py | Python | dzdsu/lockfile.py | conqp/dayz-utils | 537a56849b22b1f20c7a056e73a19277eb612203 | [
"MIT"
] | null | null | null | dzdsu/lockfile.py | conqp/dayz-utils | 537a56849b22b1f20c7a056e73a19277eb612203 | [
"MIT"
] | null | null | null | dzdsu/lockfile.py | conqp/dayz-utils | 537a56849b22b1f20c7a056e73a19277eb612203 | [
"MIT"
] | null | null | null | """Lock file implementation."""
from os import linesep
from pathlib import Path
__all__ = ['LockFile']
| 21.216216 | 59 | 0.559236 |
a45e37b3b5f280947640757488e737918c7b33b1 | 4,013 | py | Python | docengine/doc.py | usernamedt/multitext-client | ebb9376fce0f001c6a887550fc33ffc764afdc71 | [
"MIT"
] | 1 | 2021-01-16T03:00:48.000Z | 2021-01-16T03:00:48.000Z | docengine/doc.py | usernamedt/multitext-server | 38417a8ae3b8cae5674936eca19371119d40bc92 | [
"MIT"
] | 1 | 2021-01-16T03:16:47.000Z | 2021-01-17T19:22:33.000Z | docengine/doc.py | usernamedt/multitext-server | 38417a8ae3b8cae5674936eca19371119d40bc92 | [
"MIT"
] | 1 | 2021-01-20T14:18:31.000Z | 2021-01-20T14:18:31.000Z | import json
from typing import List
from sortedcontainers import SortedList
from .allocator import Allocator
from .character import Character
from .char_position import CharPosition
| 31.351563 | 79 | 0.551956 |
a45e4ed493757e640af7009a767f89cb7677b88d | 8,625 | py | Python | models/mobilenet_v2/mobilenet_v2_dg.py | lfr-0531/DGNet | 490d2b3308a933091f05ee3cfea6ee4041f6492d | [
"MIT"
] | 13 | 2021-10-18T06:23:58.000Z | 2022-03-16T00:45:56.000Z | models/mobilenet_v2/mobilenet_v2_dg.py | lfr-0531/DGNet | 490d2b3308a933091f05ee3cfea6ee4041f6492d | [
"MIT"
] | 2 | 2022-02-10T06:52:00.000Z | 2022-03-06T14:48:25.000Z | models/mobilenet_v2/mobilenet_v2_dg.py | lfr-0531/DGNet | 490d2b3308a933091f05ee3cfea6ee4041f6492d | [
"MIT"
] | null | null | null | import torch
import math
import logging
from torch import nn
from prettytable import PrettyTable
from .mobilenet_v2_dg_util import ConvBNReLU_1st, InvertedResidual
__all__ = ['mobilenet_v2_dg']
def _make_divisible(v, divisor, min_value=None):
"""
This function is taken from the original tf repo.
It ens... | 47.651934 | 130 | 0.588638 |
a45fb124d5f0c0829dff57afa7245b138434bd43 | 2,477 | py | Python | layers/lstm.py | lvyufeng/basic_nlp_modules | 354aac74eaa268f6bc4cf29d44adbe8d3f41e9ad | [
"MIT"
] | 4 | 2020-05-01T16:30:24.000Z | 2021-04-05T12:50:48.000Z | layers/lstm.py | lvyufeng/basic_nlp_modules | 354aac74eaa268f6bc4cf29d44adbe8d3f41e9ad | [
"MIT"
] | null | null | null | layers/lstm.py | lvyufeng/basic_nlp_modules | 354aac74eaa268f6bc4cf29d44adbe8d3f41e9ad | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
# default torch version
# nn.LSTM(input_size, hidden_size, layer_num)
# use Linear layers
| 40.606557 | 113 | 0.643924 |
a45fe0bfc676cd6c402ac0c0888147ca834c13e5 | 267 | py | Python | pelican_events/signals/__init__.py | rackerlabs/pelican-events | cde148d095b7cf6fa1b4ba33ea750a8636ea9090 | [
"Apache-2.0"
] | null | null | null | pelican_events/signals/__init__.py | rackerlabs/pelican-events | cde148d095b7cf6fa1b4ba33ea750a8636ea9090 | [
"Apache-2.0"
] | null | null | null | pelican_events/signals/__init__.py | rackerlabs/pelican-events | cde148d095b7cf6fa1b4ba33ea750a8636ea9090 | [
"Apache-2.0"
] | null | null | null |
from blinker import signal
event_generator_init = signal('event_generator_init')
event_generator_finalized = signal('event_generator_finalized')
event_generator_preread = signal('event_generator_preread')
event_generator_context = signal('event_generator_context')
| 33.375 | 63 | 0.857678 |
a46139069b278b7a3371e6fcb3a75093788c168f | 82 | py | Python | twispy/__init__.py | 346pro/Twispy | 0d7729fc725fc718da9305ded897bce9021a3337 | [
"MIT"
] | 12 | 2017-04-08T17:21:27.000Z | 2018-08-30T14:26:18.000Z | twispy/__init__.py | StarryBlueSky/Twispy | 0d7729fc725fc718da9305ded897bce9021a3337 | [
"MIT"
] | 2 | 2017-04-14T20:01:55.000Z | 2017-11-06T13:14:47.000Z | twispy/__init__.py | StarryBlueSky/Twispy | 0d7729fc725fc718da9305ded897bce9021a3337 | [
"MIT"
] | 1 | 2019-11-03T02:24:40.000Z | 2019-11-03T02:24:40.000Z | # coding=utf-8
from twispy.request import Request
from twispy.handler import API
| 16.4 | 34 | 0.804878 |
a46141210cf1b5c50a5a3f99d060f6c9921406ef | 534 | py | Python | generator.py | ashishrao7/motion_contrast_3D | 1914dc6df8555f6720f445e9476aa759e423cc8c | [
"MIT"
] | null | null | null | generator.py | ashishrao7/motion_contrast_3D | 1914dc6df8555f6720f445e9476aa759e423cc8c | [
"MIT"
] | 1 | 2020-03-06T16:40:47.000Z | 2020-03-06T18:33:47.000Z | generator.py | ashishrao7/motion_contrast_3D | 1914dc6df8555f6720f445e9476aa759e423cc8c | [
"MIT"
] | 1 | 2022-02-26T21:34:34.000Z | 2022-02-26T21:34:34.000Z | import pattern
if __name__=='__main__':
main() | 28.105263 | 57 | 0.700375 |
a4669d9d29d0ac94144a7a972f616e9948724859 | 3,337 | py | Python | _tests/test_app.py | EinsteinCarrey/Shoppinglist | 8a5dbd22687619b189d69522090c0bc226384663 | [
"MIT"
] | null | null | null | _tests/test_app.py | EinsteinCarrey/Shoppinglist | 8a5dbd22687619b189d69522090c0bc226384663 | [
"MIT"
] | 8 | 2017-08-29T02:47:57.000Z | 2019-10-18T16:32:23.000Z | _tests/test_app.py | EinsteinNjoroge/Shoppinglist | 8a5dbd22687619b189d69522090c0bc226384663 | [
"MIT"
] | 3 | 2017-08-29T08:49:08.000Z | 2018-03-02T03:43:01.000Z | from unittest import TestCase
import global_functions
import app
from app import flask_app
| 32.086538 | 77 | 0.642194 |