hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 125 | 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 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cad70fcdf46fab26d26aca87875a510488dac36c | 820 | py | Python | setup.py | l3gacyb3ta/corgi | 6d4588ee239655a75357d48f407152fd0c0458d9 | [
"Unlicense"
] | 1 | 2022-01-22T17:29:02.000Z | 2022-01-22T17:29:02.000Z | setup.py | l3gacyb3ta/corgi | 6d4588ee239655a75357d48f407152fd0c0458d9 | [
"Unlicense"
] | null | null | null | setup.py | l3gacyb3ta/corgi | 6d4588ee239655a75357d48f407152fd0c0458d9 | [
"Unlicense"
] | null | null | null | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
with open('README.md') as f:
long_description = f.read()
setup(
name ='corgi-cli',
version ='1.0.0',
author ='Raleigh Wise',
author_email ='vibhu4agarwal@gmail.com',
url ='https://github.com/l3ga... | 24.848485 | 49 | 0.693902 | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
with open('README.md') as f:
long_description = f.read()
setup(
name ='corgi-cli',
version ='1.0.0',
author ='Raleigh Wise',
author_email ='vibhu4agarwal@gmail.com',
url ='https://github.com/l3ga... | 0 | 0 | 0 |
a1bda55486c984f946877843f1b5fd0c1729e793 | 448 | py | Python | multichat/multichat/urls.py | AChubatova/channels-examples | 6d9455d869fad943c90f96be4b45e7352f3d46b7 | [
"BSD-3-Clause"
] | null | null | null | multichat/multichat/urls.py | AChubatova/channels-examples | 6d9455d869fad943c90f96be4b45e7352f3d46b7 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:39:59.000Z | 2021-06-10T23:39:59.000Z | multichat/multichat/urls.py | AChubatova/channels-examples | 6d9455d869fad943c90f96be4b45e7352f3d46b7 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import login, logout
from chat.views import index
urlpatterns = [
url(r'^$', index),
url(r'^accounts/login/$', login),
url(r'^account... | 29.866667 | 67 | 0.736607 | from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import login, logout
from chat.views import index
urlpatterns = [
url(r'^$', index),
url(r'^accounts/login/$', login),
url(r'^account... | 0 | 0 | 0 |
53b886370b42170c16f719380aecd67727526e44 | 225 | py | Python | Exercicio_em_python/Soma_Impares.py | EduardoSlonzo/python_project | f6d9884c3dc1b37f20243c7c43a7846ccca2b6aa | [
"MIT"
] | null | null | null | Exercicio_em_python/Soma_Impares.py | EduardoSlonzo/python_project | f6d9884c3dc1b37f20243c7c43a7846ccca2b6aa | [
"MIT"
] | null | null | null | Exercicio_em_python/Soma_Impares.py | EduardoSlonzo/python_project | f6d9884c3dc1b37f20243c7c43a7846ccca2b6aa | [
"MIT"
] | 1 | 2021-02-23T18:51:52.000Z | 2021-02-23T18:51:52.000Z | print("Digite dois numeros: ")
x = int(input())
y = int(input())
if x > y:
troca = x
x = y
y = troca
soma = 0
for i in range(x, y):
if i % 2 != 0:
soma = soma + i
print(f"Soma dos impares = {soma}") | 15 | 35 | 0.506667 | print("Digite dois numeros: ")
x = int(input())
y = int(input())
if x > y:
troca = x
x = y
y = troca
soma = 0
for i in range(x, y):
if i % 2 != 0:
soma = soma + i
print(f"Soma dos impares = {soma}") | 0 | 0 | 0 |
c013e2251bd73886ad31aa42a8e7a7dd7fc6f506 | 251 | py | Python | falconswagger/mixins.py | dutradda/falcon-swagger | aaba9175817b18662194dc67091e31ec70664012 | [
"MIT"
] | 14 | 2016-11-01T17:57:09.000Z | 2021-03-09T12:43:38.000Z | falconswagger/mixins.py | dutradda/falcon-swagger | aaba9175817b18662194dc67091e31ec70664012 | [
"MIT"
] | 1 | 2016-11-30T13:08:56.000Z | 2017-01-16T00:13:40.000Z | falconswagger/mixins.py | dutradda/falcon-swagger | aaba9175817b18662194dc67091e31ec70664012 | [
"MIT"
] | 5 | 2016-11-01T16:24:09.000Z | 2018-06-06T01:20:57.000Z | import logging
| 22.818182 | 73 | 0.697211 | import logging
class LoggerMixin(object):
def _build_logger(self):
self._logger = logging.getLogger(self._build_logger_name())
def _build_logger_name(self):
return '{}.{}'.format(type(self).__module__, type(self).__name__)
| 153 | 5 | 77 |
7f19c8684a3df61b865edc847cb2fe8a31ebe1db | 6,038 | py | Python | energyusage/report.py | thegreenwebfoundation/energy-usage | e3db58ca48b05b874d64a07da1fec666972b041b | [
"Apache-2.0"
] | 1 | 2020-02-04T22:05:25.000Z | 2020-02-04T22:05:25.000Z | energyusage/report.py | thegreenwebfoundation/energy-usage | e3db58ca48b05b874d64a07da1fec666972b041b | [
"Apache-2.0"
] | null | null | null | energyusage/report.py | thegreenwebfoundation/energy-usage | e3db58ca48b05b874d64a07da1fec666972b041b | [
"Apache-2.0"
] | null | null | null | from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_RIGHT, TA_CENTER
from reportlab.lib import colors... | 41.07483 | 123 | 0.592912 | from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_RIGHT, TA_CENTER
from reportlab.lib import colors... | 748 | 0 | 46 |
341249c02abf4f6ae8602e3db34f7dcc74c81d51 | 1,112 | py | Python | tests/utils/test_stats.py | kmdalton/reciprocalspaceship | 50655f077cb670ee86e88480f54621780c8e9f0d | [
"MIT"
] | null | null | null | tests/utils/test_stats.py | kmdalton/reciprocalspaceship | 50655f077cb670ee86e88480f54621780c8e9f0d | [
"MIT"
] | 3 | 2021-08-23T19:21:03.000Z | 2021-08-23T21:11:14.000Z | tests/utils/test_stats.py | JBGreisman/reciprocalspaceship | cf936cca64c5c387ace505416a047318efa9375f | [
"MIT"
] | null | null | null | import pytest
import numpy as np
import reciprocalspaceship as rs
import gemmi
@pytest.mark.parametrize("cell_and_spacegroup", [
(gemmi.UnitCell(10., 20., 30., 90., 90., 90.), gemmi.SpaceGroup('P 21 21 21')),
(gemmi.UnitCell(30., 30., 30., 90., 90., 120.), gemmi.SpaceGroup('R 32')),
])
@pytest.mark.parametrize... | 39.714286 | 113 | 0.695144 | import pytest
import numpy as np
import reciprocalspaceship as rs
import gemmi
@pytest.mark.parametrize("cell_and_spacegroup", [
(gemmi.UnitCell(10., 20., 30., 90., 90., 90.), gemmi.SpaceGroup('P 21 21 21')),
(gemmi.UnitCell(30., 30., 30., 90., 90., 120.), gemmi.SpaceGroup('R 32')),
])
@pytest.mark.parametrize... | 0 | 0 | 0 |
5f83a19ad5e1d78c43eaca9999eab13073f4b2d9 | 487 | py | Python | basics/_027_celery_with_redis_django2/hackermonn/django_with_celery/api/views.py | Haldir65/Jimmy | 53ca49cdf25482c515f6058b7c2a9c1f611e2e5f | [
"Apache-2.0"
] | null | null | null | basics/_027_celery_with_redis_django2/hackermonn/django_with_celery/api/views.py | Haldir65/Jimmy | 53ca49cdf25482c515f6058b7c2a9c1f611e2e5f | [
"Apache-2.0"
] | null | null | null | basics/_027_celery_with_redis_django2/hackermonn/django_with_celery/api/views.py | Haldir65/Jimmy | 53ca49cdf25482c515f6058b7c2a9c1f611e2e5f | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
from celery import shared_task
@shared_task
| 27.055556 | 60 | 0.755647 | from django.shortcuts import render
# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
class BuildTrigger(APIView):
def post(self, request):
# build_something() # This would take 1 minute to finish
build_something.apply_async()
return Response(... | 217 | 7 | 68 |
31b84bf6f2b610fe9cc0b173d7232d43f0351245 | 20,500 | py | Python | core/views.py | mcflydesigner/innorussian | 70bec97ad349f340bd66cd8234d94f8829540397 | [
"MIT"
] | 1 | 2021-04-12T18:54:37.000Z | 2021-04-12T18:54:37.000Z | core/views.py | mcflydesigner/InnoRussian | 70bec97ad349f340bd66cd8234d94f8829540397 | [
"MIT"
] | null | null | null | core/views.py | mcflydesigner/InnoRussian | 70bec97ad349f340bd66cd8234d94f8829540397 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views import View
from django.views.generic.list import ListView
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.db.models import (Q, F, Case, When, PositiveInt... | 37.408759 | 102 | 0.630049 | from django.shortcuts import render
from django.views import View
from django.views.generic.list import ListView
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.db.models import (Q, F, Case, When, PositiveInt... | 11,087 | 0 | 322 |
e9ad81c4c538882d28909a68e6aa1ce952d90d32 | 487 | py | Python | users/urls.py | Subham-Mishra/Algoscale_Task_Repo | 845fdbf86c7d0131c77a915cbf293e2b4adf9482 | [
"MIT"
] | null | null | null | users/urls.py | Subham-Mishra/Algoscale_Task_Repo | 845fdbf86c7d0131c77a915cbf293e2b4adf9482 | [
"MIT"
] | null | null | null | users/urls.py | Subham-Mishra/Algoscale_Task_Repo | 845fdbf86c7d0131c77a915cbf293e2b4adf9482 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path,include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('signup_page/',views.signuppage,name='signup_page'),
path('login_page/',views.loginpage,name='login_page'),
path('login/',views.handleLogin,name='login'),
... | 34.785714 | 61 | 0.696099 | from django.contrib import admin
from django.urls import path,include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('signup_page/',views.signuppage,name='signup_page'),
path('login_page/',views.loginpage,name='login_page'),
path('login/',views.handleLogin,name='login'),
... | 0 | 0 | 0 |
17e42364cfd203efdab5e0f7b61e6b6b3fabf62c | 1,875 | py | Python | tf/app.py | ancient-data/text-fabric | c1ccd4a4dc451e94a789f138576576c5d7f13474 | [
"MIT"
] | null | null | null | tf/app.py | ancient-data/text-fabric | c1ccd4a4dc451e94a789f138576576c5d7f13474 | [
"MIT"
] | null | null | null | tf/app.py | ancient-data/text-fabric | c1ccd4a4dc451e94a789f138576576c5d7f13474 | [
"MIT"
] | null | null | null | """
Make use of a corpus.
The advanced-API provides extra functionality of top of the core of TF.
The most notable things are downloading corpus data and methods for (pretty)
display corpus material.
The real power of the advanced API is unleashed when there are well-tuned configuration
settings for a corpus, and pos... | 26.785714 | 87 | 0.648533 | """
Make use of a corpus.
The advanced-API provides extra functionality of top of the core of TF.
The most notable things are downloading corpus data and methods for (pretty)
display corpus material.
The real power of the advanced API is unleashed when there are well-tuned configuration
settings for a corpus, and pos... | 0 | 0 | 0 |
807e744833005fd27dc5576bc97eed3a839456b7 | 19,391 | py | Python | MDEQ-Vision/lib/models/mdeq_core.py | ashwinipokle/deq | 955560601ac7b9dd3088e918850efd9ba14b7610 | [
"MIT"
] | 548 | 2019-09-05T04:25:21.000Z | 2022-03-22T01:49:35.000Z | MDEQ-Vision/lib/models/mdeq_core.py | jerryniu520126/deq | 5c0699087d8c5e058539a5ec0c6c6a863ed06a3c | [
"MIT"
] | 21 | 2019-10-04T16:36:05.000Z | 2022-03-24T02:20:28.000Z | MDEQ-Vision/lib/models/mdeq_core.py | jerryniu520126/deq | 5c0699087d8c5e058539a5ec0c6c6a863ed06a3c | [
"MIT"
] | 75 | 2019-09-05T22:40:32.000Z | 2022-03-31T09:40:44.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import logging
import functools
from termcolor import colored
from collections import OrderedDict
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
im... | 41.611588 | 142 | 0.610283 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import logging
import functools
from termcolor import colored
from collections import OrderedDict
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
im... | 1,199 | 16,693 | 146 |
d2b0bc8fda39975a11d1e4c27089ada47b94991d | 2,345 | py | Python | tts/api.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | tts/api.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | tts/api.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | import base64
import numpy as np
import urllib.request
import json
import subprocess as sp
from playsound import playsound
# copy from https://qiita.com/to_obara/items/d8d5c92c2ea85a197e2d
def get_token() -> str:
"""
Google Text-To-Speechの認証した上で、gcloudをセットアップした状態で
tokenを取得するために、gcloud auth print-access-tok... | 22.990196 | 67 | 0.611087 | import base64
import numpy as np
import urllib.request
import json
import subprocess as sp
from playsound import playsound
# copy from https://qiita.com/to_obara/items/d8d5c92c2ea85a197e2d
def get_token() -> str:
"""
Google Text-To-Speechの認証した上で、gcloudをセットアップした状態で
tokenを取得するために、gcloud auth print-access-tok... | 745 | 0 | 23 |
61df1978417d686d6a7b257685bc3dd5faf1db38 | 3,454 | py | Python | addressapp/api/address.py | AbhiyantrikTechnology/DentalHub-Backend | 89802b3e7671ffe8b3d287a998c3c4f375b58f03 | [
"MIT"
] | 1 | 2021-04-03T19:57:32.000Z | 2021-04-03T19:57:32.000Z | addressapp/api/address.py | AbhiyantrikTechnology/DentalHub-Backend | 89802b3e7671ffe8b3d287a998c3c4f375b58f03 | [
"MIT"
] | null | null | null | addressapp/api/address.py | AbhiyantrikTechnology/DentalHub-Backend | 89802b3e7671ffe8b3d287a998c3c4f375b58f03 | [
"MIT"
] | null | null | null | from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import permissions
from addressapp.serializers.address import DistrictSerializer,MunicipalitySerializer,\
WardSerializer,WardSerializerUpdate
from addressapp.models import Address... | 42.121951 | 192 | 0.686161 | from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import permissions
from addressapp.serializers.address import DistrictSerializer,MunicipalitySerializer,\
WardSerializer,WardSerializerUpdate
from addressapp.models import Address... | 2,092 | 338 | 168 |
a17d27a087086f6c47363de4eb220828b42afbc3 | 426 | py | Python | Lib/site-packages/cities/contrib/utils.py | juanbentos2019/varlixjp | cc3988f856d51264ac7d85ab2ee0314a7ec53177 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/cities/contrib/utils.py | juanbentos2019/varlixjp | cc3988f856d51264ac7d85ab2ee0314a7ec53177 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/cities/contrib/utils.py | juanbentos2019/varlixjp | cc3988f856d51264ac7d85ab2ee0314a7ec53177 | [
"bzip2-1.0.6"
] | null | null | null | import swapper
from cities.models import (
Continent, Country, Region, Subregion, City, District, PostalCode,
AlternativeName)
| 22.421053 | 70 | 0.624413 | import swapper
from cities.models import (
Continent, Country, Region, Subregion, City, District, PostalCode,
AlternativeName)
def get_cities_models():
return (
swapper.load_model('cities', 'Continent'),
swapper.load_model('cities', 'Country'),
Region,
Subregion,
s... | 266 | 0 | 23 |
74c46ca8073d1cbeae8a18e23c4fdce42ad1fbb0 | 6,716 | py | Python | classifier.py | nina87513/recipe-sorting-hat | 290f0ea56c92820e2631dc48cc2bb2c45a79cce1 | [
"MIT"
] | null | null | null | classifier.py | nina87513/recipe-sorting-hat | 290f0ea56c92820e2631dc48cc2bb2c45a79cce1 | [
"MIT"
] | null | null | null | classifier.py | nina87513/recipe-sorting-hat | 290f0ea56c92820e2631dc48cc2bb2c45a79cce1 | [
"MIT"
] | null | null | null | import csv
from nltk.stem import PorterStemmer
import numpy as np
train_docs_class_list = []
test_docs_index_list = list(range(1, 1010))
train_docs_list = []
with open('trainingdata.txt') as csvfile:
rows = csv.reader(csvfile, delimiter=' ')
for row in rows:
file_list = []
for col in... | 34.979167 | 102 | 0.647111 | import csv
from nltk.stem import PorterStemmer
import numpy as np
def tokenization(data):
for i in range(10):
data = data.replace(str(i), ' ')
return data.replace('\r\n', ' ').replace(',', ' ').replace('.', ' ').replace('(', ' ') \
.replace(')', ' ').replace('?', ' ').replace('`', ' ').replace... | 2,586 | 0 | 276 |
80895058b0f82ecfe56051254c8769ab8fdf2339 | 30,272 | py | Python | guidance_plugin_validator/src/guidance_plugin_validator/guidance_plugin_validator.py | usdot-fhwa-stol/carma-platform | d45a1afbf1efdb0b8cd62fcec5a3033b7306df33 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 112 | 2020-04-27T17:06:46.000Z | 2022-03-31T15:27:14.000Z | guidance_plugin_validator/src/guidance_plugin_validator/guidance_plugin_validator.py | usdot-fhwa-stol/carma-platform | d45a1afbf1efdb0b8cd62fcec5a3033b7306df33 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 982 | 2020-04-17T11:28:04.000Z | 2022-03-31T21:12:19.000Z | guidance_plugin_validator/src/guidance_plugin_validator/guidance_plugin_validator.py | usdot-fhwa-stol/carma-platform | d45a1afbf1efdb0b8cd62fcec5a3033b7306df33 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 57 | 2020-05-07T15:48:11.000Z | 2022-03-09T23:31:45.000Z | #!/usr/bin/env python
"""
* Copyright (C) 2021 LEIDOS.
*
* 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 applicab... | 63.730526 | 179 | 0.687632 | #!/usr/bin/env python
"""
* Copyright (C) 2021 LEIDOS.
*
* 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 applicab... | 0 | 0 | 0 |
992b0ba84ca40fe322def3a1dfd61c3c3f7de53c | 391 | py | Python | binary.py | jkania7/galfacts | cd4a82d82fa7f9cb3d20f73ee1848adf1028c1cf | [
"MIT"
] | null | null | null | binary.py | jkania7/galfacts | cd4a82d82fa7f9cb3d20f73ee1848adf1028c1cf | [
"MIT"
] | null | null | null | binary.py | jkania7/galfacts | cd4a82d82fa7f9cb3d20f73ee1848adf1028c1cf | [
"MIT"
] | null | null | null | import struct
with open("fluxtime.dat","rb") as f:
bin_data = f.read()
num_entries = len(bin_data)/4
data_unpak = struct.unpack('{0}f'.format(num),bin_data)
RA_set = data_unpack[0::7]
DEC_set = data_unpack[1::7]
AST_set = data_unpack[2::7]
I_set = data_unpack[3::7]
Q_set = data_unpack[4::7]
U_set = data_unpack[... | 19.55 | 55 | 0.700767 | import struct
with open("fluxtime.dat","rb") as f:
bin_data = f.read()
num_entries = len(bin_data)/4
data_unpak = struct.unpack('{0}f'.format(num),bin_data)
RA_set = data_unpack[0::7]
DEC_set = data_unpack[1::7]
AST_set = data_unpack[2::7]
I_set = data_unpack[3::7]
Q_set = data_unpack[4::7]
U_set = data_unpack[... | 0 | 0 | 0 |
2f06008aaf14df74f297905b8dc0d8e4b6899b2f | 2,060 | py | Python | sql/migrations/0001_initial.py | gyarab/vyuka-sql | 9ab74d3fed055bd6ae302e1aea839d769b7005d4 | [
"MIT"
] | null | null | null | sql/migrations/0001_initial.py | gyarab/vyuka-sql | 9ab74d3fed055bd6ae302e1aea839d769b7005d4 | [
"MIT"
] | null | null | null | sql/migrations/0001_initial.py | gyarab/vyuka-sql | 9ab74d3fed055bd6ae302e1aea839d769b7005d4 | [
"MIT"
] | 1 | 2020-02-12T08:47:37.000Z | 2020-02-12T08:47:37.000Z | # Generated by Django 3.0.3 on 2020-02-12 00:37
from django.db import migrations, models
import django.db.models.deletion
| 38.148148 | 114 | 0.550971 | # Generated by Django 3.0.3 on 2020-02-12 00:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Battle',
fields=[
... | 0 | 1,913 | 23 |
dd628c56853ea741992b0f930fa9697140051980 | 6,529 | py | Python | project_libs/ukcp18/ukcp18_ls1.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | null | null | null | project_libs/ukcp18/ukcp18_ls1.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | 8 | 2017-09-11T10:06:40.000Z | 2018-09-19T12:27:11.000Z | project_libs/ukcp18/ukcp18_ls1.py | ukcp-data/ukcp18-data-factory | 939ca5449ebb33415a3aece976ab86065066ce0b | [
"BSD-2-Clause"
] | null | null | null | """
ukcp18_ls1.py
=============
Helper functions for working with UKCP18 Land Strand 1.
"""
# Standard library imports
import os
# Third-party imports
import numpy as np
import numpy.random as npr
import numpy.ma
from numpy.ma.core import MaskedArray
import cPickle
BASEDIR = 'ukcp-test-inputs/inp... | 30.652582 | 101 | 0.60147 | """
ukcp18_ls1.py
=============
Helper functions for working with UKCP18 Land Strand 1.
"""
# Standard library imports
import os
# Third-party imports
import numpy as np
import numpy.random as npr
import numpy.ma
from numpy.ma.core import MaskedArray
import cPickle
BASEDIR = 'ukcp-test-inputs/inp... | 0 | 0 | 0 |
601857946080bd85434727a8875ffdbcb4e26651 | 861 | py | Python | margen/segment01/rhythms.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | margen/segment01/rhythms.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | margen/segment01/rhythms.py | DaviRaubach/la_otra_margen | 5f7f2745d11a4dc6cd824236ad2af9af150289b2 | [
"CC0-1.0"
] | null | null | null | import abjad
from abjadext import rmakers
I_rhythms = {
"matA": rmakers.stack(
rmakers.talea([1, 1, 1, 1], 8, extra_counts=[0, 1]),
rmakers.extract_trivial()
),
"rests": rmakers.stack(
rmakers.note(),
rmakers.force_rest(selector)
)
}
II_rhythms = {
"matA": rmakers.stack(
... | 22.076923 | 56 | 0.610918 | import abjad
from abjadext import rmakers
def selector(argument):
sel = abjad.Selection(argument)
return sel
I_rhythms = {
"matA": rmakers.stack(
rmakers.talea([1, 1, 1, 1], 8, extra_counts=[0, 1]),
rmakers.extract_trivial()
),
"rests": rmakers.stack(
rmakers.note(),
rmaker... | 53 | 0 | 23 |
52ca8d0cca350e8ccc5c05277a5cabe3f1c04af5 | 1,620 | py | Python | kafka_parser.py | splunk-soar-connectors/kafka | 5d408bf9016d6649fa3a6084616b1f78b905548a | [
"Apache-2.0"
] | null | null | null | kafka_parser.py | splunk-soar-connectors/kafka | 5d408bf9016d6649fa3a6084616b1f78b905548a | [
"Apache-2.0"
] | 2 | 2021-12-03T19:22:14.000Z | 2022-02-07T22:34:15.000Z | kafka_parser.py | splunk-soar-connectors/kafka | 5d408bf9016d6649fa3a6084616b1f78b905548a | [
"Apache-2.0"
] | null | null | null | # File: kafka_parser.py
#
# Copyright (c) 2017-2022 Splunk 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 appli... | 31.153846 | 107 | 0.685802 | # File: kafka_parser.py
#
# Copyright (c) 2017-2022 Splunk 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 appli... | 923 | 0 | 23 |
7c57e08a8887dc1b9de186599d9ed8d9ce4f2341 | 84 | py | Python | actymath/__init__.py | ttamg/actymath | 37405449e0e72c44a8c300f18c8c0f6caf313f06 | [
"MIT"
] | 1 | 2021-05-22T17:58:59.000Z | 2021-05-22T17:58:59.000Z | actymath/__init__.py | ttamg/actymath | 37405449e0e72c44a8c300f18c8c0f6caf313f06 | [
"MIT"
] | null | null | null | actymath/__init__.py | ttamg/actymath | 37405449e0e72c44a8c300f18c8c0f6caf313f06 | [
"MIT"
] | null | null | null | __version__ = "0.1.0"
from .exceptions import ActyMathError
from .calc import Calc
| 16.8 | 37 | 0.77381 | __version__ = "0.1.0"
from .exceptions import ActyMathError
from .calc import Calc
| 0 | 0 | 0 |
d9c628c710037279944ab1b6e210ecad031d15c5 | 419 | py | Python | backend/src/accounts/migrations/0006_eventprofile_account_id.py | rcmiskin10/mob_files | dd4932c15c96bea914ffa99b72c83d471a4bfaff | [
"MIT"
] | null | null | null | backend/src/accounts/migrations/0006_eventprofile_account_id.py | rcmiskin10/mob_files | dd4932c15c96bea914ffa99b72c83d471a4bfaff | [
"MIT"
] | null | null | null | backend/src/accounts/migrations/0006_eventprofile_account_id.py | rcmiskin10/mob_files | dd4932c15c96bea914ffa99b72c83d471a4bfaff | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-07-20 02:04
from django.db import migrations, models
| 22.052632 | 74 | 0.615752 | # Generated by Django 2.0.4 on 2018-07-20 02:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0005_auto_20180630_0147'),
]
operations = [
migrations.AddField(
model_name='eventprofile',
name='accoun... | 0 | 305 | 23 |
790c8c1d71d3b4e18a00157853ed455148a3968d | 519 | py | Python | crafters/numeric/ArrayStringReader/tests/test_arraystringreader.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | 1 | 2022-03-01T12:43:17.000Z | 2022-03-01T12:43:17.000Z | crafters/numeric/ArrayStringReader/tests/test_arraystringreader.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | null | null | null | crafters/numeric/ArrayStringReader/tests/test_arraystringreader.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .. import ArrayStringReader
def test_arraystringreader():
"""here is my test code
https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test
"""
size = 8
sample_array = np.random.rand(size).astype('float32')
text = ','.join([str(x) for x in sample_a... | 25.95 | 81 | 0.687861 | import numpy as np
from .. import ArrayStringReader
def test_arraystringreader():
"""here is my test code
https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test
"""
size = 8
sample_array = np.random.rand(size).astype('float32')
text = ','.join([str(x) for x in sample_a... | 0 | 0 | 0 |
36c9682439a39eacf61901a97633b1c7dd2fcf6c | 6,331 | py | Python | opta/commands/push.py | wpride/opta | 04b745019af595464f4a8060b9bffa2399c137e0 | [
"Apache-2.0"
] | null | null | null | opta/commands/push.py | wpride/opta | 04b745019af595464f4a8060b9bffa2399c137e0 | [
"Apache-2.0"
] | null | null | null | opta/commands/push.py | wpride/opta | 04b745019af595464f4a8060b9bffa2399c137e0 | [
"Apache-2.0"
] | null | null | null | import base64
from typing import Optional, Tuple
import boto3
import click
from botocore.config import Config
from docker import from_env
from opta.amplitude import amplitude_client
from opta.core.gcp import GCP
from opta.core.generator import gen_all
from opta.core.terraform import get_terraform_outputs
from opta.ex... | 34.407609 | 118 | 0.655031 | import base64
from typing import Optional, Tuple
import boto3
import click
from botocore.config import Config
from docker import from_env
from opta.amplitude import amplitude_client
from opta.core.gcp import GCP
from opta.core.generator import gen_all
from opta.core.terraform import get_terraform_outputs
from opta.ex... | 4,995 | 0 | 228 |
22adfdf1975336498e63384e2a3eeadd63781ec6 | 1,768 | py | Python | preprocess.py | coolioasjulio/DevanagriRecognizer | ed25c6f331cde2a19187cb7bd40790db069f469c | [
"MIT"
] | null | null | null | preprocess.py | coolioasjulio/DevanagriRecognizer | ed25c6f331cde2a19187cb7bd40790db069f469c | [
"MIT"
] | 1 | 2019-02-27T12:03:03.000Z | 2019-02-27T12:03:03.000Z | preprocess.py | coolioasjulio/DevanagriRecognizer | ed25c6f331cde2a19187cb7bd40790db069f469c | [
"MIT"
] | null | null | null | # Preprocess images
from scipy import misc
from scipy.ndimage.measurements import center_of_mass
import numpy as np
import os
from os.path import isfile, isdir
if __name__ == '__main__':
PARENT_DIR = 'resources/New'
progbar = ProgBar()
recurse(progbar, PARENT_DIR) | 29.466667 | 84 | 0.595588 | # Preprocess images
from scipy import misc
from scipy.ndimage.measurements import center_of_mass
import numpy as np
import os
from os.path import isfile, isdir
class ProgBar(object):
def __init__(self):
self.counter = 0
def progress(self):
self.counter += 1
print('.', end = ''... | 1,324 | 1 | 165 |
e4f3734b737ea7a845f6d3fe447958b565ae6345 | 375 | py | Python | samples/sample4.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | 1 | 2015-05-03T00:25:17.000Z | 2015-05-03T00:25:17.000Z | samples/sample4.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | null | null | null | samples/sample4.py | niwibe/cobrascript | 4c6a193d8745771e5fb0e277394f83e47cc7ede8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
x = jQuery(".item")
x.on("click", lambda e: e.preventDefault())
fooController["$inject"] = ["$scope", "$rootScope", "config"]
tttt = xxx = 222
| 18.75 | 61 | 0.634667 | # -*- coding: utf-8 -*-
x = jQuery(".item")
x.on("click", lambda e: e.preventDefault())
def fooController(scope, rootScope, config):
def updateIssue():
pass
def updateUserStory():
pass
scope.updateIssue = updateIssue
scope.updateUserStory = updateUserStory
fooController["$inject"]... | 181 | 0 | 23 |
ff50e0e05a8540ee65c277589bfea7f1be6f0195 | 929 | py | Python | tests/core/extraction/test_analyzer.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | tests/core/extraction/test_analyzer.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | tests/core/extraction/test_analyzer.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | from typing import Callable, Mapping, TypeVar
from unittest.mock import Mock
from lxml.etree import _Element as Element
from pytest import raises
from preacher.core.extraction.analysis import Analyzer
T = TypeVar('T')
| 28.151515 | 68 | 0.68676 | from typing import Callable, Mapping, TypeVar
from unittest.mock import Mock
from lxml.etree import _Element as Element
from pytest import raises
from preacher.core.extraction.analysis import Analyzer
T = TypeVar('T')
def test_analyzer_interface():
class _IncompleteAnalyzer(Analyzer):
def for_text(self... | 684 | 0 | 23 |
ba6b5dffc57a2387c49b05dd9ddbb93318c47ed4 | 56 | py | Python | faktotum/research/vendor/__init__.py | severinsimmler/extract | c1e76a29929e2334976b18ba9218403d85331f51 | [
"MIT"
] | 2 | 2020-02-19T14:29:21.000Z | 2020-02-22T14:33:08.000Z | faktotum/research/vendor/__init__.py | severinsimmler/faktotum | c1e76a29929e2334976b18ba9218403d85331f51 | [
"MIT"
] | null | null | null | faktotum/research/vendor/__init__.py | severinsimmler/faktotum | c1e76a29929e2334976b18ba9218403d85331f51 | [
"MIT"
] | null | null | null | from faktotum.research.vendor import ner, lm, utils_ner
| 28 | 55 | 0.821429 | from faktotum.research.vendor import ner, lm, utils_ner
| 0 | 0 | 0 |
46edd24c99855cd8bc6717a1ea897cde7b6a1c71 | 418 | py | Python | projects/sachinl0har/chatbots/acro.py | Dalekvim/Python | dacc73c319d835f7cda3177c2fdd7c4328828cb9 | [
"MIT"
] | null | null | null | projects/sachinl0har/chatbots/acro.py | Dalekvim/Python | dacc73c319d835f7cda3177c2fdd7c4328828cb9 | [
"MIT"
] | null | null | null | projects/sachinl0har/chatbots/acro.py | Dalekvim/Python | dacc73c319d835f7cda3177c2fdd7c4328828cb9 | [
"MIT"
] | null | null | null | import requests
from projects.sachinl0har.chatbots.helper import say, run
if __name__ == "__main__":
run("Acro", acro)
| 20.9 | 97 | 0.679426 | import requests
from projects.sachinl0har.chatbots.helper import say, run
def cnt(_input: str):
print(_input)
url = f"http://api.brainshop.ai/get?bid=157984&key=3S0hhLXZ5GS2KYs4&uid=[uid]&msg=[{_input}]"
r = requests.get(url)
return r.json()['cnt']
def acro(_input, recognizer=None, microphone=None)... | 244 | 0 | 46 |
7ceea35ef7708b3f48b2321f177fbdbf342638ae | 2,051 | py | Python | src/metod_alg/check_metod_class/sog_obj_func.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | src/metod_alg/check_metod_class/sog_obj_func.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | 1 | 2021-11-17T09:03:17.000Z | 2021-11-17T09:03:17.000Z | src/metod_alg/check_metod_class/sog_obj_func.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | import numpy as np
def sog_func(x, p, exp_const, store_x0, matrix_test, store_c):
"""
Compute Sum of Gaussians function at a given point with given arguments.
Parameters
----------
point : 1-D array with shape (d, )
A point used to evaluate the function.
p : integer
Number... | 32.555556 | 76 | 0.557289 | import numpy as np
def sog_func(x, p, exp_const, store_x0, matrix_test, store_c):
"""
Compute Sum of Gaussians function at a given point with given arguments.
Parameters
----------
point : 1-D array with shape (d, )
A point used to evaluate the function.
p : integer
Number... | 0 | 0 | 0 |
a2daae20385c7ba18e79e61ffa19ba6337255b17 | 1,727 | py | Python | skatingAI/nets/keypoint/v3.py | na018/awesome.skating.ai | 50738d5a359dc7fd69ec676cfaa83471b8ffe2e5 | [
"MIT"
] | 21 | 2020-08-03T20:13:00.000Z | 2022-03-21T10:41:18.000Z | skatingAI/nets/keypoint/v3.py | na018/awesome.skating.ai | 50738d5a359dc7fd69ec676cfaa83471b8ffe2e5 | [
"MIT"
] | null | null | null | skatingAI/nets/keypoint/v3.py | na018/awesome.skating.ai | 50738d5a359dc7fd69ec676cfaa83471b8ffe2e5 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.keras.backend as K
from skatingAI.nets.keypoint.KPDetectorBase import KPDetectorBase
layers = tf.keras.layers
BN_MOMENTUM = 0.01
| 39.25 | 106 | 0.623046 | import tensorflow as tf
import tensorflow.keras.backend as K
from skatingAI.nets.keypoint.KPDetectorBase import KPDetectorBase
layers = tf.keras.layers
BN_MOMENTUM = 0.01
class KPDetector(KPDetectorBase):
def _build_model(self):
img_input = self.conv3x3_block(self.inputs, filter_counts=[16, 16, 33], n... | 1,490 | 12 | 50 |
2257f3ceb67f3ab1e9c10782448bd02f02fcb9ce | 590 | py | Python | diagnosticism/__init__.py | synesissoftware/diagnosticism.Python | b3f58c5616b4f5523c339fd61ea3a883d7072724 | [
"BSD-3-Clause"
] | null | null | null | diagnosticism/__init__.py | synesissoftware/diagnosticism.Python | b3f58c5616b4f5523c339fd61ea3a883d7072724 | [
"BSD-3-Clause"
] | null | null | null | diagnosticism/__init__.py | synesissoftware/diagnosticism.Python | b3f58c5616b4f5523c339fd61ea3a883d7072724 | [
"BSD-3-Clause"
] | null | null | null |
__author__ = 'Matt Wilson'
__copyright__ = 'Copyright 2019-2020, Synesis Information Systems, Copyright 2019, Synesis Software'
__credits__ = [
'Garth Lancaster',
'Matt Wilson',
]
__email__ = 'matthew@synesis.com.au'
__license__ = 'BSD-3-Clause'
__maintainer__ = 'Matt... | 29.5 | 104 | 0.688136 |
__author__ = 'Matt Wilson'
__copyright__ = 'Copyright 2019-2020, Synesis Information Systems, Copyright 2019, Synesis Software'
__credits__ = [
'Garth Lancaster',
'Matt Wilson',
]
__email__ = 'matthew@synesis.com.au'
__license__ = 'BSD-3-Clause'
__maintainer__ = 'Matt... | 0 | 0 | 0 |
062c2b7b1af7d23eda16f685280038f855eaab6b | 966 | py | Python | src/utils/data.py | hazyuun/Chess-FEN | b6564181b98c7286b51616af643b7d3ab646d9a0 | [
"MIT"
] | 1 | 2021-04-01T00:15:58.000Z | 2021-04-01T00:15:58.000Z | src/utils/data.py | hazyuun/Chess-FEN | b6564181b98c7286b51616af643b7d3ab646d9a0 | [
"MIT"
] | null | null | null | src/utils/data.py | hazyuun/Chess-FEN | b6564181b98c7286b51616af643b7d3ab646d9a0 | [
"MIT"
] | null | null | null | import numpy as np
from collections import Counter
| 24.15 | 56 | 0.609731 | import numpy as np
from collections import Counter
def data_get_occurences(data):
unique, counts = np.unique(data, return_counts=True)
return dict(zip(unique, counts))
def data_get_top2(d):
c = Counter(d)
most_common = c.most_common(2)
return most_common
def data_get_last(d):
c = Counter(d... | 795 | 0 | 115 |
66571737598543bc994799b53f2fff3140ba858d | 4,586 | py | Python | v2x_solution/event/views.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | 1 | 2021-02-03T08:15:59.000Z | 2021-02-03T08:15:59.000Z | v2x_solution/event/views.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | null | null | null | v2x_solution/event/views.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from . import models, serializers
from v2x_solution.road import models as road_models
# find event
# select event
# update event
# delete event
| 25.764045 | 88 | 0.624945 | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from . import models, serializers
from v2x_solution.road import models as road_models
class Events(APIView):
def get(self, req, format=None):
# 1. get all events
events = model... | 4,028 | 10 | 262 |
d90cc4d649290293cdba377350a20930515f9e89 | 6,199 | py | Python | mapmint-services/classifier/service.py | aryanxk02/mapmint | 577ddc85f17dad6274add7940de86ecda7e6c85a | [
"MIT"
] | null | null | null | mapmint-services/classifier/service.py | aryanxk02/mapmint | 577ddc85f17dad6274add7940de86ecda7e6c85a | [
"MIT"
] | null | null | null | mapmint-services/classifier/service.py | aryanxk02/mapmint | 577ddc85f17dad6274add7940de86ecda7e6c85a | [
"MIT"
] | 1 | 2019-10-10T17:33:58.000Z | 2019-10-10T17:33:58.000Z | # -*- coding: utf-8 -*-
###############################################################################
# Author: Gérald Fenoy, gerald.fenoy@cartoworks.com
# Copyright (c) 2010-2014, Cartoworks Inc.
###############################################################################
# Permission is hereby granted, fr... | 39.737179 | 135 | 0.59687 | # -*- coding: utf-8 -*-
###############################################################################
# Author: Gérald Fenoy, gerald.fenoy@cartoworks.com
# Copyright (c) 2010-2014, Cartoworks Inc.
###############################################################################
# Permission is hereby granted, fr... | 4,538 | 0 | 143 |
85c5fb40a8ee980e1d09db854f36914e17733145 | 116 | py | Python | tests/test_dummy.py | clbarras/pyannote-audio | f70ce115022b64572bb5895e21088f4ae1023737 | [
"MIT"
] | 1 | 2020-02-24T04:30:14.000Z | 2020-02-24T04:30:14.000Z | tests/test_dummy.py | gitkob/pyannote-audio | 73c4fe7311d4a1314f18c11fea60aca6bc7e5359 | [
"MIT"
] | null | null | null | tests/test_dummy.py | gitkob/pyannote-audio | 73c4fe7311d4a1314f18c11fea60aca6bc7e5359 | [
"MIT"
] | null | null | null | import pytest
from pyannote.core import Segment
| 16.571429 | 47 | 0.741379 | import pytest
from pyannote.core import Segment
def test_dummy():
assert isinstance(Segment(1., 2.), Segment)
| 44 | 0 | 23 |
2ae8b9076b2f230af7e1757e21755d5e1c1bb70e | 430 | py | Python | basic_email/forms.py | ArabellaTech/django-basic-email | a4bfb5a76bfdc93ff5b1354fb1b02f75fb7bbccc | [
"BSD-3-Clause"
] | 1 | 2015-09-30T12:18:11.000Z | 2015-09-30T12:18:11.000Z | basic_email/forms.py | ArabellaTech/django-basic-email | a4bfb5a76bfdc93ff5b1354fb1b02f75fb7bbccc | [
"BSD-3-Clause"
] | null | null | null | basic_email/forms.py | ArabellaTech/django-basic-email | a4bfb5a76bfdc93ff5b1354fb1b02f75fb7bbccc | [
"BSD-3-Clause"
] | 1 | 2018-03-05T19:14:58.000Z | 2018-03-05T19:14:58.000Z | # -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
| 28.666667 | 69 | 0.662791 | # -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
class EmailPreviewForm(forms.Form):
email = forms.EmailField(label=_("Receiver"))
def __init__(self, *args, **kwargs):
extra = kwargs.pop('extra')
super(EmailPreviewForm, self).__init__(*a... | 210 | 91 | 23 |
03154843ed38a2f3d7257de62619063ee0ed9f77 | 1,176 | py | Python | pdfmerge/admin.py | rupin/pdfmerger | fee19523e88362d215f1a29cdab0d140f4c9385c | [
"MIT"
] | null | null | null | pdfmerge/admin.py | rupin/pdfmerger | fee19523e88362d215f1a29cdab0d140f4c9385c | [
"MIT"
] | null | null | null | pdfmerge/admin.py | rupin/pdfmerger | fee19523e88362d215f1a29cdab0d140f4c9385c | [
"MIT"
] | null | null | null | from import_export.admin import ImportExportModelAdmin
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import *
admin.site.register(CustomUser, CustomUse... | 30.153846 | 95 | 0.798469 | from import_export.admin import ImportExportModelAdmin
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import *
class CustomUserAdmin(UserAdmin):
add_form = ... | 0 | 524 | 120 |
d4cd38987c1fdffd3e9967bfb94d9ad7a816eda0 | 3,573 | py | Python | fragment_fastq_records.py | huddlej/fasta_tools | 346e8d23d1aa9221d33c74ccf48d83d6018ed62e | [
"MIT"
] | 31 | 2016-09-22T23:22:11.000Z | 2020-09-20T04:11:58.000Z | scripts/fragment_fasta_records.py | mschatz/pacbio_variant_caller | 409706f2fc597e46b0f39664eb167ebaef6fe975 | [
"MIT"
] | 26 | 2016-08-03T18:25:41.000Z | 2019-02-21T16:50:57.000Z | scripts/fragment_fasta_records.py | mschatz/pacbio_variant_caller | 409706f2fc597e46b0f39664eb167ebaef6fe975 | [
"MIT"
] | 14 | 2016-08-02T23:29:13.000Z | 2019-09-19T08:11:40.000Z | import argparse
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import math
import operator
import re
def make_windows(length, window, slide):
"""
For a given length, return an iterator for intervals of length `window` with
a slide of `slide`.
>>> list(make_windows(8... | 33.392523 | 109 | 0.619367 | import argparse
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import math
import operator
import re
def make_windows(length, window, slide):
"""
For a given length, return an iterator for intervals of length `window` with
a slide of `slide`.
>>> list(make_windows(8... | 0 | 0 | 0 |
c49406473d6d243ddd7bb146e5c86ece0a288a7c | 6,252 | py | Python | database_communication.py | Jormungandr1105/Smart_Fridge | f62f65350ba5813e14839d40aee1a2a03c3812a3 | [
"MIT"
] | null | null | null | database_communication.py | Jormungandr1105/Smart_Fridge | f62f65350ba5813e14839d40aee1a2a03c3812a3 | [
"MIT"
] | null | null | null | database_communication.py | Jormungandr1105/Smart_Fridge | f62f65350ba5813e14839d40aee1a2a03c3812a3 | [
"MIT"
] | null | null | null | """
This part communicates with the database
Author: Max Marshall
Project: Fridge Tracker
"""
import datetime
import math
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
import readings as read
import light_sensor as ls
import mario
cred = None
try:
... | 33.255319 | 122 | 0.558861 | """
This part communicates with the database
Author: Max Marshall
Project: Fridge Tracker
"""
import datetime
import math
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
import readings as read
import light_sensor as ls
import mario
cred = None
try:
... | 3,944 | 0 | 73 |
1e97240fdfbbfa59be37daeec97e60426e370f7c | 5,222 | py | Python | pipeline/isis/globalPipelineISIS.py | tlemoult/spectroDb | 0d674e2c7ff3beee0ccda7cfa69c6247ca7f2a2e | [
"MIT"
] | 4 | 2018-11-04T21:48:48.000Z | 2022-01-26T18:57:24.000Z | pipeline/isis/globalPipelineISIS.py | tlemoult/spectroDb | 0d674e2c7ff3beee0ccda7cfa69c6247ca7f2a2e | [
"MIT"
] | 1 | 2017-02-10T16:25:16.000Z | 2017-03-17T08:22:18.000Z | pipeline/isis/globalPipelineISIS.py | tlemoult/spectroDb | 0d674e2c7ff3beee0ccda7cfa69c6247ca7f2a2e | [
"MIT"
] | null | null | null |
import os,json,sys,time,shutil
from datetime import datetime
if len(sys.argv)<2:
print("nombre d'argument incorrect")
print("utiliser: ")
print(" python globalPipelineISIS.py obsId1 obsId2 ...")
print(" python globalPipelineISIS.py range obsIdStart obsIdStop ")
exit(1)
print("load configuration")
json_tex... | 30.184971 | 109 | 0.668326 |
import os,json,sys,time,shutil
from datetime import datetime
def renameCalib(path,prefix,newprefix,gen):
for filename in os.listdir(path):
if filename.startswith(prefix):
src=path+'/'+filename
dst=path+'/'+gen+'_'+filename.replace(prefix,newprefix)
#print(f"rename src:... | 1,790 | 0 | 69 |
931c03bd9c2250fcfea7fc0a4f1fea7631685acc | 1,865 | py | Python | carim/configuration/server/random_presets.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | 3 | 2020-04-06T17:57:24.000Z | 2020-06-02T04:21:41.000Z | carim/configuration/server/random_presets.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | 16 | 2020-03-18T09:07:51.000Z | 2020-05-11T14:58:55.000Z | carim/configuration/server/random_presets.py | schana/dayz-server-carim | 007c2f3d1861b736c4a59aeb4ef6275c56f76869 | [
"Apache-2.0"
] | null | null | null | import json
import pathlib
import re
from xml.etree import ElementTree
from carim.configuration import decorators
from carim.global_resources import deploydir, mission, resourcesdir
from carim.util import file_writing
@decorators.register
@decorators.mission
| 45.487805 | 110 | 0.619303 | import json
import pathlib
import re
from xml.etree import ElementTree
from carim.configuration import decorators
from carim.global_resources import deploydir, mission, resourcesdir
from carim.util import file_writing
@decorators.register
@decorators.mission
def random_presets_config(directory):
p = pathlib.Path... | 1,581 | 0 | 22 |
5a35bc06f4bb2bf5e4c06d9c05dbf0da2ac0b201 | 4,275 | py | Python | code/search.py | colinkyle/3D-HRN | 6ae53033289e2054670f47ff9d13f6008f28b07f | [
"MIT"
] | 1 | 2019-03-14T20:19:37.000Z | 2019-03-14T20:19:37.000Z | code/search.py | colinkyle/3D-HRN | 6ae53033289e2054670f47ff9d13f6008f28b07f | [
"MIT"
] | null | null | null | code/search.py | colinkyle/3D-HRN | 6ae53033289e2054670f47ff9d13f6008f28b07f | [
"MIT"
] | null | null | null | from scipy.optimize import minimize, basinhopping
import numpy as np
| 44.072165 | 237 | 0.582222 | from scipy.optimize import minimize, basinhopping
import numpy as np
def objectiveFunction(stack, template, netR, netE, params):
z, tx, ty, dxy = params
if dxy < 0.6 or dxy > 1.2 or np.any(np.array([z, tx, ty]) > 20) or np.any(np.array([z, tx, ty]) < -20):
return np.inf
batch = template.gen_batch(s... | 4,090 | 0 | 115 |
5546113e84f75a014a55eae0c83646e1a521d9a5 | 567 | py | Python | plotting/bokeh/simple_plot.py | ashikari/tutorial | cc696ee25d94476872244222062f2ff9366d12ae | [
"MIT"
] | null | null | null | plotting/bokeh/simple_plot.py | ashikari/tutorial | cc696ee25d94476872244222062f2ff9366d12ae | [
"MIT"
] | null | null | null | plotting/bokeh/simple_plot.py | ashikari/tutorial | cc696ee25d94476872244222062f2ff9366d12ae | [
"MIT"
] | null | null | null | from bokeh.plotting import figure, output_file, show
import numpy as np
if __name__ == '__main__':
x = np.linspace(0, 2*np.pi, 100)
y_lin = x
y_sqrt = np.sqrt(x)
y_log = np.log(x)
y_sin = np.sin(x)
output_file("plot.html")
fig = figure(title="Simple Plots")
fig.line(x=x, y=y_lin, color='red', legend="Linear"... | 25.772727 | 60 | 0.675485 | from bokeh.plotting import figure, output_file, show
import numpy as np
if __name__ == '__main__':
x = np.linspace(0, 2*np.pi, 100)
y_lin = x
y_sqrt = np.sqrt(x)
y_log = np.log(x)
y_sin = np.sin(x)
output_file("plot.html")
fig = figure(title="Simple Plots")
fig.line(x=x, y=y_lin, color='red', legend="Linear"... | 0 | 0 | 0 |
c02a9d4937008f8f5164b7811fbc65050643d207 | 3,372 | py | Python | deplatformr/helpers/filecoin_helpers.py | deplatformer/prototype | d755624ef2828a9c4b99cad53cc6013e4572e4d2 | [
"MIT"
] | null | null | null | deplatformr/helpers/filecoin_helpers.py | deplatformer/prototype | d755624ef2828a9c4b99cad53cc6013e4572e4d2 | [
"MIT"
] | 1 | 2021-02-10T02:26:02.000Z | 2021-02-10T02:26:02.000Z | deplatformr/helpers/filecoin_helpers.py | deplatformer/prototype | d755624ef2828a9c4b99cad53cc6013e4572e4d2 | [
"MIT"
] | 1 | 2021-06-28T14:42:56.000Z | 2021-06-28T14:42:56.000Z | import os
from datetime import datetime
from flask import flash
from flask_user import current_user
from pygate_grpc.client import PowerGateClient
from pygate_grpc.ffs import get_file_bytes, bytes_to_chunks, chunks_to_bytes
from google.protobuf.json_format import MessageToDict
from deplatformr import app, db
from depla... | 32.737864 | 93 | 0.653025 | import os
from datetime import datetime
from flask import flash
from flask_user import current_user
from pygate_grpc.client import PowerGateClient
from pygate_grpc.ffs import get_file_bytes, bytes_to_chunks, chunks_to_bytes
from google.protobuf.json_format import MessageToDict
from deplatformr import app, db
from depla... | 2,054 | 0 | 23 |
ad461af32421dd1187b9a4528dfcf9ba7087cdcc | 1,397 | py | Python | bridge_to_guerilla/ui.py | DonRomanooo/MegascansToGuerilla | 2984c6eb485164671788781ecad464e3b0472067 | [
"Apache-2.0"
] | null | null | null | bridge_to_guerilla/ui.py | DonRomanooo/MegascansToGuerilla | 2984c6eb485164671788781ecad464e3b0472067 | [
"Apache-2.0"
] | null | null | null | bridge_to_guerilla/ui.py | DonRomanooo/MegascansToGuerilla | 2984c6eb485164671788781ecad464e3b0472067 | [
"Apache-2.0"
] | null | null | null | from PySide import QtGui, QtCore
from PySide.QtCore import QThread, QDataStream
from PySide.QtNetwork import QTcpServer, QHostAddress
import sys
from guerilla_importer import MSToGuerillaWorker
| 27.94 | 67 | 0.700787 | from PySide import QtGui, QtCore
from PySide.QtCore import QThread, QDataStream
from PySide.QtNetwork import QTcpServer, QHostAddress
import sys
from guerilla_importer import MSToGuerillaWorker
class MSToGuerillaWindow(QtGui.QWidget):
def __init__(self, parent=None):
super(MSToGuerillaWindow, self).__i... | 1,030 | 19 | 139 |
2b426584aa50b4b20e3e95deec6deef25d3895a5 | 2,516 | py | Python | data_prep.py | evan-tan/image_data | b3d1d5d52989697db7b62ca054cba1a10459bca0 | [
"MIT"
] | null | null | null | data_prep.py | evan-tan/image_data | b3d1d5d52989697db7b62ca054cba1a10459bca0 | [
"MIT"
] | null | null | null | data_prep.py | evan-tan/image_data | b3d1d5d52989697db7b62ca054cba1a10459bca0 | [
"MIT"
] | null | null | null | import pathlib as pl
import os
def prepend_object_name(obj: str):
"""Rename by prepending to file names, assuming files are in sheep/ and coke/
Args:
obj (str): Text of string to prepend at start of image name
"""
for path in pl.Path(obj).iterdir():
if path.is_file():
file_... | 39.936508 | 89 | 0.511924 | import pathlib as pl
import os
def prepend_object_name(obj: str):
"""Rename by prepending to file names, assuming files are in sheep/ and coke/
Args:
obj (str): Text of string to prepend at start of image name
"""
for path in pl.Path(obj).iterdir():
if path.is_file():
file_... | 0 | 0 | 0 |
f475b13d38deae4b6605a096daf94c24983a8a33 | 6,585 | py | Python | exif_viewer.py | takurooo/exif | 300d9b33b7a8664c7cf92649aa3d5237009ecf44 | [
"MIT"
] | null | null | null | exif_viewer.py | takurooo/exif | 300d9b33b7a8664c7cf92649aa3d5237009ecf44 | [
"MIT"
] | 1 | 2020-01-11T14:15:52.000Z | 2020-01-11T14:15:52.000Z | exif_viewer.py | takurooo/exif | 300d9b33b7a8664c7cf92649aa3d5237009ecf44 | [
"MIT"
] | null | null | null | # -----------------------------------
# import
# -----------------------------------
import os
import sys
import argparse
from PySide2.QtWidgets import QApplication, QMainWindow, QAction, QWidget, QStyle
from PySide2.QtWidgets import QStackedWidget, QSplitter, QTextEdit, QTreeWidget, QTreeWidgetItem
from PySide2.QtWid... | 33.769231 | 96 | 0.618831 | # -----------------------------------
# import
# -----------------------------------
import os
import sys
import argparse
from PySide2.QtWidgets import QApplication, QMainWindow, QAction, QWidget, QStyle
from PySide2.QtWidgets import QStackedWidget, QSplitter, QTextEdit, QTreeWidget, QTreeWidgetItem
from PySide2.QtWid... | 5,367 | 282 | 160 |
cce16174a855baa5fbf6dce660af364102ae9139 | 100 | py | Python | hstudio/service/common.py | sbl1996/hstudio | 24c7565252b0b28552c5e1dc02e50cec019c1c9e | [
"MIT"
] | null | null | null | hstudio/service/common.py | sbl1996/hstudio | 24c7565252b0b28552c5e1dc02e50cec019c1c9e | [
"MIT"
] | null | null | null | hstudio/service/common.py | sbl1996/hstudio | 24c7565252b0b28552c5e1dc02e50cec019c1c9e | [
"MIT"
] | null | null | null | HEARTBEAT_INTERVAL = 20
DISCONNECTED_THRESHOLD = HEARTBEAT_INTERVAL * 2
HSTUDIO_HOME = "~/.hstudio" | 25 | 47 | 0.8 | HEARTBEAT_INTERVAL = 20
DISCONNECTED_THRESHOLD = HEARTBEAT_INTERVAL * 2
HSTUDIO_HOME = "~/.hstudio" | 0 | 0 | 0 |
0ca0e0803dc62794c21087ae1eef9e564b50d4f7 | 525 | py | Python | jp.atcoder/abc006/abc006_2/8773849.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc006/abc006_2/8773849.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc006/abc006_2/8773849.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
sys.setrecursionlimit(10**7)
N = int(sys.stdin.readline().rstrip())
MOD = 10**4 + 7
ans = tribonacci(N)[2]
print(ans)
| 16.40625 | 74 | 0.382857 | import sys
sys.setrecursionlimit(10**7)
N = int(sys.stdin.readline().rstrip())
MOD = 10**4 + 7
def tribonacci(N):
if N == 0:
return 0, 0, 1
a, b, c = tribonacci(N // 2)
a, b, c, d, e = a * a, 2 * a * b, 2 * a * c + b * b, 2 * b * c, c * c
b += a
c += a
d += a
c ... | 353 | 0 | 25 |
93443f7ce84106787213e1cc470b3f680ac36915 | 1,678 | py | Python | src/pyquickhelper/loghelper/convert_helper.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 18 | 2015-11-10T08:09:23.000Z | 2022-02-16T11:46:45.000Z | src/pyquickhelper/loghelper/convert_helper.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 321 | 2015-06-14T21:34:28.000Z | 2021-11-28T17:10:03.000Z | src/pyquickhelper/loghelper/convert_helper.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 10 | 2015-06-20T01:35:00.000Z | 2022-01-19T15:54:32.000Z | # -*- coding: utf-8 -*-
"""
@file
@brief Various functions about conversions.
"""
import datetime
def str2datetime(dt, format=None):
"""
convert a string into a datetime object, it can be:
- 2013-05-24 18:49:46
- 2013-05-24 18:49:46.568
@param dt string
@param format f... | 27.966667 | 77 | 0.508343 | # -*- coding: utf-8 -*-
"""
@file
@brief Various functions about conversions.
"""
import datetime
def str2datetime(dt, format=None):
"""
convert a string into a datetime object, it can be:
- 2013-05-24 18:49:46
- 2013-05-24 18:49:46.568
@param dt string
@param format f... | 0 | 0 | 0 |
29a789654d0b5e8e5ba4a98f01950603067ab28b | 287 | py | Python | pattern/1_1_3n_2.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 37 | 2019-04-03T07:19:57.000Z | 2022-01-09T06:18:41.000Z | pattern/1_1_3n_2.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 16 | 2020-08-11T08:09:42.000Z | 2021-10-30T17:40:48.000Z | pattern/1_1_3n_2.py | nayanapardhekar/Python | 55ea0cc1dd69192b25cb71358cd03cc2ce13be0a | [
"MIT"
] | 130 | 2019-10-02T14:40:20.000Z | 2022-01-26T17:38:26.000Z | n=int(input("enter a number: "))
for i in range(n,0,-1):
for j in range(n,0,-1):
if(j>i):
print(j,' ',sep='',end="")
else:
print(i,' ',sep='',end="")
print()
'''
output:
enter a number: 6
6 6 6 6 6 6
6 5 5 5 5 5
6 5 4 4 4 4
6 5 4 3 3 3
6 5 4 3 2 2
6 5 4 3 2 1
'''
| 15.105263 | 32 | 0.491289 | n=int(input("enter a number: "))
for i in range(n,0,-1):
for j in range(n,0,-1):
if(j>i):
print(j,' ',sep='',end="")
else:
print(i,' ',sep='',end="")
print()
'''
output:
enter a number: 6
6 6 6 6 6 6
6 5 5 5 5 5
6 5 4 4 4 4
6 5 4 3 3 3
6 5 4 3 2 2
6 5 4 3 2 1
'''
| 0 | 0 | 0 |
79031374fd0c3d90fc7647c75e2c9ee9cc97362f | 1,534 | py | Python | widgets/lv_arc/lv_arc.py | ndrogness/lvgl_micropython_examples | ea2245a47af8bb8545d465d3b6611b85b9ca948b | [
"MIT"
] | 1 | 2020-11-20T00:48:38.000Z | 2020-11-20T00:48:38.000Z | widgets/lv_arc/lv_arc.py | ndrogness/lvgl_micropython_examples | ea2245a47af8bb8545d465d3b6611b85b9ca948b | [
"MIT"
] | null | null | null | widgets/lv_arc/lv_arc.py | ndrogness/lvgl_micropython_examples | ea2245a47af8bb8545d465d3b6611b85b9ca948b | [
"MIT"
] | null | null | null | import lvgl as lv
import styles
if __name__ == '__main__':
lv.init()
scr = lv.obj()
lv.scr_load(scr)
lv_arc(scr)
| 29.5 | 98 | 0.653846 | import lvgl as lv
import styles
def lv_arc(screen):
# Create the arc object on lv screen, ie a lv.scr() object
arc = lv.arc(screen)
# Set arc size
arc.set_size(150, 150)
# Set arc background style color blue
arc.add_style(arc.PART.BG, styles.gstyle_bg1)
# Set arc indicator (i.e. line) st... | 1,381 | 0 | 23 |
d27c87a393c0c6e13c9b347b511418136e100d6d | 842 | py | Python | run-cloc.py | madeso/build | 79f1d4e592e0f6ebd6bfa3db39cf4ba2b5ef98db | [
"MIT"
] | null | null | null | run-cloc.py | madeso/build | 79f1d4e592e0f6ebd6bfa3db39cf4ba2b5ef98db | [
"MIT"
] | null | null | null | run-cloc.py | madeso/build | 79f1d4e592e0f6ebd6bfa3db39cf4ba2b5ef98db | [
"MIT"
] | null | null | null | #!/usr/bin/python
import argparse
import sys
import glob
import os
import re
from subprocess import call
import itertools
main() | 27.16129 | 63 | 0.640143 | #!/usr/bin/python
import argparse
import sys
import glob
import os
import re
from subprocess import call
import itertools
def main():
parser = argparse.ArgumentParser(description="Run cloc")
parser.add_argument('files', nargs='+', help='A file')
parser.add_argument('--out', help='save the log here')
ar... | 691 | 0 | 23 |
ec033aab34bfbe7e2da2f30b32890d9fa0f2f9fe | 773 | py | Python | cdrouter/cdr_datetime.py | qacafe/cdrouter.py | 34a1b031b0325ec5ed363bf3097f242c8535c824 | [
"MIT"
] | 4 | 2017-10-27T00:29:30.000Z | 2020-05-18T07:39:18.000Z | cdrouter/cdr_datetime.py | qacafe/cdrouter.py | 34a1b031b0325ec5ed363bf3097f242c8535c824 | [
"MIT"
] | 7 | 2017-07-28T19:29:25.000Z | 2020-09-02T14:44:35.000Z | cdrouter/cdr_datetime.py | qacafe/cdrouter.py | 34a1b031b0325ec5ed363bf3097f242c8535c824 | [
"MIT"
] | 5 | 2017-07-28T19:15:12.000Z | 2020-08-26T20:09:09.000Z | #
# Copyright (c) 2017 by QA Cafe.
# All Rights Reserved.
#
"""Module for processing CDRouter datetime strings."""
from datetime import datetime
from marshmallow import fields
from marshmallow.exceptions import ValidationError
| 27.607143 | 72 | 0.668823 | #
# Copyright (c) 2017 by QA Cafe.
# All Rights Reserved.
#
"""Module for processing CDRouter datetime strings."""
from datetime import datetime
from marshmallow import fields
from marshmallow.exceptions import ValidationError
class DateTime(fields.DateTime):
def __init__(self, format=None, **kwargs):
s... | 421 | 11 | 111 |
f434c1e5641f15763b1e85ab5ce19baccba16304 | 1,441 | py | Python | collecting/collecter.py | kingno21/project | 3d8e6272ce2dd952808f63c91f1e7d97f4115f03 | [
"MIT"
] | null | null | null | collecting/collecter.py | kingno21/project | 3d8e6272ce2dd952808f63c91f1e7d97f4115f03 | [
"MIT"
] | null | null | null | collecting/collecter.py | kingno21/project | 3d8e6272ce2dd952808f63c91f1e7d97f4115f03 | [
"MIT"
] | null | null | null | from BeautifulSoup import BeautifulSoup
import urllib2, urllib, threading, sys
url = "http://apk.hiapk.com/apps"
down_url = "http://apk.hiapk.com/appdown/"
info_url = "http://apk.hiapk.com/appinfo/"
num = 11
page = 5
threads = []
for mon in xrange(1, num):
print '[+] Thread %d is start' %mon
t = threading.Th... | 31.326087 | 125 | 0.523248 | from BeautifulSoup import BeautifulSoup
import urllib2, urllib, threading, sys
url = "http://apk.hiapk.com/apps"
down_url = "http://apk.hiapk.com/appdown/"
info_url = "http://apk.hiapk.com/appinfo/"
num = 11
page = 5
def makelist(n):
f = open('url{:02d}.txt'.format(n), 'w')
for i in range((n-1) * page, n * pa... | 994 | 0 | 23 |
9abd9596701e8582ee48510ba2ebb3887e404ddc | 13,371 | py | Python | NAVETTA/tests/DI_tests.py | MrAsura/NAVETTA | a7e71154c77aad5386cc0fcdf1e674adeb92bf43 | [
"BSD-3-Clause"
] | null | null | null | NAVETTA/tests/DI_tests.py | MrAsura/NAVETTA | a7e71154c77aad5386cc0fcdf1e674adeb92bf43 | [
"BSD-3-Clause"
] | null | null | null | NAVETTA/tests/DI_tests.py | MrAsura/NAVETTA | a7e71154c77aad5386cc0fcdf1e674adeb92bf43 | [
"BSD-3-Clause"
] | null | null | null | """
Tests for Master thesis
"""
import cfg
from TestSuite import runTests, SummaryType, TestUtils as TU
import re
import operator as op
if __name__ == "__main__":
print("Execute test file " + __file__)
main()
| 65.866995 | 405 | 0.522474 | """
Tests for Master thesis
"""
import cfg
from TestSuite import runTests, SummaryType, TestUtils as TU
import re
import operator as op
def main():
seqs = cfg.sequences[cfg.hevc_A] + cfg.sequences[cfg.hevc_B]
in_names = cfg.class_sequence_names[cfg.hevc_A] + cfg.class_sequence_names[cfg.hevc_B]
ver = 27
... | 13,132 | 0 | 23 |
95805e51c39933cefade2d937b26cd7de3d4186e | 43,010 | py | Python | test/test_nexsan.py | yrro/nexsan-exporter | 7e62d6003f99ee01ca28d5ece70750518f2a9c63 | [
"MIT"
] | null | null | null | test/test_nexsan.py | yrro/nexsan-exporter | 7e62d6003f99ee01ca28d5ece70750518f2a9c63 | [
"MIT"
] | 1 | 2019-04-30T14:24:52.000Z | 2019-04-30T14:24:52.000Z | test/test_nexsan.py | yrro/nexsan-exporter | 7e62d6003f99ee01ca28d5ece70750518f2a9c63 | [
"MIT"
] | 1 | 2020-12-17T15:53:48.000Z | 2020-12-17T15:53:48.000Z | import os
from xml.etree import ElementTree as ET
import pytest
from nexsan_exporter import nexsan
@pytest.fixture(params=['opstats1.xml', 'opstats2.xml'])
def opstats_xml(request):
'''
Returns a file-like object for the Collector to consume.
'''
test_dir, _ = os.path.splitext(request.module.__file__... | 45.321391 | 197 | 0.618019 | import os
from xml.etree import ElementTree as ET
import pytest
from nexsan_exporter import nexsan
def test_attrib_good():
elem = ET.Element('a')
elem.attrib['good'] = 'yes'
c = nexsan.Collector(elem)
assert 1 == c.isgood(elem)
def test_attrib_bad():
elem = ET.Element('a')
elem.attrib['good'... | 40,418 | 0 | 1,831 |
3404fa4c395dbf8dc9e560895ba0e3303610403f | 3,242 | py | Python | server.py | taimooralam/tcp-offloader | 3bad42e8552c629ad5398c2ff782cdf6c62bf689 | [
"MIT"
] | null | null | null | server.py | taimooralam/tcp-offloader | 3bad42e8552c629ad5398c2ff782cdf6c62bf689 | [
"MIT"
] | null | null | null | server.py | taimooralam/tcp-offloader | 3bad42e8552c629ad5398c2ff782cdf6c62bf689 | [
"MIT"
] | null | null | null | # Echo server program
import socket
import cPickle as pickle
import sys
import os
HOST = '' # Symbolic name meaning all available interfaces
PORT = 6000 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
SESSION_BEGIN = ... | 33.770833 | 152 | 0.586983 | # Echo server program
import socket
import cPickle as pickle
import sys
import os
HOST = '' # Symbolic name meaning all available interfaces
PORT = 6000 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
SESSION_BEGIN = ... | 0 | 0 | 0 |
a1b7e19d5a5264e4c99e5e68e686e88b9ef40833 | 7,722 | py | Python | macapype/nodes/correct_bias.py | Macatools/macapype | 50820e2ab948c91c5362771d51688edd09b72499 | [
"BSD-3-Clause"
] | 7 | 2020-07-04T04:04:03.000Z | 2022-03-24T14:35:45.000Z | macapype/nodes/correct_bias.py | Macatools/macapype | 50820e2ab948c91c5362771d51688edd09b72499 | [
"BSD-3-Clause"
] | 95 | 2020-01-02T16:41:20.000Z | 2021-12-07T15:50:41.000Z | macapype/nodes/correct_bias.py | Macatools/macapype | 50820e2ab948c91c5362771d51688edd09b72499 | [
"BSD-3-Clause"
] | 9 | 2019-11-14T12:46:14.000Z | 2022-01-26T09:44:21.000Z | import os
from nipype.interfaces.base import (CommandLine, CommandLineInputSpec,
TraitedSpec)
from nipype.interfaces.base import traits, File
# T1xT2BiasFieldCorrection
class T1xT2BiasFieldCorrection(CommandLine):
"""
Description: Bias field correction using T1w & T2w i... | 35.1 | 79 | 0.577959 | import os
from nipype.interfaces.base import (CommandLine, CommandLineInputSpec,
TraitedSpec)
from nipype.interfaces.base import traits, File
# T1xT2BiasFieldCorrection
class T1xT2BiasFieldCorrectionInputSpec(CommandLineInputSpec):
t1_file = File(
exists=True,
... | 1,421 | 3,325 | 72 |
c0e5cef6d881e16c1c00c2febf9fdc35c074f60d | 633 | py | Python | callblocker/wsgi.py | gmega/callblocker | 212ca8521ce53adb8c97acf06e03c1c5d291adf9 | [
"BSD-3-Clause"
] | 9 | 2019-12-02T23:59:44.000Z | 2022-03-01T09:59:48.000Z | callblocker/wsgi.py | gmega/callblocker | 212ca8521ce53adb8c97acf06e03c1c5d291adf9 | [
"BSD-3-Clause"
] | 7 | 2021-04-08T19:25:38.000Z | 2022-02-26T15:09:02.000Z | callblocker/wsgi.py | gmega/callblocker | 212ca8521ce53adb8c97acf06e03c1c5d291adf9 | [
"BSD-3-Clause"
] | null | null | null | """
WSGI config for callblocker project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.conf import settings
from django.core.wsgi import get_wsgi_application... | 23.444444 | 78 | 0.800948 | """
WSGI config for callblocker project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.conf import settings
from django.core.wsgi import get_wsgi_application... | 0 | 0 | 0 |
2721d2b4ac551efa08f0890cacb7de0c9198e8ae | 865 | py | Python | test/test_polygon_from_session.py | sdadia/polygonscan-python | 6ef00e5e47d3a37203af3f05d7e344fb30e83409 | [
"MIT"
] | 4 | 2022-01-10T21:58:02.000Z | 2022-03-27T20:21:35.000Z | test/test_polygon_from_session.py | yusufseyrek/polygonscan-python | c58a8190e41a5c9bac0a5e88db809e5e207b1c77 | [
"MIT"
] | 3 | 2021-09-25T05:10:27.000Z | 2021-11-21T04:56:29.000Z | test/test_polygon_from_session.py | yusufseyrek/polygonscan-python | c58a8190e41a5c9bac0a5e88db809e5e207b1c77 | [
"MIT"
] | 4 | 2021-09-25T05:11:08.000Z | 2022-03-09T01:01:33.000Z | import os
from unittest import TestCase
from unittest.async_case import IsolatedAsyncioTestCase
from aiohttp import ClientSession
from polygonscan.core.async_client import AsyncClient
from polygonscan.core.sync_client import SyncClient
from requests import Session
CONFIG_PATH = "polygon/configs/stable.json"
API_KEY ... | 28.833333 | 60 | 0.736416 | import os
from unittest import TestCase
from unittest.async_case import IsolatedAsyncioTestCase
from aiohttp import ClientSession
from polygonscan.core.async_client import AsyncClient
from polygonscan.core.sync_client import SyncClient
from requests import Session
CONFIG_PATH = "polygon/configs/stable.json"
API_KEY ... | 384 | 38 | 98 |
4bea4d6a362b91e6e75fc05831de551515ca2ef9 | 3,588 | py | Python | WebScraper.py | tacpc/LinkedInWebScrape | 65fe7d46c72bbaa264d67f008566ea0dcee2061e | [
"MIT"
] | null | null | null | WebScraper.py | tacpc/LinkedInWebScrape | 65fe7d46c72bbaa264d67f008566ea0dcee2061e | [
"MIT"
] | null | null | null | WebScraper.py | tacpc/LinkedInWebScrape | 65fe7d46c72bbaa264d67f008566ea0dcee2061e | [
"MIT"
] | null | null | null | import time
import random
from selenium import webdriver
""" NOT USED
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
"""
#-------------------------------... | 38.170213 | 160 | 0.597547 | import time
import random
from selenium import webdriver
""" NOT USED
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
"""
class LinkedIn_WebScraper:
d... | 3,019 | 5 | 192 |
4a6c085dc6e2a012ab7070e69161ed5cb000b171 | 62,922 | py | Python | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 28.216143 | 352 | 0.607101 | # Copyright 2017 The Forseti Security 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 ap... | 0 | 0 | 0 |
a26840d432c04484a4c33c9a44d97851bbc866fb | 1,752 | py | Python | django_todopago/admin.py | fossabot/django-todopago | 83a308d05bacf0b7f179812bb01ba30c32cc4653 | [
"ISC"
] | 3 | 2018-11-29T01:46:55.000Z | 2019-10-23T02:37:17.000Z | django_todopago/admin.py | fossabot/django-todopago | 83a308d05bacf0b7f179812bb01ba30c32cc4653 | [
"ISC"
] | 2 | 2020-02-07T12:08:03.000Z | 2021-08-03T18:56:37.000Z | django_todopago/admin.py | fossabot/django-todopago | 83a308d05bacf0b7f179812bb01ba30c32cc4653 | [
"ISC"
] | 3 | 2019-07-20T23:41:32.000Z | 2021-12-01T21:26:55.000Z | from django.contrib import admin
from django.db.models import F
from django.utils.translation import ugettext_lazy as _
from django_todopago import models
@admin.register(models.Merchant)
@admin.register(models.Operation)
| 22.177215 | 60 | 0.634132 | from django.contrib import admin
from django.db.models import F
from django.utils.translation import ugettext_lazy as _
from django_todopago import models
@admin.register(models.Merchant)
class MerchantAdmin(admin.ModelAdmin):
list_display = (
'name',
'merchant_id',
'sandbox',
)
cla... | 352 | 1,081 | 90 |
0bf1501a4b5a9b31b89b73800843e61e572e29f0 | 8,868 | py | Python | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | 1 | 2016-07-29T13:10:40.000Z | 2016-07-29T13:10:40.000Z | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | null | null | null | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from redis_cache import get_redis_connection
import pickle
import redis
from django.conf import settings
from surround.django.utils import CacheKey
from surround.django import execution
import datetime
from redis import WatchError
from surround.django.logging import setupModuleLo... | 30.474227 | 169 | 0.644339 | from __future__ import absolute_import
from redis_cache import get_redis_connection
import pickle
import redis
from django.conf import settings
from surround.django.utils import CacheKey
from surround.django import execution
import datetime
from redis import WatchError
from surround.django.logging import setupModuleLo... | 6,940 | 614 | 779 |
e94d0aa34fe010cfea4676242323630d81e92c93 | 1,043 | py | Python | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | 1 | 2017-01-30T23:37:27.000Z | 2017-01-30T23:37:27.000Z | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | """
Lightweight objects
"""
import collections
from caspy import str
| 24.255814 | 78 | 0.59348 | """
Lightweight objects
"""
import collections
from caspy import str
class Lightweight(collections.Mapping):
def __init__(self, *args, **kwargs):
for f in self._fields:
setattr(self, f, get(f, *args, **kwargs))
def copy(self, **kwargs):
return self.__class__(self, **kwargs)
d... | 696 | 18 | 257 |
1353b02ca4e0c7185d4e79893ec5229fe1ca26c0 | 2,255 | py | Python | skultrafast/nlo.py | Tillsten/skultrafast | 778eaf1539b6d85f21ac53b011472605673ef7e8 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T15:57:51.000Z | 2021-11-15T02:00:33.000Z | skultrafast/nlo.py | cZahn/skultrafast | 23572ba9ea32238f34a8a15390fb572ecd8bc6fa | [
"BSD-3-Clause"
] | 1 | 2019-01-17T11:56:38.000Z | 2019-07-11T15:30:58.000Z | skultrafast/nlo.py | cZahn/skultrafast | 23572ba9ea32238f34a8a15390fb572ecd8bc6fa | [
"BSD-3-Clause"
] | 6 | 2018-11-08T14:11:06.000Z | 2021-09-01T14:53:02.000Z | """
Module containing helpers for small calculation involing nonlinear optics
"""
# %%
from skultrafast.unit_conversions import c
from scipy.optimize import minimize_scalar
import numpy as np
def tl_pulse_from_nm(center_wl: float, fhwm: float, shape: str = 'gauss') -> float:
"""
Calculates the transformlimted ... | 22.107843 | 83 | 0.616408 | """
Module containing helpers for small calculation involing nonlinear optics
"""
# %%
from skultrafast.unit_conversions import c
from scipy.optimize import minimize_scalar
import numpy as np
def tl_pulse_from_nm(center_wl: float, fhwm: float, shape: str = 'gauss') -> float:
"""
Calculates the transformlimted ... | 189 | 0 | 46 |
2631ac6c381d66f6b5937ac912685144a6f43a08 | 51 | py | Python | graphical_models/classes/undirected/__init__.py | vishalbelsare/graphical_models | 15078b3a8ac0af7198150b06359d6c701faa26c3 | [
"BSD-3-Clause"
] | 2 | 2021-09-12T13:41:12.000Z | 2021-11-10T12:22:03.000Z | graphical_models/classes/undirected/__init__.py | vishalbelsare/graphical_models | 15078b3a8ac0af7198150b06359d6c701faa26c3 | [
"BSD-3-Clause"
] | null | null | null | graphical_models/classes/undirected/__init__.py | vishalbelsare/graphical_models | 15078b3a8ac0af7198150b06359d6c701faa26c3 | [
"BSD-3-Clause"
] | 1 | 2021-09-12T13:41:16.000Z | 2021-09-12T13:41:16.000Z | from .undirected_graph import *
from .ggm import *
| 17 | 31 | 0.764706 | from .undirected_graph import *
from .ggm import *
| 0 | 0 | 0 |
37f04f1a1d916c12b42cc715866ec72998795c87 | 4,870 | py | Python | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | 45.092593 | 131 | 0.700205 | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | 0 | 18 | 23 |
678f4145fa288ccac9613f16b1e2d9029f5bc2e7 | 8,370 | py | Python | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from demisto_sdk.__main__ import main
from TestSuite.test_tools import ChangeCWD
DOC_REVIEW = 'doc-review'
def test_spell_integration_dir_valid(repo):
"""
Given
- a integration directory.
When
- Running doc-review on it.
Then
- Ensure spell check run... | 35.769231 | 109 | 0.663321 | from click.testing import CliRunner
from demisto_sdk.__main__ import main
from TestSuite.test_tools import ChangeCWD
DOC_REVIEW = 'doc-review'
def test_spell_integration_dir_valid(repo):
"""
Given
- a integration directory.
When
- Running doc-review on it.
Then
- Ensure spell check run... | 0 | 0 | 0 |
38369937f3dba2d1ac68935076f8fee7a829e691 | 34 | py | Python | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | import vformer.decoder as decoder
| 17 | 33 | 0.852941 | import vformer.decoder as decoder
| 0 | 0 | 0 |
b21df7ef0542cc510be893064e6ba173c34cee88 | 9,812 | py | Python | ct_charachterization/_third_algorithm.py | s-mostafa-a/non-central-gamma-for-ct-scans | 349a017c6d79852fd33dc1854ee9226bf02be4d7 | [
"Apache-2.0"
] | 1 | 2020-09-14T04:34:36.000Z | 2020-09-14T04:34:36.000Z | ct_charachterization/_third_algorithm.py | s-mostafa-a/CT-noise-statistical-characterization | c29bb8b96b682ca8a0c7a192887082ef6c83fc4a | [
"Apache-2.0"
] | null | null | null | ct_charachterization/_third_algorithm.py | s-mostafa-a/CT-noise-statistical-characterization | c29bb8b96b682ca8a0c7a192887082ef6c83fc4a | [
"Apache-2.0"
] | null | null | null | import numpy as onp
from .utility.utils import broadcast_tile, block_matrix, sum_over_each_neighborhood_on_blocked_matrix, expand
from ._second_algorithm import run_second_algorithm
from ct_charachterization.utility.utils import expand, contract
| 63.714286 | 120 | 0.711985 | import numpy as onp
from .utility.utils import broadcast_tile, block_matrix, sum_over_each_neighborhood_on_blocked_matrix, expand
from ._second_algorithm import run_second_algorithm
from ct_charachterization.utility.utils import expand, contract
def run_third_algorithm_gamma_instead_of_pi(y: onp.array, mu: onp.array,... | 9,470 | 0 | 92 |
601790757cb8bf528ef752c37ce8563c0c01ac42 | 13,009 | py | Python | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | 1 | 2018-09-28T16:02:30.000Z | 2018-09-28T16:02:30.000Z | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | null | null | null | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | 1 | 2018-11-02T23:41:47.000Z | 2018-11-02T23:41:47.000Z | #! /usr/bin/env python
import argparse
import base64
import codecs
import collections
import StringIO
import logging
import json
import os
import stat
import pipes
import re
import signal
import sys
import thread
import time
import pexpect
import psutil
import six
logger = logging.getLogger('awx.main.utils.expect')... | 39.302115 | 115 | 0.6115 | #! /usr/bin/env python
import argparse
import base64
import codecs
import collections
import StringIO
import logging
import json
import os
import stat
import pipes
import re
import signal
import sys
import thread
import time
import pexpect
import psutil
import six
logger = logging.getLogger('awx.main.utils.expect')... | 1,593 | 0 | 69 |
cad462b46d744a7bb97f4a59e074561b900bafaa | 169 | py | Python | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | def add(x, y):
""" Add two numbers and return their sum"""
return x+y
def subtract(x, y):
""" Subtract to numbers and return their results"""
return x-y | 24.142857 | 55 | 0.621302 | def add(x, y):
""" Add two numbers and return their sum"""
return x+y
def subtract(x, y):
""" Subtract to numbers and return their results"""
return x-y | 0 | 0 | 0 |
edde5d6b5964dff1706789e56ebba46a7c9bbf45 | 9,906 | py | Python | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 1 | 2020-07-18T13:05:48.000Z | 2020-07-18T13:05:48.000Z | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 11 | 2020-07-22T07:33:14.000Z | 2020-08-20T12:01:55.000Z | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 4 | 2020-06-03T11:38:34.000Z | 2020-08-11T10:38:57.000Z | #
# Python script for generating new documentation
#
# _author_ = Grant Curell <grant_curell@dell.com>
#
#
# Copyright (c) 2020 Dell EMC Corporation
#
# 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 Licen... | 47.171429 | 118 | 0.590349 | #
# Python script for generating new documentation
#
# _author_ = Grant Curell <grant_curell@dell.com>
#
#
# Copyright (c) 2020 Dell EMC Corporation
#
# 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 Licen... | 0 | 0 | 0 |
b643480d651874e835d6b2778a8703ac72af7388 | 4,279 | py | Python | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 1 | 2022-03-17T21:05:23.000Z | 2022-03-17T21:05:23.000Z | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 310 | 2020-07-08T14:14:08.000Z | 2022-03-23T18:04:57.000Z | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 1 | 2020-12-21T04:54:56.000Z | 2020-12-21T04:54:56.000Z | """" Unit test file. """
import unittest
import math
import pandas as pd
from ..LineageInputOutput import import_exp_data, tryRecursion
from ..CellVar import CellVar as c
class TestModel(unittest.TestCase):
"""
Unit test class for importing data.
"""
def setUp(self):
"""
Gets the pat... | 40.367925 | 87 | 0.582846 | """" Unit test file. """
import unittest
import math
import pandas as pd
from ..LineageInputOutput import import_exp_data, tryRecursion
from ..CellVar import CellVar as c
class TestModel(unittest.TestCase):
"""
Unit test class for importing data.
"""
def setUp(self):
"""
Gets the pat... | 0 | 0 | 0 |
5e98d4eb6d0dd2e64a29d0bb36720e488e313cae | 1,629 | py | Python | preprocessing/repeat_file_until.py | theuerse/emulation_lib | d9388202d7ec9283404f9ab4d2448ff19922b44f | [
"MIT"
] | 2 | 2018-12-11T10:02:06.000Z | 2019-04-01T10:39:09.000Z | preprocessing/repeat_file_until.py | theuerse/emulation_lib | d9388202d7ec9283404f9ab4d2448ff19922b44f | [
"MIT"
] | null | null | null | preprocessing/repeat_file_until.py | theuerse/emulation_lib | d9388202d7ec9283404f9ab4d2448ff19922b44f | [
"MIT"
] | null | null | null | from . import preprocessing_step
| 37.022727 | 92 | 0.619398 | from . import preprocessing_step
class RepeatIntermedFileUntil(preprocessing_step.PreprocessingStep):
def __init__(self,second, includeFilesWithOnlyOneEntry):
super(RepeatIntermedFileUntil, self).__init__()
self.stop_second = second
self.includeFilesWithOnlyOneEntry = includeFilesWithOnlyOn... | 1,472 | 47 | 76 |
0f1a726075f7be2aa97e0c273719ec6f20f11329 | 772 | py | Python | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
https://www.codechef.com/problems/JAIN
Type: Dynamic Programming
"""
if __name__ == '__main__':
for t in range(int(input())):
solve() | 20.315789 | 41 | 0.395078 | """
https://www.codechef.com/problems/JAIN
Type: Dynamic Programming
"""
def solve():
n = int(input())
freq = dict()
for i in range(32):
freq[i] = 0
for i in range(n):
s = set(input())
si = 0
if 'a' in s:
si += 1<<0
if 'e' in s:
si += 1<<... | 598 | 0 | 23 |
a5a66a2255cde9f6b079aa65e2e29420d7d8e202 | 3,779 | py | Python | mini_gplus/resources/circles.py | KTachibanaM/pill-city | 8a5a9c6a46c79f2e5c33c598d931360c319b75f4 | [
"MIT"
] | 16 | 2021-08-03T07:03:15.000Z | 2021-09-23T09:09:57.000Z | mini_gplus/resources/circles.py | KTachibanaM/pill-city | 8a5a9c6a46c79f2e5c33c598d931360c319b75f4 | [
"MIT"
] | 193 | 2021-07-29T09:43:54.000Z | 2021-10-05T05:18:55.000Z | mini_gplus/resources/circles.py | KTachibanaM/mini-gplus | 1881bef983797fe99e1499fb794976cb48863c70 | [
"MIT"
] | 3 | 2021-09-14T10:08:41.000Z | 2021-09-20T12:47:40.000Z | from flask_restful import Resource, fields, marshal_with, reqparse
from flask_jwt_extended import jwt_required, get_jwt_identity
from mini_gplus.daos.user import find_user
from mini_gplus.daos.circle import create_circle, get_circles, find_circle, toggle_member, delete_circle, rename_circle
from mini_gplus.daos.excepti... | 30.723577 | 119 | 0.620005 | from flask_restful import Resource, fields, marshal_with, reqparse
from flask_jwt_extended import jwt_required, get_jwt_identity
from mini_gplus.daos.user import find_user
from mini_gplus.daos.circle import create_circle, get_circles, find_circle, toggle_member, delete_circle, rename_circle
from mini_gplus.daos.excepti... | 0 | 3,049 | 92 |
dbf93baa075190a525d65c3a6289cc630451fc3a | 167 | py | Python | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import Relationship,Person
admin.site.register(Relationship)
admin.site.register(Person)
| 18.555556 | 39 | 0.814371 | from django.contrib import admin
# Register your models here.
from .models import Relationship,Person
admin.site.register(Relationship)
admin.site.register(Person)
| 0 | 0 | 0 |
4d20e6040c4d26b84e140284e927cc5b71601759 | 7,090 | py | Python | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | 14 | 2019-10-16T15:08:44.000Z | 2022-02-06T10:26:11.000Z | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | null | null | null | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | 2 | 2021-04-13T09:32:55.000Z | 2021-08-15T13:16:05.000Z | __copyright__ = "Copyright (C) 2019 Zachary J Weiner"
__license__ = """
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, c... | 38.956044 | 85 | 0.585896 | __copyright__ = "Copyright (C) 2019 Zachary J Weiner"
__license__ = """
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, c... | 3,240 | 0 | 137 |
ff97cadf9b8ef006c57b729cde681d8bb84129be | 1,108 | py | Python | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | "Output stream buffering: A first look"
'''
By default, standard output is fully buffered when connected to a pipe like this; it’s only
line-buffered when connected to a terminal:
>>> pipe = os.popen('python testexit_os.py')
>>> pipe.read() # streams not flushed on exit
''
>>> pipe = os.popen('python -u testexit_os.py'... | 41.037037 | 91 | 0.731949 | "Output stream buffering: A first look"
'''
By default, standard output is fully buffered when connected to a pipe like this; it’s only
line-buffered when connected to a terminal:
>>> pipe = os.popen('python testexit_os.py')
>>> pipe.read() # streams not flushed on exit
''
>>> pipe = os.popen('python -u testexit_os.py'... | 0 | 0 | 0 |
8f49ed710af1d529097e426ef71f9ebdafc2c93e | 2,543 | py | Python | examples/fetch.py | rayattack/supersql | 0a592e7f303ac18b8df7bebac226b26f38f6d192 | [
"MIT"
] | 2 | 2019-11-04T00:19:30.000Z | 2020-10-04T01:24:04.000Z | examples/fetch.py | tersoo/supersql | 4d20bd72a9de50e485ce79285c355a1a7ac04b55 | [
"MIT"
] | 2 | 2021-03-31T14:07:04.000Z | 2021-03-31T14:07:20.000Z | examples/fetch.py | tersoo/supersql | 4d20bd72a9de50e485ce79285c355a1a7ac04b55 | [
"MIT"
] | 2 | 2021-03-30T21:40:14.000Z | 2022-03-17T20:52:25.000Z | from supersql import Query
from .schemas.actor import Actor
from .schemas.staff import Staff
query = Query(
user='postgres',
password='postgres',
vendor='postrgres',
host='localhost:5432/mydatabase'
)
actor = Actor()
prep = query.SELECT(
actor.actor_id,
actor.first_name
).FROM(
actor
).W... | 23.990566 | 134 | 0.680299 | from supersql import Query
from .schemas.actor import Actor
from .schemas.staff import Staff
query = Query(
user='postgres',
password='postgres',
vendor='postrgres',
host='localhost:5432/mydatabase'
)
actor = Actor()
prep = query.SELECT(
actor.actor_id,
actor.first_name
).FROM(
actor
).W... | 0 | 0 | 0 |
27c4c7489747186d84bec4d3c0220c86040a6bb8 | 5,602 | py | Python | django_sha2/hashers.py | fwenzel/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 9 | 2015-01-20T23:21:32.000Z | 2020-05-03T14:33:12.000Z | django_sha2/hashers.py | h4ck3rm1k3/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 1 | 2016-01-28T10:32:28.000Z | 2017-04-12T21:15:47.000Z | django_sha2/hashers.py | h4ck3rm1k3/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 3 | 2015-01-11T22:08:47.000Z | 2021-12-06T19:40:29.000Z | import base64
import hmac
import hashlib
import logging
import bcrypt
from django.conf import settings
from django.contrib.auth.hashers import (BCryptPasswordHasher,
BasePasswordHasher, mask_hash)
from django.utils.crypto import constant_time_compare
from django.utils.encoding... | 35.455696 | 102 | 0.643699 | import base64
import hmac
import hashlib
import logging
import bcrypt
from django.conf import settings
from django.contrib.auth.hashers import (BCryptPasswordHasher,
BasePasswordHasher, mask_hash)
from django.utils.crypto import constant_time_compare
from django.utils.encoding... | 2,386 | 505 | 162 |
e3b607ebbf3d9780052d8182db3dc0160f1ee743 | 9,786 | py | Python | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 4 | 2020-10-31T19:52:05.000Z | 2021-09-22T11:39:27.000Z | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | null | null | null | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 2 | 2020-02-27T08:28:35.000Z | 2020-09-13T12:39:26.000Z | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from sets import Set
import warnings
from twisted.internet import interfaces, defer, main
from twisted.persisted import styles
from twisted.python import log, failure
from ops import ReadFileOp, WriteFileOp
from util import StateEvent... | 35.846154 | 134 | 0.649193 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from sets import Set
import warnings
from twisted.internet import interfaces, defer, main
from twisted.persisted import styles
from twisted.python import log, failure
from ops import ReadFileOp, WriteFileOp
from util import StateEvent... | 7,299 | 2,051 | 23 |
9a35cb66f57610d57563861ff9e7b827fe1b1c18 | 322 | py | Python | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | null | null | null | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | 1 | 2021-05-05T14:10:16.000Z | 2021-05-05T14:10:16.000Z | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | null | null | null | # vim: expandtab tabstop=4 shiftwidth=4
from dspftw import *
from .constellation_plot import conplot, constellation_plot
from .plot_3d_complex import plot_3d_complex, plot3c
from .plot_complex import plotc, plot_complex
from .plot_slider import plot_slider, plots
from .plot_func_slider import plot_func_slider, plotfs... | 29.272727 | 59 | 0.838509 | # vim: expandtab tabstop=4 shiftwidth=4
from dspftw import *
from .constellation_plot import conplot, constellation_plot
from .plot_3d_complex import plot_3d_complex, plot3c
from .plot_complex import plotc, plot_complex
from .plot_slider import plot_slider, plots
from .plot_func_slider import plot_func_slider, plotfs... | 0 | 0 | 0 |
aef865d7076e98734cf84e2a00de5b4bbd35b325 | 4,729 | py | Python | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | 15 | 2019-11-07T05:13:39.000Z | 2022-03-12T15:45:06.000Z | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | null | null | null | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | 7 | 2019-11-07T05:13:43.000Z | 2021-11-05T04:45:39.000Z | # -*- coding: utf-8 -*-
import logging
import os
from datetime import datetime
import boto3
from boto3.dynamodb.conditions import Key
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
"""
if __name__ == "__main__":
ddb = DdbChat()
table = ddb.createConnection('chat')
name = ... | 31.738255 | 118 | 0.593995 | # -*- coding: utf-8 -*-
import logging
import os
from datetime import datetime
import boto3
from boto3.dynamodb.conditions import Key
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
def create_connection(table_name):
ddb = None
if os.getenv('API_ENDPOINT') != 'localhost':
... | 3,383 | -5 | 153 |
1c6bfeb05b83c65766976650f9df80384dcb92d8 | 390 | py | Python | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | 1 | 2022-02-15T03:25:55.000Z | 2022-02-15T03:25:55.000Z | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | null | null | null | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 21.666667 | 57 | 0.684615 | def main():
import os
import atexit
import unittest
import maya.standalone
maya.standalone.initialize()
program = unittest.main(module=None, exit=False)
maya.standalone.uninitialize()
atexit._run_exitfuncs()
ret_code = not program.result.wasSuccessful()
os._exit(ret_code) # sy... | 328 | 0 | 22 |
f0dbe1a90f4e050cc18595a21a7c1d0d47b977c9 | 2,976 | py | Python | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | 1 | 2022-03-13T13:10:55.000Z | 2022-03-13T13:10:55.000Z | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | null | null | null | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | null | null | null | import logging
import logging.handlers
class HTTPHandler(logging.Handler):
"""
A class Based on Vinay Sajip HTTPHandler-class which sends records to a Web server,
using either GET or POST semantics. It supports HTTP, HTTPS and basic authorization.
"""
def __init__(self, host, url, method="GET", se... | 36.292683 | 109 | 0.528562 | import logging
import logging.handlers
class HTTPHandler(logging.Handler):
"""
A class Based on Vinay Sajip HTTPHandler-class which sends records to a Web server,
using either GET or POST semantics. It supports HTTP, HTTPS and basic authorization.
"""
def __init__(self, host, url, method="GET", se... | 0 | 0 | 0 |
8f8584e9f9d3c43ec5a2db315fe06cc231113ce0 | 888 | py | Python | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | 8 | 2021-08-06T09:50:15.000Z | 2022-03-06T21:36:08.000Z | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | null | null | null | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | 2 | 2021-11-25T18:47:59.000Z | 2022-03-06T21:36:12.000Z | #!/usr/bin/python3
from requests import get
import base64
# Gets the splash for the game
| 31.714286 | 115 | 0.621622 | #!/usr/bin/python3
from requests import get
import base64
# Gets the splash for the game
def get_splash(version, type="mobileBgImg"):
# The endpoint
endpoint = 'https://www.epicgames.com/fortnite/en-US/api/page?slug={0}&type=battle-pass'
# Parse the version into correct numbers (ex: 17 to 27)
version... | 775 | 0 | 22 |
1895f06c48bd78465fc25caf92bad81148b6bf5f | 2,432 | py | Python | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 25.072165 | 75 | 0.629934 | # Copyright 2018 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 455 | 598 | 129 |
17ce5c54fc7801ee1542ef8fc4b3c9609498fc0a | 41 | py | Python | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | from .core import run
__all__ = ['run']
| 10.25 | 21 | 0.658537 | from .core import run
__all__ = ['run']
| 0 | 0 | 0 |
9c151f7639a2e580fc789524504c699c992254c0 | 6,481 | py | Python | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 5 | 2021-04-10T12:50:10.000Z | 2022-03-13T12:02:30.000Z | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 1 | 2021-03-12T01:13:59.000Z | 2021-03-12T01:13:59.000Z | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 2 | 2021-04-10T04:40:13.000Z | 2022-03-22T03:41:49.000Z | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)
# -----------------------------------------------------
import torch
import torch.utils.data
from utils.dataset import coco
from opt import opt
f... | 30.42723 | 106 | 0.555624 | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)
# -----------------------------------------------------
import torch
import torch.utils.data
from utils.dataset import coco
from opt import opt
f... | 5,822 | 0 | 69 |
a370f084c1a5af873d7b2244a72a26806457859a | 3,810 | py | Python | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-08-19T16:16:39.000Z | 2019-06-11T02:23:50.000Z | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-07-05T09:51:54.000Z | 2018-07-06T13:12:04.000Z | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | null | null | null | from itertools import groupby
import logging
from django.conf import settings
from django.db import models
from zconnect._models.base import ModelBase
from zconnect.models import Product
from zconnect.zc_billing.util import BillingPeriod, next_bill_period
logger = logging.getLogger(__name__)
CURRENCIES = [
("U... | 30.97561 | 83 | 0.674541 | from itertools import groupby
import logging
from django.conf import settings
from django.db import models
from zconnect._models.base import ModelBase
from zconnect.models import Product
from zconnect.zc_billing.util import BillingPeriod, next_bill_period
logger = logging.getLogger(__name__)
CURRENCIES = [
("U... | 343 | 64 | 162 |
5b00a5f3fb30e13e895912418f99c3d5d9ddb059 | 4,736 | py | Python | apps/payment/views.py | Xtuden-com/onlineweb4 | 04b17ba43e150a16481255213f1bc49e38d7e2af | [
"MIT"
] | null | null | null | apps/payment/views.py | Xtuden-com/onlineweb4 | 04b17ba43e150a16481255213f1bc49e38d7e2af | [
"MIT"
] | 1 | 2021-04-22T12:22:17.000Z | 2021-04-29T12:47:45.000Z | apps/payment/views.py | tor0405/onlineweb4 | 1dd5ebcfb18504d6c280f5ed1d91b945ed9029b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import stripe
from django.utils.translation import gettext as _
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from stripe.error import InvalidRequestError, StripeError
from apps.common.rest_framework.mixins import MultiSer... | 33.588652 | 87 | 0.673353 | # -*- coding: utf-8 -*-
import logging
import stripe
from django.utils.translation import gettext as _
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from stripe.error import InvalidRequestError, StripeError
from apps.common.rest_framework.mixins import MultiSer... | 447 | 2,442 | 127 |
5b25e0dbc87ccbe474b0882d1808e90f31d26594 | 921 | py | Python | df_to_azure/settings.py | zypp-io/df_to_azure | 9f1f8ca56a4d2473ecd759f2c96de9845b430c94 | [
"Apache-2.0"
] | null | null | null | df_to_azure/settings.py | zypp-io/df_to_azure | 9f1f8ca56a4d2473ecd759f2c96de9845b430c94 | [
"Apache-2.0"
] | 26 | 2020-11-06T15:54:25.000Z | 2022-03-01T13:51:11.000Z | df_to_azure/settings.py | zypp-io/df_to_azure | 9f1f8ca56a4d2473ecd759f2c96de9845b430c94 | [
"Apache-2.0"
] | 2 | 2021-01-21T02:52:44.000Z | 2021-03-04T19:55:56.000Z | from typing import Union
from pandas import DataFrame
| 28.78125 | 117 | 0.606949 | from typing import Union
from pandas import DataFrame
class TableParameters:
def __init__(
self,
df: DataFrame,
table_name: str,
schema: str,
method: str,
id_field: Union[str, list],
):
self.df = df
self.table_name = table_name
self.sche... | 761 | 1 | 103 |
c48c95f453df4d83d47b46ecf7e0a81df5ee771a | 212 | py | Python | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | 6 | 2016-06-02T09:27:41.000Z | 2021-04-21T06:46:12.000Z | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | null | null | null | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | 1 | 2018-08-25T03:11:05.000Z | 2018-08-25T03:11:05.000Z | """Test the module SMOTE ENN."""
from __future__ import print_function
from unbalanced_dataset.combine import SMOTEENN
def test_smote_enn():
"""Test the SMOTE ENN function."""
print('Test SMOTE ENN')
| 19.272727 | 47 | 0.731132 | """Test the module SMOTE ENN."""
from __future__ import print_function
from unbalanced_dataset.combine import SMOTEENN
def test_smote_enn():
"""Test the SMOTE ENN function."""
print('Test SMOTE ENN')
| 0 | 0 | 0 |
e7df4eb8cdc06811a19d18707c03fc2726d5a2c5 | 5,804 | py | Python | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 1 | 2018-11-26T07:58:37.000Z | 2018-11-26T07:58:37.000Z | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 6 | 2020-07-16T22:27:38.000Z | 2022-02-12T08:37:39.000Z | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 1 | 2018-11-26T09:15:51.000Z | 2018-11-26T09:15:51.000Z | """
Usage example:
```sh
# To train model on all words:
python model.py "${HOME}/ml-data/speech-command-browser" 232
# To train model on a subset of the words (in addition to _background_noise
# and _unknown_):
python model.py \
--include_words=left,right,up,down \
"${HOME}/ml-data/speech-command-browser" 232... | 28.875622 | 78 | 0.631289 | """
Usage example:
```sh
# To train model on all words:
python model.py "${HOME}/ml-data/speech-command-browser" 232
# To train model on a subset of the words (in addition to _background_noise
# and _unknown_):
python model.py \
--include_words=left,right,up,down \
"${HOME}/ml-data/speech-command-browser" 232... | 3,334 | 0 | 46 |