hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 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 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c016685adf742253aeb88b9fd65776998eb06c95 | 12,791 | py | Python | src/orion/algo/robo/base.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/robo/base.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/robo/base.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | 2 | 2020-09-28T15:18:19.000Z | 2021-06-29T20:27:18.000Z | """
Base class for RoBO algorithms.
"""
import george
import numpy
from robo.acquisition_functions.ei import EI
from robo.acquisition_functions.lcb import LCB
from robo.acquisition_functions.log_ei import LogEI
from robo.acquisition_functions.pi import PI
from robo.initial_design import init_latin_hypercube_sampling
fr... | 29.955504 | 91 | 0.611133 | """
Base class for RoBO algorithms.
"""
import george
import numpy
from orion.algo.base import BaseAlgorithm
from robo.acquisition_functions.ei import EI
from robo.acquisition_functions.lcb import LCB
from robo.acquisition_functions.log_ei import LogEI
from robo.acquisition_functions.pi import PI
from robo.initial_desi... | 0 | 2,108 | 0 | 6,321 | 0 | 0 | 0 | 20 | 45 |
60875a7ab9432f3fb7e0e5ed2b1ffc35e3536e4e | 126 | py | Python | development/david.py | DavidVujic/python-polylith-example | d19ca8a4142d34399a1c0f98a7d0e9b1c9becf8e | [
"MIT"
] | null | null | null | development/david.py | DavidVujic/python-polylith-example | d19ca8a4142d34399a1c0f98a7d0e9b1c9becf8e | [
"MIT"
] | null | null | null | development/david.py | DavidVujic/python-polylith-example | d19ca8a4142d34399a1c0f98a7d0e9b1c9becf8e | [
"MIT"
] | null | null | null |
testing()
| 11.454545 | 36 | 0.674603 | from demo.my_logger import getLogger
def testing():
logger = getLogger("david")
logger.info("HEJHEJ!")
testing()
| 0 | 0 | 0 | 0 | 0 | 53 | 0 | 15 | 45 |
ae07b9be27f24bc21e06d632105e57a3cedd1669 | 6,204 | py | Python | utils.py | ThoroughImages/EasySparse | ebed5ee3c104523d35ccb62795b3b78b8df51d65 | [
"MIT"
] | 5 | 2019-04-24T01:42:42.000Z | 2020-07-28T16:04:10.000Z | utils.py | FinBrain/EasySparse | ebed5ee3c104523d35ccb62795b3b78b8df51d65 | [
"MIT"
] | null | null | null | utils.py | FinBrain/EasySparse | ebed5ee3c104523d35ccb62795b3b78b8df51d65 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
def read_and_decode_batch(filename_queue, batch_size, capacity, min_after_dequeue):
"""Dequeue a batch of data from the TFRecord.
Args:
filename_queue: Filename Queue of the TFRecord.
batch_size: How many records dequeued each time.
capacity: The... | 36.710059 | 109 | 0.590909 | import tensorflow as tf
import numpy as np
def read_and_decode_batch(filename_queue, batch_size, capacity, min_after_dequeue):
"""Dequeue a batch of data from the TFRecord.
Args:
filename_queue: Filename Queue of the TFRecord.
batch_size: How many records dequeued each time.
capacity: The... | 0 | 0 | 0 | 0 | 0 | 175 | 0 | 0 | 50 |
78de2bb04fd0bb82e0b51f7cfae48adaa0e1cdbc | 6,329 | py | Python | boto/ec2/volumestatus.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | boto/ec2/volumestatus.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | boto/ec2/volumestatus.py | Yurzs/boto | d739d6c52877699206e69b9901bbe92ea437ba5d | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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... | 30.723301 | 74 | 0.625375 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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... | 0 | 0 | 0 | 4,955 | 0 | 0 | 0 | 30 | 161 |
e0b51eea3c755704b2a8e38b26d3139be520bd74 | 8,135 | py | Python | youtube_dl_gui/utils.py | goYou/youtube-dl-gui | d5dc0c8b531215540bfe068f463d995c63260c19 | [
"Unlicense"
] | 24 | 2021-04-15T04:24:37.000Z | 2022-03-26T06:10:46.000Z | youtube_dl_gui/utils.py | goYou/youtube-dl-gui | d5dc0c8b531215540bfe068f463d995c63260c19 | [
"Unlicense"
] | 3 | 2021-05-06T16:40:12.000Z | 2022-03-24T17:22:39.000Z | youtube_dl_gui/utils.py | goYou/youtube-dl-gui | d5dc0c8b531215540bfe068f463d995c63260c19 | [
"Unlicense"
] | 2 | 2022-01-27T15:43:51.000Z | 2022-02-06T02:31:09.000Z | # type: ignore[misc]
"""yt-dlg module that contains util functions.
Attributes:
YOUTUBEDL_BIN (string): Youtube-dl binary filename.
"""
from __future__ import annotations
import locale
import math
import os
import subprocess
from pathlib import Path
from .info import __appname__
IS_WINDOWS = os.name == "nt"
... | 23.99705 | 81 | 0.629256 | # type: ignore[misc]
"""yt-dlg module that contains util functions.
Attributes:
YOUTUBEDL_BIN (string): Youtube-dl binary filename.
"""
from __future__ import annotations
import locale
import math
import os
import subprocess
import sys
from pathlib import Path
from .info import __appname__
IS_WINDOWS = os.nam... | 0 | 0 | 0 | 0 | 0 | 412 | 0 | -11 | 91 |
99f0e29f55e9574e2f2dc01af3bb4b0d10cebdf9 | 8,856 | py | Python | service/resources/permit_list.py | SFDigitalServices/ooc-permit-list-sd-mspy | e3403db304a4eae380a8f45bcd433bd656bee65f | [
"MIT"
] | null | null | null | service/resources/permit_list.py | SFDigitalServices/ooc-permit-list-sd-mspy | e3403db304a4eae380a8f45bcd433bd656bee65f | [
"MIT"
] | 2 | 2019-08-16T17:34:00.000Z | 2021-06-02T00:07:36.000Z | service/resources/permit_list.py | SFDigitalServices/ooc-permit-list-sd-mspy | e3403db304a4eae380a8f45bcd433bd656bee65f | [
"MIT"
] | null | null | null | """Permit List module"""
| 44.502513 | 343 | 0.538053 | """Permit List module"""
import json
import falcon
import jsend
import sentry_sdk
from screendoor_sdk.screendoor import Screendoor
class PermitList():
"""Permit List class"""
scrndr = None
scrndr_proj_id = None
logger_name = ''
referred_label_map = {
'MOD - Referred' : "Mayor's Office of D... | 0 | 0 | 0 | 8,690 | 0 | 0 | 0 | -4 | 133 |
aeccec51ce147ccf60b6047c894a4032ca91cbdb | 2,651 | py | Python | redstone/crn.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | 2 | 2021-02-25T19:33:50.000Z | 2022-02-14T23:53:10.000Z | redstone/crn.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | 10 | 2020-10-22T21:13:08.000Z | 2021-05-24T15:28:15.000Z | redstone/crn.py | thu2thu2/redstone | 5f3722cefb19ac336486018454d8bf813e8add0e | [
"Apache-2.0"
] | 2 | 2020-10-21T16:00:51.000Z | 2021-05-24T17:14:37.000Z | # Copyright 2020 Mathew Odden <mathewrodden@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 30.825581 | 263 | 0.669559 | # Copyright 2020 Mathew Odden <mathewrodden@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 0 | 0 | 0 | 593 | 0 | 394 | 0 | -2 | 68 |
facf943b77bf19acfab5457d23501bd9c20827df | 481 | py | Python | importers/unsdg_indicator.py | codeforIATI/codelist-updater | 624b685756f50444df5eb1af5e6f74f139c8fb46 | [
"MIT"
] | 1 | 2019-11-09T12:43:29.000Z | 2019-11-09T12:43:29.000Z | importers/unsdg_indicator.py | codeforIATI/IATI-Codelists-NonEmbedded-updater | 725a83df8467212c807db3ec3d3e3cd885aa00e4 | [
"MIT"
] | 36 | 2019-11-11T09:41:14.000Z | 2022-03-19T23:12:42.000Z | importers/unsdg_indicator.py | codeforIATI/codelist-updater | 624b685756f50444df5eb1af5e6f74f139c8fb46 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
run()
| 26.722222 | 176 | 0.636175 | from .helpers import Importer
def run():
url = 'https://docs.google.com/spreadsheets/d/1o1SQDqfFTBgUJO2k83mfFlLtgpwUUkEbc3gjRgIWJSo/export?format=csv&id=1o1SQDqfFTBgUJO2k83mfFlLtgpwUUkEbc3gjRgIWJSo&gid=1990382168'
lookup = [
('code', 'code'),
('name_en', 'name_en'),
('name_fr', 'name_f... | 0 | 0 | 0 | 0 | 0 | 388 | 0 | 8 | 45 |
3950e505818cfeddf61cc510b3f67cc360b10d0b | 1,756 | py | Python | __init__.py | portify/io_mesh_ter | 6c3fcaba493d09d9e9df8590644b3c61042d2cab | [
"MIT"
] | 1 | 2018-12-15T20:06:09.000Z | 2018-12-15T20:06:09.000Z | __init__.py | portify/io_mesh_ter | 6c3fcaba493d09d9e9df8590644b3c61042d2cab | [
"MIT"
] | null | null | null | __init__.py | portify/io_mesh_ter | 6c3fcaba493d09d9e9df8590644b3c61042d2cab | [
"MIT"
] | 2 | 2017-07-15T15:19:08.000Z | 2019-05-14T05:59:12.000Z | bl_info = {
"name": "Torque Terrain (TER) format",
"author": "port",
"version": (0, 0, 1),
"blender": (2, 76, 0),
"location": "File > Import > Torque Terrain",
"description": "Import Torque Terrain (TER) files",
"warning": "",
"support": "COMMUNITY",
"category": "Import-Export"
}
if... | 24.388889 | 75 | 0.606492 | bl_info = {
"name": "Torque Terrain (TER) format",
"author": "port",
"version": (0, 0, 1),
"blender": (2, 76, 0),
"location": "File > Import > Torque Terrain",
"description": "Import Torque Terrain (TER) files",
"warning": "",
"support": "COMMUNITY",
"category": "Import-Export"
}
if... | 0 | 0 | 0 | 489 | 0 | 266 | 0 | 301 | 226 |
580323e6bf604736f290f79f37999030d1319db0 | 4,988 | py | Python | pbtranscript/io/FastaSplitter.py | ylipacbio/pbtranscript | 6b4ef164f191ffd4201feb62b951d9eeac3315b6 | [
"BSD-3-Clause"
] | null | null | null | pbtranscript/io/FastaSplitter.py | ylipacbio/pbtranscript | 6b4ef164f191ffd4201feb62b951d9eeac3315b6 | [
"BSD-3-Clause"
] | null | null | null | pbtranscript/io/FastaSplitter.py | ylipacbio/pbtranscript | 6b4ef164f191ffd4201feb62b951d9eeac3315b6 | [
"BSD-3-Clause"
] | 1 | 2021-02-26T10:08:09.000Z | 2021-02-26T10:08:09.000Z | #!/usr/bin/env python
"""Define Class `FastaSplitter` which splits a fasta file into
smaller files each containing `reads_per_split` reads."""
import os.path as op
import sys
__all__ = ["FastaSplitter"]
def splitFasta(input_fasta, reads_per_split, out_dir, out_prefix, reads_in_first_split=None):
"""
Split in... | 38.076336 | 93 | 0.606255 | #!/usr/bin/env python
"""Define Class `FastaSplitter` which splits a fasta file into
smaller files each containing `reads_per_split` reads."""
import os
import os.path as op
import sys
from pbcore.io import FastaWriter
from pbtranscript.Utils import mkdir
from pbtranscript.io.ContigSetReaderWrapper import ContigSetR... | 0 | 0 | 0 | 2,676 | 0 | 0 | 0 | 67 | 114 |
6cba07bae1c733641e0fe0a6cd315a4aea0eb15b | 774 | py | Python | example/rpmd/analyze.py | AkihideHayashi/torchfes1 | 83f01525e6071ffd7a884c8e108f9c25ba2b009b | [
"MIT"
] | null | null | null | example/rpmd/analyze.py | AkihideHayashi/torchfes1 | 83f01525e6071ffd7a884c8e108f9c25ba2b009b | [
"MIT"
] | null | null | null | example/rpmd/analyze.py | AkihideHayashi/torchfes1 | 83f01525e6071ffd7a884c8e108f9c25ba2b009b | [
"MIT"
] | null | null | null | import torch
import numpy as np
import pickle
import matplotlib.pyplot as plt
n_ring = 16
hbar = 1.0
k = 1.0
kbt = 0.1
beta = 10.0
with open('tmp.pkl', 'rb') as f:
pos, pot, kin = pickle.load(f)
pot = torch.stack(pot).mean()
kin = torch.stack(kin).mean()
print(pot + kin)
pos = torch.stack(pos).flatten()
hist,... | 19.846154 | 57 | 0.583979 | import torch
import numpy as np
import pickle
import matplotlib.pyplot as plt
n_ring = 16
hbar = 1.0
k = 1.0
kbt = 0.1
beta = 10.0
def gound(x, hbar, m, k):
# print(hbar, m, k)
omega = torch.sqrt(k / m)
xi = torch.sqrt(m * omega / hbar) * x
return torch.exp(-0.5 * xi * xi)
with open('tmp.pkl', 'rb'... | 0 | 0 | 0 | 0 | 0 | 137 | 0 | 0 | 23 |
8b319fd9994d7accfa73ed62a9b79229a5d7de9c | 1,858 | py | Python | dataUtils/jupyter_notebook_header.py | jrwrigh/msResearchTools | bd380d01ed2089f21f422842d33b1fe03185341f | [
"MIT"
] | null | null | null | dataUtils/jupyter_notebook_header.py | jrwrigh/msResearchTools | bd380d01ed2089f21f422842d33b1fe03185341f | [
"MIT"
] | null | null | null | dataUtils/jupyter_notebook_header.py | jrwrigh/msResearchTools | bd380d01ed2089f21f422842d33b1fe03185341f | [
"MIT"
] | null | null | null | import matplotlib as mpl
import pandas as pd
from pathlib import Path
filename = Path('courantnumber_max-rfile.out')
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.serif'] = 'Computer Modern'
mpl.rcParams['font.size'] = 18
mpl.rcParams['mathtext.fontset'] = 'cm'
mpl.rcParams['text.usetex'] = True
def movin... | 31.491525 | 70 | 0.656082 | import matplotlib.pyplot as plt
import matplotlib as mpl
import pandas as pd
from pathlib import Path
import re
filename = Path('courantnumber_max-rfile.out')
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.serif'] = 'Computer Modern'
mpl.rcParams['font.size'] = 18
mpl.rcParams['mathtext.fontset'] = 'cm'
mpl... | 0 | 0 | 0 | 0 | 0 | 671 | 0 | -2 | 67 |
291b6346e5bbb09f384baa1936458310443c3995 | 4,495 | py | Python | djangosige/apps/cadastro/forms/inline_formsets.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | djangosige/apps/cadastro/forms/inline_formsets.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | djangosige/apps/cadastro/forms/inline_formsets.py | MateusMolina/lunoERP | 0880adb93b3a2d3169c6780efa60a229272f927a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.forms import inlineformset_factory
from djangosige.apps.cadastro.models import Pessoa, Endereco, Telefone, Email, Site, Banco, Documento
EnderecoFormSet = inlineformset_factory(
Pessoa, Endereco, form=EnderecoForm, extra=1, can_delete=True)
TelefoneFormSet ... | 34.05303 | 102 | 0.540378 | # -*- coding: utf-8 -*-
from django import forms
from django.forms import inlineformset_factory
from django.utils.translation import ugettext_lazy as _
from djangosige.apps.cadastro.models import Pessoa, Endereco, Telefone, Email, Site, Banco, Documento
class EnderecoForm(forms.ModelForm):
class Met... | 24 | 0 | 0 | 3,421 | 0 | 0 | 0 | 37 | 198 |
b52ea370fd0cde05b0b769d9e95b919ab16e556f | 959 | py | Python | dmengine/reporting/common.py | xflr6/dmengine | dccae3e404f31c9ecf4f74fa3616c71d47f01f93 | [
"MIT"
] | 2 | 2019-05-23T02:21:17.000Z | 2019-08-13T15:49:27.000Z | dmengine/reporting/common.py | xflr6/dmengine | dccae3e404f31c9ecf4f74fa3616c71d47f01f93 | [
"MIT"
] | null | null | null | dmengine/reporting/common.py | xflr6/dmengine | dccae3e404f31c9ecf4f74fa3616c71d47f01f93 | [
"MIT"
] | 3 | 2015-12-06T22:23:33.000Z | 2020-11-01T17:23:39.000Z | # common.py
TRANSLATE = [('->', '$\\rightarrow$'),
('...', '\\dots '),
('[', '$[$'),
(']', '$]$'),
('_', '\\_')]
| 29.96875 | 79 | 0.505735 | # common.py
TRANSLATE = [('->', '$\\rightarrow$'),
('...', '\\dots '),
('[', '$[$'),
(']', '$]$'),
('_', '\\_')]
def translate(string):
for old, new in TRANSLATE:
string = string.replace(old, new)
return string
def tabular(table, *, row_headings=T... | 0 | 0 | 0 | 0 | 0 | 745 | 0 | 0 | 46 |
f4e9207c57d04de1d95ebf97163f8eb8bb61cf66 | 1,496 | py | Python | src/data.py | maxscheijen/rt-live-netherlands | 1c3323c7a1a850d620882355a13e6123025d6de5 | [
"MIT"
] | null | null | null | src/data.py | maxscheijen/rt-live-netherlands | 1c3323c7a1a850d620882355a13e6123025d6de5 | [
"MIT"
] | 1 | 2021-01-06T00:56:37.000Z | 2021-01-06T00:56:37.000Z | src/data.py | maxscheijen/rt-live-netherlands | 1c3323c7a1a850d620882355a13e6123025d6de5 | [
"MIT"
] | null | null | null | import warnings
import numpy as np
import pandas as pd
warnings.filterwarnings("ignore")
url = "https://data.rivm.nl/covid-19/COVID-19_aantallen_gemeente_per_dag.csv"
def get_data(url: str = url) -> pd.DataFrame:
"""
Get data from url
url: url to csv
"""
return pd.read_csv(url, sep=";", parse_... | 23.015385 | 86 | 0.652406 | import warnings
import numpy as np
import pandas as pd
warnings.filterwarnings("ignore")
url = "https://data.rivm.nl/covid-19/COVID-19_aantallen_gemeente_per_dag.csv"
def get_data(url: str = url) -> pd.DataFrame:
"""
Get data from url
url: url to csv
"""
return pd.read_csv(url, sep=";", parse_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e95ee5f693fc0ff9904dadbbc49431f8d871ef47 | 891 | py | Python | text/11111111/symbols.py | zhangbo2008/fastSpeeck2_chinese_train | ae24c9a3ba40c731dd17a94ea258cf89c8eab8f5 | [
"MIT"
] | 1 | 2021-07-23T15:38:37.000Z | 2021-07-23T15:38:37.000Z | text/11111111/symbols.py | zhangbo2008/fastSpeeck2_chinese_train | ae24c9a3ba40c731dd17a94ea258cf89c8eab8f5 | [
"MIT"
] | null | null | null | text/11111111/symbols.py | zhangbo2008/fastSpeeck2_chinese_train | ae24c9a3ba40c731dd17a94ea258cf89c8eab8f5 | [
"MIT"
] | 2 | 2021-07-23T15:40:28.000Z | 2021-12-13T13:52:46.000Z | """ from https://github.com/keithito/tacotron """
print(1)
from text import cmudict, pinyin
_pad = "_"
_punctuation = "!'(),.:;? "
_special = "-"
_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
_silences = ["@sp", "@spn", "@sil"]
# Prepend "@" to ARPAbet symbols to ensure uniqueness (some are the ... | 21.731707 | 95 | 0.638608 | """ from https://github.com/keithito/tacotron """
print(1)
from text import cmudict, pinyin
_pad = "_"
_punctuation = "!'(),.:;? "
_special = "-"
_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
_silences = ["@sp", "@spn", "@sil"]
# Prepend "@" to ARPAbet symbols to ensure uniqueness (some are the ... | 147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
909abaee6d8fb908855b1385a303f328807626ab | 2,194 | py | Python | cog_genesis.py | q1qgames/pixray | 8bd73869af7979068aa7ff8402f5b3ab2b791255 | [
"MIT"
] | 468 | 2021-11-23T08:05:15.000Z | 2022-03-30T13:16:43.000Z | cog_genesis.py | q1qgames/pixray | 8bd73869af7979068aa7ff8402f5b3ab2b791255 | [
"MIT"
] | 53 | 2021-11-26T22:46:36.000Z | 2022-03-28T16:47:02.000Z | cog_genesis.py | q1qgames/pixray | 8bd73869af7979068aa7ff8402f5b3ab2b791255 | [
"MIT"
] | 67 | 2021-11-24T11:34:05.000Z | 2022-03-28T15:17:45.000Z | import yaml
| 37.186441 | 111 | 0.635825 | import cog
from pathlib import Path
import torch
import pixray
import yaml
import pathlib
import os
import yaml
from cogrun import create_temporary_copy
class GenesisPredictor(cog.Predictor):
def setup(self):
print("---> GenesisPredictor Setup")
# Define the input types for a prediction
@cog.inpu... | 0 | 1,861 | 0 | 156 | 0 | 0 | 0 | -35 | 200 |
71ba4a437f7c68dd4fcaa82ee93259a6ea9b5a40 | 782 | py | Python | src/pylero/build_test_results.py | yuxisun1217/pylero | 0210eb2243e02ab218f19a224e94eb63081f13e3 | [
"MIT"
] | null | null | null | src/pylero/build_test_results.py | yuxisun1217/pylero | 0210eb2243e02ab218f19a224e94eb63081f13e3 | [
"MIT"
] | null | null | null | src/pylero/build_test_results.py | yuxisun1217/pylero | 0210eb2243e02ab218f19a224e94eb63081f13e3 | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
| 32.583333 | 69 | 0.624041 | # -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
from pylero.base_polarion import BasePolarion
class BuildTestResults(BasePolarion):
"""Object to handle the Polarion WSDL tns2:BuildTestResults class
Attributes:
error_count... | 0 | 0 | 0 | 584 | 0 | 0 | 0 | 24 | 45 |
a45285d3b79448bb97c7ee717d4fafd499859f73 | 439 | py | Python | api/beershops/migrations/0005_beershopreview_score.py | min1995/CSW-capstone-team-1 | b17ced9f55ea85eebf3df510dfc747d75bff0a19 | [
"MIT"
] | null | null | null | api/beershops/migrations/0005_beershopreview_score.py | min1995/CSW-capstone-team-1 | b17ced9f55ea85eebf3df510dfc747d75bff0a19 | [
"MIT"
] | null | null | null | api/beershops/migrations/0005_beershopreview_score.py | min1995/CSW-capstone-team-1 | b17ced9f55ea85eebf3df510dfc747d75bff0a19 | [
"MIT"
] | 2 | 2020-04-13T11:24:51.000Z | 2020-04-13T11:24:51.000Z | # Generated by Django 2.1.2 on 2018-12-09 05:48
| 23.105263 | 99 | 0.571754 | # Generated by Django 2.1.2 on 2018-12-09 05:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('beershops', '0004_stamp_is_active'),
]
operations = [
migrations.AddField(
model_name='beershopreview',
name='score'... | 0 | 0 | 0 | 325 | 0 | 0 | 0 | 19 | 46 |
26f3dfa8fe650cbb4e860ce2348b4e38337ed786 | 525 | py | Python | Neural Network/SoftMax.py | CodingWillow/MachineLearning | 340c9d91d4178a2ab56921502bdcee73864a1a59 | [
"CC0-1.0"
] | null | null | null | Neural Network/SoftMax.py | CodingWillow/MachineLearning | 340c9d91d4178a2ab56921502bdcee73864a1a59 | [
"CC0-1.0"
] | null | null | null | Neural Network/SoftMax.py | CodingWillow/MachineLearning | 340c9d91d4178a2ab56921502bdcee73864a1a59 | [
"CC0-1.0"
] | null | null | null |
iris = [1.43, -0.4, 0.23]
softmax(iris, 3)
# array([0.684, 0.11 , 0.206])
| 21.875 | 48 | 0.678095 | import numpy as np
import math
iris = [1.43, -0.4, 0.23]
def softmax(arr, decimal_place=None):
# Calculate the softmaxed output
softmax_vals = []
denominator = sum(np.exp(iris))
# Get the softmax value of every input
for i in range(0, len(arr)):
softmaxed = np.exp(arr[i]) / denominator
softmax_val... | 0 | 0 | 0 | 0 | 0 | 393 | 0 | -13 | 68 |
fc1a33d66a31816b5aa2de30603c924b83006d17 | 1,373 | py | Python | annotation.py | Agrajak/simple_face_annotation | b5ef75834fbeaa80459c8861779e80e7a1620da6 | [
"Unlicense"
] | null | null | null | annotation.py | Agrajak/simple_face_annotation | b5ef75834fbeaa80459c8861779e80e7a1620da6 | [
"Unlicense"
] | null | null | null | annotation.py | Agrajak/simple_face_annotation | b5ef75834fbeaa80459c8861779e80e7a1620da6 | [
"Unlicense"
] | null | null | null | #-*- coding: utf-8 -*-
if __name__ == '__main__':
global startNum, name
load_images()
print('[increasing number]_[x]_[y]_[width]_[height]_[name].jpg will be annoated in file name!')
name = input('Name?')
startNum = int(input('Number? (1 is recommended)'))
print('===START===')
for idx, image in enume... | 26.921569 | 97 | 0.642389 | #-*- coding: utf-8 -*-
import os.path as p
import os
import cv2 as cv
import numpy as np
def load_images():
global imageList, input_dir, output_dir
imageList = []
input_dir = p.normpath(os.getcwd()+'/input')
if p.isdir(input_dir) == False:
print(input_dir, 'is not directory!')
exit(1)
for f in os.lis... | 0 | 0 | 0 | 0 | 0 | 813 | 0 | -22 | 133 |
50571297cdaf5618bbc441ac2e265a14d7b4d17d | 3,045 | py | Python | infra/bots/assets/mips64el_toolchain_linux/create.py | umberto-sonnino/skia | 7ecc54217889025b3e0c512f92fb84d20a26b9f7 | [
"BSD-3-Clause"
] | 1 | 2021-12-21T06:07:28.000Z | 2021-12-21T06:07:28.000Z | infra/bots/assets/mips64el_toolchain_linux/create.py | umberto-sonnino/skia | 7ecc54217889025b3e0c512f92fb84d20a26b9f7 | [
"BSD-3-Clause"
] | 1 | 2019-11-22T15:25:32.000Z | 2019-11-22T15:25:32.000Z | infra/bots/assets/mips64el_toolchain_linux/create.py | promoter/skia | bc5ed776134c60ae13d22cabc8e0f6aca0fdd422 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Create the asset."""
import os
import shutil
import subprocess
import utils
# This is basically all the deps of g++-multilib-mips64el-linux-gnuabi64 that
# ... | 32.741935 | 80 | 0.693268 | #!/usr/bin/env python
#
# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Create the asset."""
import argparse
import common
import os
import shutil
import subprocess
import utils
# This is basically all the deps of g++-multilib-... | 0 | 0 | 0 | 0 | 0 | 147 | 0 | -14 | 68 |
397da89ddfb6196ceb0c14240c418cbb9f018e6a | 11,122 | py | Python | codes/models/vsrgan_model.py | waitxxxx/TecoGAN-PyTorch | 15d87000ed35d2037317144f54fa0e3d64f34e2f | [
"Apache-2.0"
] | 125 | 2020-10-06T00:45:41.000Z | 2022-03-30T10:12:35.000Z | codes/models/vsrgan_model.py | waitxxxx/TecoGAN-PyTorch | 15d87000ed35d2037317144f54fa0e3d64f34e2f | [
"Apache-2.0"
] | 26 | 2021-01-02T19:38:59.000Z | 2022-03-29T06:26:36.000Z | codes/models/vsrgan_model.py | waitxxxx/TecoGAN-PyTorch | 15d87000ed35d2037317144f54fa0e3d64f34e2f | [
"Apache-2.0"
] | 34 | 2020-10-16T06:36:51.000Z | 2022-03-23T03:06:00.000Z | import torch.optim as optim
| 38.219931 | 87 | 0.586765 | from collections import OrderedDict
import torch
import torch.optim as optim
import torch.distributed as dist
from .vsr_model import VSRModel
from .networks import define_generator, define_discriminator
from .networks.vgg_nets import VGGFeatureExtractor
from .optim import define_criterion, define_lr_schedule
from uti... | 0 | 0 | 0 | 10,734 | 0 | 0 | 0 | 158 | 201 |
ffd580e28a4a933c827177dd70577d205fad915d | 236 | py | Python | adventure/admin.py | malcolmt/imaginary-maps-in-django | 932b5274c5fc9d574eb9fe916cd69d9409ae77e7 | [
"CC-BY-3.0"
] | 7 | 2015-03-25T16:57:01.000Z | 2018-11-08T20:30:50.000Z | adventure/admin.py | malcolmt/imaginary-maps-in-django | 932b5274c5fc9d574eb9fe916cd69d9409ae77e7 | [
"CC-BY-3.0"
] | null | null | null | adventure/admin.py | malcolmt/imaginary-maps-in-django | 932b5274c5fc9d574eb9fe916cd69d9409ae77e7 | [
"CC-BY-3.0"
] | null | null | null | from django.contrib.gis import admin
from adventure import models
from utils.admin_helper import AdminBase
admin.site.register([models.Track, models.PointOfInterest], AdminBase)
admin.site.register([models.Note, models.FeatureType])
| 26.222222 | 70 | 0.822034 | from django.contrib.gis import admin
from adventure import models
from utils.admin_helper import AdminBase
admin.site.register([models.Track, models.PointOfInterest], AdminBase)
admin.site.register([models.Note, models.FeatureType])
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c9031606bae872b6843e86549d545ba8d7dfbea | 1,898 | py | Python | common/grabjoo.py | nkrios/vulnx | 266f19c079e246759cb6e6748f2ec9c22249870c | [
"MIT"
] | 4 | 2019-05-31T02:47:23.000Z | 2020-11-12T16:49:24.000Z | modules/jooGrabber.py | ByXAlem/vulnx | 241233491a70c9dfff20dd982b31a51964136736 | [
"MIT"
] | null | null | null | modules/jooGrabber.py | ByXAlem/vulnx | 241233491a70c9dfff20dd982b31a51964136736 | [
"MIT"
] | null | null | null | """ Joomla Information Gathering """
# Find Joomla version and check it on exploit-db | 44.139535 | 93 | 0.586934 | """ Joomla Information Gathering """
from common.colors import red, green, bg, G, R, W, Y, G , good , bad , run , info , end , que
import re
import requests
# Find Joomla version and check it on exploit-db
def joo_version(url,headers):
endpoint = url + "/administrator/manifests/files" + '/joomla.xml'
re... | 0 | 0 | 0 | 0 | 0 | 1,625 | 0 | 54 | 134 |
92bc0eb30b0e51aa3c86c2a98e7785b3342c5f59 | 11,368 | py | Python | create_docs.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 4 | 2018-09-06T23:34:32.000Z | 2018-10-08T15:04:22.000Z | create_docs.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 1 | 2018-09-05T22:20:12.000Z | 2018-09-06T04:57:23.000Z | create_docs.py | guirava/rubrik-sdk-for-python | 10c58a28088a0b8e241af20ab9ecc802cec63246 | [
"MIT"
] | 3 | 2018-10-01T14:49:47.000Z | 2018-10-03T15:41:12.000Z | # Copyright 2020 Rubrik, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distri... | 32.573066 | 86 | 0.588142 | # Copyright 2020 Rubrik, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distri... | 0 | 0 | 0 | 0 | 0 | 8,484 | 0 | -22 | 296 |
75498d237d12999cb26b0c1eed4fb69b4a2d3d9c | 69 | py | Python | traduki/__init__.py | paylogic/traduki | 56474dbb07f62f4a8254a2d64935a52eea3cfd55 | [
"MIT"
] | 1 | 2020-03-27T10:29:24.000Z | 2020-03-27T10:29:24.000Z | traduki/__init__.py | paylogic/traduki | 56474dbb07f62f4a8254a2d64935a52eea3cfd55 | [
"MIT"
] | 10 | 2015-12-07T10:08:09.000Z | 2020-07-30T09:40:16.000Z | traduki/__init__.py | paylogic/traduki | 56474dbb07f62f4a8254a2d64935a52eea3cfd55 | [
"MIT"
] | 2 | 2015-09-04T14:10:08.000Z | 2018-03-04T18:09:21.000Z | from traduki.sqla import initialize
__all__ = (initialize.__name__)
| 17.25 | 35 | 0.811594 | from traduki.sqla import initialize
__all__ = (initialize.__name__)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c991c8254a6585d7033c604f2b9e288f85e59e01 | 7,062 | py | Python | checkio/Elementary/Even the last/test_even_last.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 39 | 2015-02-09T13:24:12.000Z | 2019-05-16T17:51:19.000Z | checkio/Elementary/Even the last/test_even_last.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 1 | 2019-10-21T16:18:14.000Z | 2019-10-21T16:18:14.000Z | checkio/Elementary/Even the last/test_even_last.py | KenMercusLai/checkio | c7702221e1bc0b0b30425859ffa6c09722949d65 | [
"MIT"
] | 22 | 2015-01-30T18:00:05.000Z | 2021-05-22T02:57:23.000Z | import unittest
if __name__ == "__main__": # pragma: no cover
unittest.main()
| 28.82449 | 87 | 0.225149 | import unittest
from even_last import checkio
class Tests(unittest.TestCase):
TESTS = {
"Basics": [
{"input": [0, 1, 2, 3, 4, 5], "answer": 30, "explanation": "5*(0+2+4)"},
{"input": [1, 3, 5], "answer": 30, "explanation": "5*(1+5)"},
{"input": [6], "answer": 36, "expl... | 0 | 0 | 0 | 6,922 | 0 | 0 | 0 | 8 | 46 |
1e2b4743906887f3a8180187741ed36e07034d2b | 2,496 | py | Python | spotify_API.py | antverdovsky/Upside-Down | 9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614 | [
"MIT"
] | null | null | null | spotify_API.py | antverdovsky/Upside-Down | 9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614 | [
"MIT"
] | null | null | null | spotify_API.py | antverdovsky/Upside-Down | 9fd8bb4b1b74f855cb2e7523eecb8bdc58f3e614 | [
"MIT"
] | null | null | null |
#test delete later
x = spotify_api('happy')
print(x.get_random_song()) | 32.415584 | 114 | 0.636218 | import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import json
import random
class spotify_api:
"""
Class that uses that spotify api to get a random song depending
on the mood of the user.
"""
def __init__(self, emotion):
"""
Constructor initialiazes spotify instance... | 0 | 0 | 0 | 2,300 | 0 | 0 | 0 | 5 | 111 |
8ea12fda0c22a2f3da315318602c99112c4c1339 | 26,568 | py | Python | plumbery/polishers/prepare.py | bernard357/plumbery | 4e7a69040f75ad21d35e3119dd9783e665fee122 | [
"Apache-2.0"
] | 2 | 2016-01-14T15:06:32.000Z | 2016-01-29T09:41:07.000Z | plumbery/polishers/prepare.py | bernard357/plumbery | 4e7a69040f75ad21d35e3119dd9783e665fee122 | [
"Apache-2.0"
] | 7 | 2015-11-26T22:28:45.000Z | 2016-02-10T22:35:56.000Z | plumbery/polishers/prepare.py | bernard357/plumbery | 4e7a69040f75ad21d35e3119dd9783e665fee122 | [
"Apache-2.0"
] | 8 | 2015-11-25T09:56:07.000Z | 2018-07-03T12:34:27.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 32.759556 | 82 | 0.508883 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 0 | 0 | 0 | 25,146 | 0 | 0 | 0 | 234 | 403 |
0f4b923a67aeac1f64ea04ad6c59c19171867f3c | 14,542 | py | Python | csmserver/utils.py | csm-aut/csm | b38843a6cdc19a406e6f709c53767bdaaa2fef96 | [
"Apache-2.0"
] | 16 | 2015-06-24T12:04:32.000Z | 2018-12-06T15:12:42.000Z | csmserver/utils.py | csm-aut/csm | b38843a6cdc19a406e6f709c53767bdaaa2fef96 | [
"Apache-2.0"
] | 80 | 2015-05-20T16:33:39.000Z | 2017-11-30T11:31:17.000Z | csmserver/utils.py | csm-aut/csm | b38843a6cdc19a406e6f709c53767bdaaa2fef96 | [
"Apache-2.0"
] | 18 | 2015-03-20T08:36:11.000Z | 2022-02-01T01:19:04.000Z | # =============================================================================
# Copyright (c) 2016, Cisco Systems, Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of sour... | 28.513725 | 107 | 0.625155 | # =============================================================================
# Copyright (c) 2016, Cisco Systems, Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of sour... | 0 | 0 | 0 | 0 | 0 | 3,487 | 0 | 0 | 450 |
2cf1842d0e84ca07dd287e245bf29b0630946a6b | 612 | py | Python | src/utils.py | orangeblock/fanorona | f2369ff28ecb9d1fa9368ea6db8467af91fceef7 | [
"MIT"
] | 1 | 2022-03-13T19:04:05.000Z | 2022-03-13T19:04:05.000Z | src/utils.py | orangeblock/fanorona | f2369ff28ecb9d1fa9368ea6db8467af91fceef7 | [
"MIT"
] | null | null | null | src/utils.py | orangeblock/fanorona | f2369ff28ecb9d1fa9368ea6db8467af91fceef7 | [
"MIT"
] | null | null | null | #
#
# Helper functions used by the modules.
#
#
def tsub(tup1, tup2):
""" Subtracts tup1 elements from tup2 elements. """
return (tup1[0]-tup2[0], tup1[1]-tup2[1])
def tadd(tup1, tup2):
""" Adds the elements of tup1 and tup2. """
return (tup1[0]+tup2[0], tup1[1]+tup2[1])
def tflip(tup):
"""
... | 23.538462 | 62 | 0.635621 | #
#
# Helper functions used by the modules.
#
#
import pygame
def load_image(path):
return pygame.image.load(path).convert_alpha()
def tsub(tup1, tup2):
""" Subtracts tup1 elements from tup2 elements. """
return (tup1[0]-tup2[0], tup1[1]-tup2[1])
def tadd(tup1, tup2):
""" Adds the elements of tup1... | 0 | 0 | 0 | 0 | 0 | 51 | 0 | -8 | 45 |
87ef01c9abbe3fe5d79a63c380a4332694918b26 | 2,205 | py | Python | assignments/12_grep/grep.py | reidloeffler/be434-fall-2021 | ee2337fd8ba7d3100ffd32ecc4513f95128f5589 | [
"MIT"
] | null | null | null | assignments/12_grep/grep.py | reidloeffler/be434-fall-2021 | ee2337fd8ba7d3100ffd32ecc4513f95128f5589 | [
"MIT"
] | null | null | null | assignments/12_grep/grep.py | reidloeffler/be434-fall-2021 | ee2337fd8ba7d3100ffd32ecc4513f95128f5589 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : reidloeffler <reidloeffler@localhost>
Date : 2021-11-23
Purpose: Assignment 12
"""
import argparse
import sys
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Pyt... | 29.4 | 79 | 0.47483 | #!/usr/bin/env python3
"""
Author : reidloeffler <reidloeffler@localhost>
Date : 2021-11-23
Purpose: Assignment 12
"""
import argparse
import sys
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Pyt... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
97a684c7e7e4e6379f8c0a25181535b568382da1 | 193 | py | Python | imc/urls.py | VictorArnaud/sdcurve | d5397b0193fb01e94dc93c9fad5e2db195754384 | [
"MIT"
] | null | null | null | imc/urls.py | VictorArnaud/sdcurve | d5397b0193fb01e94dc93c9fad5e2db195754384 | [
"MIT"
] | 8 | 2018-05-17T22:50:18.000Z | 2018-05-19T01:15:26.000Z | imc/urls.py | VWApplications/sdcurve | d5397b0193fb01e94dc93c9fad5e2db195754384 | [
"MIT"
] | 1 | 2018-06-27T00:18:21.000Z | 2018-06-27T00:18:21.000Z | from django.urls import path, include
from .api import urls
app_name = 'imc'
urlpatterns = [
path(
'api/growth-curve/imc/',
include(urls.imc_curves_patterns_api)
),
]
| 16.083333 | 45 | 0.647668 | from django.urls import path, include
from .api import urls
app_name = 'imc'
urlpatterns = [
path(
'api/growth-curve/imc/',
include(urls.imc_curves_patterns_api)
),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
99cc4d42fd4c95307a77961bf2f27eca2fbb122a | 739 | py | Python | spHNF_manip/calc_all_transforms.py | JohnEdChristensen/NiggliOptimize | e90b8c66e7b7e560c460502ee24991af775c625b | [
"MIT"
] | null | null | null | spHNF_manip/calc_all_transforms.py | JohnEdChristensen/NiggliOptimize | e90b8c66e7b7e560c460502ee24991af775c625b | [
"MIT"
] | null | null | null | spHNF_manip/calc_all_transforms.py | JohnEdChristensen/NiggliOptimize | e90b8c66e7b7e560c460502ee24991af775c625b | [
"MIT"
] | null | null | null | import ast
transformations = numpy.loadtxt("Data/AllDetOfOne.txt")
transformations = numpy.reshape(transformations, (len(transformations) / 3, 3, 3))
with open("Data/NiggliBasis.txt") as f:
lines = f.readlines()
num_of_lines = len(lines)
n_basis_file = open("Data/NiggliBasis.txt", "r")
for i in range(0, num_of_li... | 33.590909 | 87 | 0.729364 | import ast
from matrix_tools import *
transformations = numpy.loadtxt("Data/AllDetOfOne.txt")
transformations = numpy.reshape(transformations, (len(transformations) / 3, 3, 3))
with open("Data/NiggliBasis.txt") as f:
lines = f.readlines()
num_of_lines = len(lines)
n_basis_file = open("Data/NiggliBasis.txt", "r")
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
abbb35f8931618936185abc36350719d4849ac1a | 2,961 | py | Python | cam/train.py | 4the1appdevs/face_recognition | d69d387f6e7bca45eeb15107f67b9c305c6082d0 | [
"Apache-2.0"
] | 1 | 2021-04-01T05:37:54.000Z | 2021-04-01T05:37:54.000Z | cam/train.py | Jzhenli/face_recognition | d69d387f6e7bca45eeb15107f67b9c305c6082d0 | [
"Apache-2.0"
] | null | null | null | cam/train.py | Jzhenli/face_recognition | d69d387f6e7bca45eeb15107f67b9c305c6082d0 | [
"Apache-2.0"
] | 1 | 2021-04-02T00:49:55.000Z | 2021-04-02T00:49:55.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import dlib
from cam.models import dlib_model
FaceDetection = dlib.get_frontal_face_detector()
# face recognition
sp = dlib.shape_predictor(dlib_model.pose_predictor_model_location())
Description = dlib.face_recognition_model_v1(dlib_model.face_recognition_model_location())
... | 29.316832 | 99 | 0.630868 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import dlib
import cv2
import pickle
from sklearn.svm import SVC
from cam.models import dlib_model, classifier_model
FaceDetection = dlib.get_frontal_face_detector()
# face recognition
sp = dlib.shape_predictor(dlib_model.pose_predictor_model_location())
Description... | 0 | 0 | 0 | 0 | 0 | 2,396 | 0 | -7 | 203 |
a5d0e2e0c18088b5c4ecd858befa447ca26e7703 | 636 | py | Python | pyleecan/Methods/Geometry/SurfRing/discretize.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Geometry/SurfRing/discretize.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Geometry/SurfRing/discretize.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | # -*-- coding: utf-8 -*
def discretize(self, Npoint=-1):
"""Returns the discretize version of the SurfRing
Parameters
----------
self: SurfRing
A SurfRing object
Npoint : int
Number of point on each line (Default value = -1 => use the line default discretization)
Returns
--... | 26.5 | 96 | 0.646226 | # -*-- coding: utf-8 -*
def discretize(self, Npoint=-1):
"""Returns the discretize version of the SurfRing
Parameters
----------
self: SurfRing
A SurfRing object
Npoint : int
Number of point on each line (Default value = -1 => use the line default discretization)
Returns
--... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0adeda094a3b3e14de1fe2b8ae4ed7eebef7d414 | 30 | py | Python | python/testData/editing/enterInIncompleteDictComprehension.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/editing/enterInIncompleteDictComprehension.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/editing/enterInIncompleteDictComprehension.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | mapping = {foo: bar for<caret> | 30 | 30 | 0.7 | mapping = {foo: bar for<caret> | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2fcd393fe03719ac4941f395dc5b0c89f9117a50 | 255 | py | Python | authentication/__init__.py | samarth-ramesh/mtlauncher | 14f4c2b83a39a7775e6dd09ccf60f1382c4a8837 | [
"MIT"
] | null | null | null | authentication/__init__.py | samarth-ramesh/mtlauncher | 14f4c2b83a39a7775e6dd09ccf60f1382c4a8837 | [
"MIT"
] | 1 | 2021-02-13T03:06:31.000Z | 2021-02-13T03:08:33.000Z | authentication/__init__.py | samarth-ramesh/mtlauncher | 14f4c2b83a39a7775e6dd09ccf60f1382c4a8837 | [
"MIT"
] | null | null | null | # This is free software licensed under the MIT license.
# Copyright (c) 2021 Samarth Ramesh <samarthr1@outlook.com>
# You should have recived a copy of the MIT license with this file. In case you ahve not, visit https://github.com/samarth-ramsh/mtlaucher
| 63.75 | 138 | 0.776471 | # This is free software licensed under the MIT license.
# Copyright (c) 2021 Samarth Ramesh <samarthr1@outlook.com>
# You should have recived a copy of the MIT license with this file. In case you ahve not, visit https://github.com/samarth-ramsh/mtlaucher
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1ad324ea82c8cb5fa6537f0bf51cde0476701191 | 1,519 | py | Python | src/fts3rest/fts3rest/controllers/config/audit.py | Jar-win/fts-rest | 4db0880cf328037b8587b4d16741c40959b47ad2 | [
"Apache-2.0"
] | 1 | 2018-08-28T11:28:09.000Z | 2018-08-28T11:28:09.000Z | src/fts3rest/fts3rest/controllers/config/audit.py | Jar-win/fts-rest | 4db0880cf328037b8587b4d16741c40959b47ad2 | [
"Apache-2.0"
] | 13 | 2019-06-17T13:24:21.000Z | 2022-02-03T16:28:10.000Z | src/fts3rest/fts3rest/controllers/config/audit.py | Jar-win/fts-rest | 4db0880cf328037b8587b4d16741c40959b47ad2 | [
"Apache-2.0"
] | 3 | 2018-11-29T12:16:29.000Z | 2021-02-25T09:16:47.000Z | # Copyright notice:
# Copyright Members of the EMI Collaboration, 2013.
#
# See www.eu-emi.eu for details on the copyright holders
#
# 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... | 31.645833 | 96 | 0.734694 | # Copyright notice:
# Copyright Members of the EMI Collaboration, 2013.
#
# See www.eu-emi.eu for details on the copyright holders
#
# 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... | 0 | 294 | 0 | 83 | 0 | 0 | 0 | 122 | 182 |
26cf45bb73194a7608d68fc64d6c920a6bd483b1 | 978 | py | Python | migrations/versions/140_service_id_null_for_drafts.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 25 | 2015-01-14T10:45:13.000Z | 2021-05-26T17:21:41.000Z | migrations/versions/140_service_id_null_for_drafts.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 641 | 2015-01-15T11:10:50.000Z | 2021-06-15T22:18:42.000Z | migrations/versions/140_service_id_null_for_drafts.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 22 | 2015-06-13T15:37:45.000Z | 2021-08-19T23:40:49.000Z | """empty message
Revision ID: 140_service_id_null_for_drafts
Revises: 130_acknowledged_at_column
Create Date: 2015-06-22 10:42:37.274484
"""
# revision identifiers, used by Alembic.
revision = '140_service_id_null_for_drafts'
down_revision = '130_acknowledged_at_column'
| 31.548387 | 105 | 0.733129 | """empty message
Revision ID: 140_service_id_null_for_drafts
Revises: 130_acknowledged_at_column
Create Date: 2015-06-22 10:42:37.274484
"""
# revision identifiers, used by Alembic.
revision = '140_service_id_null_for_drafts'
down_revision = '130_acknowledged_at_column'
from alembic import op
import sqlalchemy as s... | 0 | 0 | 0 | 0 | 0 | 608 | 0 | 3 | 91 |
1281cb73ee6bbea74e71a5c2572b5adf9adab7cd | 739 | py | Python | setup.py | tolomea/django-lazy-services | 035220e4945673d6c08930c610149085b4918d82 | [
"BSD-3-Clause"
] | 5 | 2020-03-15T11:38:01.000Z | 2020-03-26T10:29:15.000Z | setup.py | tolomea/django-lazy-services | 035220e4945673d6c08930c610149085b4918d82 | [
"BSD-3-Clause"
] | null | null | null | setup.py | tolomea/django-lazy-services | 035220e4945673d6c08930c610149085b4918d82 | [
"BSD-3-Clause"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="django-lazy-services",
version="0.0.3",
author="Gordon Wrigley",
author_email="gordon.wrigley@gmail.com",
description="A helper for switching between test and production versions of a serv... | 32.130435 | 98 | 0.682003 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="django-lazy-services",
version="0.0.3",
author="Gordon Wrigley",
author_email="gordon.wrigley@gmail.com",
description="A helper for switching between test and production versions of a serv... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92c90e5172e89b98c3309bb01dc9787f15c24859 | 4,218 | py | Python | youtube_dl/extractor/vporn.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | 10 | 2020-05-29T03:20:03.000Z | 2022-03-29T01:05:20.000Z | youtube_dl/extractor/vporn.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | 5 | 2016-04-22T01:33:31.000Z | 2016-08-04T15:33:19.000Z | youtube_dl/extractor/vporn.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | 9 | 2020-05-29T03:21:02.000Z | 2021-04-14T03:26:05.000Z | from __future__ import unicode_literals
| 35.745763 | 102 | 0.484116 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
str_to_int,
)
class VpornIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?vporn\.com/[^/]+/(?P<display_id>[^/]+)/(?P<id>\d+)'
_TESTS = [
{
'url': 'http://... | 0 | 0 | 0 | 4,048 | 0 | 0 | 0 | 38 | 91 |
c9b0cf5e39fefd7fca75a9421c4d58198e0d6652 | 603 | py | Python | brain_games/games/prime.py | AndyRiddle/python-project-lvl1 | 1c435e136745e7917fc795c6952964f2598bd528 | [
"MIT"
] | 1 | 2020-08-19T09:34:04.000Z | 2020-08-19T09:34:04.000Z | brain_games/games/prime.py | AndyRiddle/python-project-lvl1 | 1c435e136745e7917fc795c6952964f2598bd528 | [
"MIT"
] | null | null | null | brain_games/games/prime.py | AndyRiddle/python-project-lvl1 | 1c435e136745e7917fc795c6952964f2598bd528 | [
"MIT"
] | null | null | null |
FIRST_DIVISOR = 2
LOWER_LIMIT = 1
UPPER_LIMIT = 100
RULE = 'Answer "yes" if given number is prime. Otherwise answer "no".'
| 22.333333 | 74 | 0.658375 | import math
import random
FIRST_DIVISOR = 2
LOWER_LIMIT = 1
UPPER_LIMIT = 100
RULE = 'Answer "yes" if given number is prime. Otherwise answer "no".'
def is_prime(number):
if number <= 1:
return False
for divisor in range(FIRST_DIVISOR, math.ceil(math.sqrt(number) + 1)):
if (number % divisor ... | 0 | 0 | 0 | 0 | 0 | 404 | 0 | -18 | 90 |
e81ab655be52669fbb2578b815e8485c6f3f35f1 | 415 | py | Python | app/chat/guest.py | B-T-S/Build | c6fae1fc44ec6a1ec3c2f01784ac2a1e67017ccc | [
"MIT"
] | 1 | 2020-09-06T11:21:43.000Z | 2020-09-06T11:21:43.000Z | app/chat/guest.py | B-T-S/Build | c6fae1fc44ec6a1ec3c2f01784ac2a1e67017ccc | [
"MIT"
] | null | null | null | app/chat/guest.py | B-T-S/Build | c6fae1fc44ec6a1ec3c2f01784ac2a1e67017ccc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint
blueprint = Blueprint('guest', __name__) | 29.642857 | 67 | 0.595181 | # -*- coding: utf-8 -*-
from flask import Blueprint, request,json
from pusher import pusher
blueprint = Blueprint('guest', __name__)
@blueprint.route('/new/guest', methods=['POST'])
def guestUser():
data = request.json
pusher.trigger(u'general-channel', u'new-guest-details', {
'name' : da... | 0 | 259 | 0 | 0 | 0 | 0 | 0 | 18 | 45 |
aa7cf363c6131e8a0473f50b108580a14025b2a8 | 1,654 | py | Python | ann2snn/validation.py | EthanChen916/STBP-train-and-compression | e16f8f058128e62489b29370b2653a6a453f9977 | [
"MIT"
] | null | null | null | ann2snn/validation.py | EthanChen916/STBP-train-and-compression | e16f8f058128e62489b29370b2653a6a453f9977 | [
"MIT"
] | null | null | null | ann2snn/validation.py | EthanChen916/STBP-train-and-compression | e16f8f058128e62489b29370b2653a6a453f9977 | [
"MIT"
] | null | null | null | import torch
from snn_layers import SpikeTensor
def validate_snn(net, test_loader, device, criterion, timesteps):
"""Perform validation for SNN"""
print("Performing validation for SNN")
# switch to evaluate mode
net.eval()
correct = 0
with torch.no_grad():
for data_test, target in t... | 29.017544 | 91 | 0.600967 | import torch
from snn_layers import SpikeTensor
def validate_snn(net, test_loader, device, criterion, timesteps):
"""Perform validation for SNN"""
print("Performing validation for SNN")
# switch to evaluate mode
net.eval()
correct = 0
with torch.no_grad():
for data_test, target in t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0188a89df84bf58d9d8d6543c45e1a24244d6f97 | 11,497 | py | Python | 2 - Modelling data with multiple channels/pixelCNN_RGB.py | Mind-the-Pineapple/Autoregressive-models | 34880e294b0999ddae77965f1f1b18528a7c5add | [
"MIT"
] | 14 | 2020-03-19T08:31:21.000Z | 2021-12-01T02:35:54.000Z | 2 - Modelling data with multiple channels/pixelCNN_RGB.py | Mind-the-Pineapple/Autoregressive-models | 34880e294b0999ddae77965f1f1b18528a7c5add | [
"MIT"
] | null | null | null | 2 - Modelling data with multiple channels/pixelCNN_RGB.py | Mind-the-Pineapple/Autoregressive-models | 34880e294b0999ddae77965f1f1b18528a7c5add | [
"MIT"
] | 2 | 2020-06-24T14:37:30.000Z | 2020-08-06T14:24:03.000Z |
"""Script to train pixelCNN on the CIFAR10 dataset."""
import random as rn
import time
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow import keras
def quantise(images, q_levels):
"""Quantise image into q levels."""
return (np.digitize(images, n... | 39.105442 | 116 | 0.550404 |
"""Script to train pixelCNN on the CIFAR10 dataset."""
import random as rn
import time
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow import keras
class MaskedConv2D(keras.layers.Layer):
"""Convolutional layers with masks.
Convolutional layers wi... | 0 | 582 | 0 | 4,390 | 0 | 315 | 0 | 0 | 95 |
6e49a8c30afaaac5b64d49fe7e81d8caeed4b991 | 6,607 | py | Python | back-end/main.py | Guilhermeslucas/SPaaS | 6e035f2a1f5fb9d00cf39cc40e002ddd51934b2b | [
"MIT"
] | 2 | 2018-11-12T14:33:06.000Z | 2018-12-18T13:06:24.000Z | back-end/main.py | Guilhermeslucas/SPaaS | 6e035f2a1f5fb9d00cf39cc40e002ddd51934b2b | [
"MIT"
] | 9 | 2018-10-06T20:04:42.000Z | 2018-11-22T20:03:56.000Z | back-end/main.py | Guilhermeslucas/SPaaS | 6e035f2a1f5fb9d00cf39cc40e002ddd51934b2b | [
"MIT"
] | 1 | 2019-03-08T22:50:38.000Z | 2019-03-08T22:50:38.000Z | from flask import Flask
import pymongo
from flask_cors import CORS
import os
from azure.storage.blob import BlockBlobService, PublicAccess
from celery import Celery
app = Flask(__name__)
CORS(app)
db_client = pymongo.MongoClient(os.environ['SPASS_CONNECTION_STRING']).spassDatabase
seismic_blob = BlockBlobS... | 33.035 | 111 | 0.670955 | from flask import Flask, request, Response
import json
import pymongo
from flask_cors import CORS
from bson.json_util import dumps, loads
import os
from azure.storage.blob import BlockBlobService, PublicAccess
from celery import Celery
import subprocess
import uuid
app = Flask(__name__)
CORS(app)
db_cli... | 0 | 4,624 | 0 | 0 | 0 | 392 | 0 | 13 | 596 |
ab0fad759a493e783d3852db4308501de6662b2d | 15,044 | py | Python | square/api/terminal_api.py | sdolemelipone/square-python-sdk | 4674d4867542ff5a32dc29a4bde483e62df065fb | [
"Apache-2.0"
] | 75 | 2019-08-15T14:40:47.000Z | 2022-03-05T16:24:00.000Z | square/api/terminal_api.py | sdolemelipone/square-python-sdk | 4674d4867542ff5a32dc29a4bde483e62df065fb | [
"Apache-2.0"
] | 13 | 2019-12-10T20:14:02.000Z | 2022-02-01T15:31:37.000Z | square/api/terminal_api.py | sdolemelipone/square-python-sdk | 4674d4867542ff5a32dc29a4bde483e62df065fb | [
"Apache-2.0"
] | 41 | 2019-10-20T20:53:45.000Z | 2022-02-10T02:18:18.000Z | # -*- coding: utf-8 -*-
| 36.692683 | 120 | 0.621377 | # -*- coding: utf-8 -*-
from square.api_helper import APIHelper
from square.http.api_response import ApiResponse
from square.api.base_api import BaseApi
from square.http.auth.o_auth_2 import OAuth2
class TerminalApi(BaseApi):
"""A Controller to access Endpoints in the square API."""
def __init__(self, conf... | 0 | 0 | 0 | 14,821 | 0 | 0 | 0 | 86 | 112 |
358f62b416eb45930a4be5bd90a2788a2d1554e9 | 2,160 | py | Python | examples/mnist_sem_seg/run.py | JanEGerken/s2cnn-1 | 3b1dd482eb624ebb85749eba0ef9b86a5b5974d4 | [
"MIT"
] | null | null | null | examples/mnist_sem_seg/run.py | JanEGerken/s2cnn-1 | 3b1dd482eb624ebb85749eba0ef9b86a5b5974d4 | [
"MIT"
] | null | null | null | examples/mnist_sem_seg/run.py | JanEGerken/s2cnn-1 | 3b1dd482eb624ebb85749eba0ef9b86a5b5974d4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == "__main__":
main()
| 29.189189 | 92 | 0.666667 | #!/usr/bin/env python3
import argparse
import subprocess
import sys
import os
from pathlib import Path
import get_paths
def env_prefix(env):
if env == "local":
return []
if env == "singularity":
container_path = os.path.join(get_paths.get_container_path(), "s2cnn_container.sif")
comm... | 0 | 0 | 0 | 0 | 0 | 1,878 | 0 | -35 | 249 |
f79d00c58224f22b00785b8f5c814a316e01b30a | 3,740 | py | Python | doc/examples/reconst_csd_parallel.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | 2 | 2018-07-25T14:04:20.000Z | 2021-02-10T07:10:10.000Z | doc/examples/reconst_csd_parallel.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | null | null | null | doc/examples/reconst_csd_parallel.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | 2 | 2018-07-24T21:20:54.000Z | 2018-08-27T04:08:24.000Z | """
=================================
Parallel reconstruction using CSD
=================================
This example shows how to use parallelism (multiprocessing) using
``peaks_from_model`` in order to speedup the signal reconstruction
process. For this example will we use the same initial steps
as we used in :ref:... | 32.521739 | 78 | 0.598396 | """
=================================
Parallel reconstruction using CSD
=================================
This example shows how to use parallelism (multiprocessing) using
``peaks_from_model`` in order to speedup the signal reconstruction
process. For this example will we use the same initial steps
as we used in :ref:... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6173f773053f1a24805015db8abbb52b80e23849 | 928 | py | Python | tests/factories/grading_info.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 38 | 2017-12-30T23:49:53.000Z | 2022-02-15T21:07:49.000Z | tests/factories/grading_info.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 1,733 | 2017-11-09T18:46:05.000Z | 2022-03-31T11:05:50.000Z | tests/factories/grading_info.py | mattdricker/lms | 40b8a04f95e69258c6c0d7ada543f4b527918ecf | [
"BSD-2-Clause"
] | 10 | 2018-07-11T17:12:46.000Z | 2022-01-07T20:00:23.000Z | from factory import Faker, make_factory
from factory.alchemy import SQLAlchemyModelFactory
from lms import models
from tests.factories.attributes import (H_DISPLAY_NAME, H_USERNAME, OAUTH_CONSUMER_KEY, RESOURCE_LINK_ID, USER_ID)
GradingInfo = make_factory(
models.GradingInfo,
FACTORY_CLASS=SQLAlchemyModelFact... | 29.935484 | 82 | 0.733836 | from factory import Faker, make_factory
from factory.alchemy import SQLAlchemyModelFactory
from lms import models
from tests.factories.attributes import (
H_DISPLAY_NAME,
H_USERNAME,
OAUTH_CONSUMER_KEY,
RESOURCE_LINK_ID,
USER_ID,
)
GradingInfo = make_factory(
models.GradingInfo,
FACTORY_CL... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0 |
203b5d7cef79488803785672ae48e1991457db3c | 1,303 | py | Python | main/migrations/0001_initial.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | main/migrations/0001_initial.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | main/migrations/0001_initial.py | ericrobskyhuntley/vialab.mit.edu | 1318d03b8eeb106c1662052e1caa53290e206ae7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-31 16:04
| 39.484848 | 114 | 0.586339 | # Generated by Django 3.0.4 on 2020-03-31 16:04
from django.db import migrations, models
import markdownx.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='About',
fields=[
('... | 0 | 0 | 0 | 1,165 | 0 | 0 | 0 | 21 | 68 |
0448038af809733f5db8c6f874a128989a16b87e | 10,675 | py | Python | platypush/backend/music/mopidy/__init__.py | BlackLight/platypush | 6c0a8bf2599eb4ab41a6122dbd988075d8b1a63a | [
"MIT"
] | 228 | 2018-01-30T11:17:09.000Z | 2022-03-24T11:22:26.000Z | platypush/backend/music/mopidy/__init__.py | BlackLight/platypush | 6c0a8bf2599eb4ab41a6122dbd988075d8b1a63a | [
"MIT"
] | 167 | 2017-12-11T19:35:38.000Z | 2022-03-27T14:45:30.000Z | platypush/backend/music/mopidy/__init__.py | BlackLight/runbullet | 8d26c8634d2677b4402f0a21b9ab8244b44640db | [
"MIT"
] | 16 | 2018-05-03T07:31:56.000Z | 2021-12-05T19:27:37.000Z |
# noinspection PyUnusedLocal
# vim:sw=4:ts=4:et:
| 39.684015 | 119 | 0.570023 | import json
import re
import threading
import websocket
from platypush.backend import Backend
from platypush.message.event.music import MusicPlayEvent, MusicPauseEvent, \
MusicStopEvent, NewPlayingTrackEvent, PlaylistChangeEvent, VolumeChangeEvent, \
PlaybackConsumeModeChangeEvent, PlaybackSingleModeChangeEve... | 0 | 986 | 0 | 9,183 | 0 | 0 | 0 | 297 | 156 |
d6f8dd459e5fd6d8fdc51891b0fab4d1937e47ab | 30 | py | Python | python/testData/completion/className/classReexportedThroughDunderAll/classReexportedThroughDunderAll.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/completion/className/classReexportedThroughDunderAll/classReexportedThroughDunderAll.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/className/classReexportedThroughDunderAll/classReexportedThroughDunderAll.after.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | from pkg import Foo
foo = Foo | 10 | 19 | 0.733333 | from pkg import Foo
foo = Foo | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0ad67e256b05e78950478a9ce24f27c1a1f5c5e5 | 720 | py | Python | mp4tag.py | mmjakub/desktop-stuff | ec3b4220b3090921891f9b4b0ddf1c6da3a20dab | [
"BSD-2-Clause"
] | null | null | null | mp4tag.py | mmjakub/desktop-stuff | ec3b4220b3090921891f9b4b0ddf1c6da3a20dab | [
"BSD-2-Clause"
] | null | null | null | mp4tag.py | mmjakub/desktop-stuff | ec3b4220b3090921891f9b4b0ddf1c6da3a20dab | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
from mutagen.mp4 import MP4, MP4Cover
from pathlib import Path
import re
album_dir = Path('.')
artist, album, date = re.fullmatch('(.+) - (.+) \((\d{4})\)', album_dir.resolve().name).groups()
tracks = [p.name for p in album_dir.glob('*.m4a')]
total_tracks = len(tracks)
with open('cover.jpg', '... | 27.692308 | 96 | 0.605556 | #!/usr/bin/env python3
from mutagen.mp4 import MP4, MP4Cover
from pathlib import Path
import re
album_dir = Path('.')
artist, album, date = re.fullmatch('(.+) - (.+) \((\d{4})\)', album_dir.resolve().name).groups()
tracks = [p.name for p in album_dir.glob('*.m4a')]
total_tracks = len(tracks)
with open('cover.jpg', '... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
644d5d5dc96d38b85972cfb4b75679f3a7a641f7 | 410 | py | Python | pos_cashbox/models/pos_cashbox_model.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | null | null | null | pos_cashbox/models/pos_cashbox_model.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | null | null | null | pos_cashbox/models/pos_cashbox_model.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | 1 | 2021-09-05T19:44:25.000Z | 2021-09-05T19:44:25.000Z | # Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# License MIT (https://opensource.org/licenses/MIT).
| 29.285714 | 77 | 0.743902 | # Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import fields, models
class PosSession(models.Model):
_inherit = "pos.session"
iface_cashdrawer = fields.Boolean(related="config_id.iface_cashdrawer")
proxy_ip = fi... | 0 | 0 | 0 | 223 | 0 | 0 | 0 | 10 | 45 |
9af52befc6ec4eb123ca08b40e732b8bb446c7c3 | 2,463 | py | Python | data/prepare_data.py | lucasxlu/HMTNet | b66d92d5e408b0525f535f38bdf08ff1749e0152 | [
"MIT"
] | 11 | 2019-10-28T07:47:03.000Z | 2021-11-18T08:22:34.000Z | data/prepare_data.py | lucasxlu/HMTNet | b66d92d5e408b0525f535f38bdf08ff1749e0152 | [
"MIT"
] | 1 | 2020-06-29T20:07:28.000Z | 2020-06-29T21:18:29.000Z | data/prepare_data.py | lucasxlu/HMTNet | b66d92d5e408b0525f535f38bdf08ff1749e0152 | [
"MIT"
] | 3 | 2021-08-28T00:17:17.000Z | 2021-12-22T12:56:08.000Z | """
script for data preprocessing
"""
import os
import shutil
from config.cfg import cfg
def process_gender_imgs():
"""
process gender images
:return:
"""
m_filenames, f_filenames = split_by_attribute('gender')
if not os.path.exists(os.path.join(cfg['gender_base_dir'], 'M')):
os.mak... | 31.177215 | 90 | 0.618352 | """
script for data preprocessing
"""
import os
import shutil
import pandas as pd
from config.cfg import cfg
def split_by_attribute(attr_name='gender'):
df = pd.read_csv(cfg['SCUT_FBP5500_csv'], index_col=False, header=None)
genders = df[0].tolist()
races = df[1].tolist()
files = df[2].tolist()
... | 0 | 0 | 0 | 0 | 0 | 1,045 | 0 | -2 | 46 |
37c098152dfb5fd04a8da8575d2352873809d9ab | 991 | py | Python | blingalytics/sources/static.py | ChowNow/blingalytics | a05c866bc0dc7c56b5106c71c12cf10b37c5bae5 | [
"MIT"
] | null | null | null | blingalytics/sources/static.py | ChowNow/blingalytics | a05c866bc0dc7c56b5106c71c12cf10b37c5bae5 | [
"MIT"
] | 1 | 2019-08-16T07:15:42.000Z | 2019-08-16T15:27:18.000Z | blingalytics/sources/static.py | ChowNow/blingalytics | a05c866bc0dc7c56b5106c71c12cf10b37c5bae5 | [
"MIT"
] | 1 | 2017-06-01T23:32:08.000Z | 2017-06-01T23:32:08.000Z | """
The static source provides a column for inserting static data. It's incredibly
simple and not terribly useful, but it can come in handy from time to time.
For example, if you want to fill a column with a 'coming soon...' message, you
could use a static column.
"""
from __future__ import absolute_import
| 31.967742 | 78 | 0.705348 | """
The static source provides a column for inserting static data. It's incredibly
simple and not terribly useful, but it can come in handy from time to time.
For example, if you want to fill a column with a 'coming soon...' message, you
could use a static column.
"""
from __future__ import absolute_import
from blinga... | 0 | 0 | 0 | 579 | 0 | 0 | 0 | 11 | 91 |
b32d535b247943db34704369d83a7c645c1e07b1 | 746 | py | Python | circuitPython/examples/video2/code.py | BRTSG-FOSS/pico-bteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | 1 | 2022-01-29T03:16:57.000Z | 2022-01-29T03:16:57.000Z | circuitPython/examples/video2/code.py | BRTSG-FOSS/pico-brteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | 15 | 2021-09-22T08:36:08.000Z | 2022-01-26T08:51:42.000Z | circuitPython/examples/video2/code.py | BRTSG-FOSS/pico-bteve | 1697b9a972ad5e9c2cecca6d560aa16cab725a61 | [
"MIT"
] | null | null | null | """ Video playback from sdcard/pico flash/eve's connected flash example """
import video2 as demo
if __name__ == "__main__":
sdcard, eve = eve_init()
eve.calibrate()
while 1:
demo.start(sdcard, eve) | 24.866667 | 75 | 0.604558 | """ Video playback from sdcard/pico flash/eve's connected flash example """
import sys
import video2 as demo
def eve_init():
if sys.implementation.name == "circuitpython":
from brteve.brt_eve_bt817_8 import BrtEve
from brteve.brt_eve_rp2040 import BrtEveRP2040
host = BrtEveRP2040()
... | 0 | 0 | 0 | 0 | 0 | 483 | 0 | -11 | 46 |
4f2e3401da1c93d4b3a0a002d02851918ea731e3 | 832 | py | Python | ckan/tests/cli/test_asset.py | Datatourisme/DATAtourisme.ma | 82c3f12ae93cd694fb8c064ea5d1eef4e3a3a21d | [
"Apache-2.0"
] | 2,805 | 2015-01-02T18:13:15.000Z | 2022-03-31T03:35:01.000Z | ckan/tests/cli/test_asset.py | Datatourisme/DATAtourisme.ma | 82c3f12ae93cd694fb8c064ea5d1eef4e3a3a21d | [
"Apache-2.0"
] | 3,801 | 2015-01-02T11:05:36.000Z | 2022-03-31T19:24:37.000Z | ckan/tests/cli/test_asset.py | cascaoSDC/ckan | 75a08caa7c688ce70229dfea7070cc667a15c5e8 | [
"BSD-3-Clause"
] | 1,689 | 2015-01-02T19:46:43.000Z | 2022-03-28T14:59:43.000Z | # -*- coding: utf-8 -*-
from ckan.cli.cli import ckan
def test_build_and_clean(cli, ckan_config, tmpdir, monkeypatch):
"""After build, there are some folders with assets inside
`%(ckan.storage_path)/webassets`. And after cleaning they must
be empty.
"""
monkeypatch.setitem(ckan_config, u'ckan.s... | 29.714286 | 71 | 0.653846 | # -*- coding: utf-8 -*-
from ckan.cli.cli import ckan
def test_build_and_clean(cli, ckan_config, tmpdir, monkeypatch):
"""After build, there are some folders with assets inside
`%(ckan.storage_path)/webassets`. And after cleaning they must
be empty.
"""
monkeypatch.setitem(ckan_config, u'ckan.s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5bed003e5482f72fe2beec7a82e961c08d33b7d2 | 341 | py | Python | pydantic_lib/intro_to_pydantic/ex7_export_model.py | Tomas-Tamantini/sexta-do-python | 267402cbf399a9afd1da57200a02d3a90122b452 | [
"MIT"
] | 5 | 2021-04-16T19:13:28.000Z | 2022-03-10T18:54:37.000Z | pydantic_lib/intro_to_pydantic/ex7_export_model.py | Tomas-Tamantini/sexta-do-python | 267402cbf399a9afd1da57200a02d3a90122b452 | [
"MIT"
] | null | null | null | pydantic_lib/intro_to_pydantic/ex7_export_model.py | Tomas-Tamantini/sexta-do-python | 267402cbf399a9afd1da57200a02d3a90122b452 | [
"MIT"
] | 4 | 2021-04-16T17:55:39.000Z | 2021-09-23T21:26:01.000Z | """Pydantic can convert a model instance to a dictionary, or json string"""
from pydantic_lib.utils import Movie
movie = Movie(title='Friday the 13th', year_of_release=1980, rating='R', box_office='U$93M')
movie_as_dict = movie.dict(exclude={'cast'})
movie_as_json = movie.json(exclude={'cast'})
print(movie_as_dict)
... | 31 | 92 | 0.759531 | """Pydantic can convert a model instance to a dictionary, or json string"""
from pydantic_lib.utils import Movie
movie = Movie(title='Friday the 13th', year_of_release=1980, rating='R', box_office='U$93M')
movie_as_dict = movie.dict(exclude={'cast'})
movie_as_json = movie.json(exclude={'cast'})
print(movie_as_dict)
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
601dbff2d5c2849834f7a05ff2f6cd6d0aa91cf8 | 897 | py | Python | 90/southpark.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | 1 | 2020-01-10T00:05:34.000Z | 2020-01-10T00:05:34.000Z | 90/southpark.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | null | null | null | 90/southpark.py | xtakacsx/bitesofpy | 91487cbf58af5eb58a0343ff2231a90c1032acb0 | [
"MIT"
] | null | null | null | from collections import Counter, defaultdict
import csv
import requests
CSV_URL = 'https://raw.githubusercontent.com/pybites/SouthParkData/master/by-season/Season-{}.csv' # noqa E501
def get_season_csv_file(season):
"""Receives a season int, and downloads loads in its
corresponding CSV_URL"""
with r... | 33.222222 | 111 | 0.701226 | from collections import Counter, defaultdict
import csv
import requests
CSV_URL = 'https://raw.githubusercontent.com/pybites/SouthParkData/master/by-season/Season-{}.csv' # noqa E501
def get_season_csv_file(season):
"""Receives a season int, and downloads loads in its
corresponding CSV_URL"""
with r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d50dc9952d8cdb6e9b7152c99d1da1db461c6b31 | 1,737 | py | Python | bert_e/server/server.py | tcarmet/bert-e | 8e0623d9a8c7bd111790d72307862167eca18a23 | [
"Apache-2.0"
] | null | null | null | bert_e/server/server.py | tcarmet/bert-e | 8e0623d9a8c7bd111790d72307862167eca18a23 | [
"Apache-2.0"
] | 35 | 2020-08-26T09:25:56.000Z | 2022-01-10T20:38:15.000Z | bert_e/server/server.py | tcarmet/bert-e | 8e0623d9a8c7bd111790d72307862167eca18a23 | [
"Apache-2.0"
] | 2 | 2021-08-17T15:56:50.000Z | 2022-01-05T19:26:48.000Z | #!/usr/bin/env python3
# Copyright 2016-2018 Scality
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 31.017857 | 78 | 0.668969 | #!/usr/bin/env python3
# Copyright 2016-2018 Scality
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7922f82221b4f47738ecfed252a3c00d4c6c30e6 | 3,489 | py | Python | topasgraphsim/topasgraphsim.py | sebasj13/topasgraphsim | 6027c7c098b319159c32108dd4ec63f4b44e8676 | [
"MIT"
] | 2 | 2022-02-19T13:02:48.000Z | 2022-03-21T20:04:17.000Z | topasgraphsim/topasgraphsim.py | sebasj13/topas-create-graphs | 5ccdbcbbe39461917cc015aa59805e518421431c | [
"MIT"
] | 37 | 2022-01-18T22:40:24.000Z | 2022-02-06T13:43:23.000Z | topasgraphsim/topasgraphsim.py | sebasj13/topasgraphsim | 6027c7c098b319159c32108dd4ec63f4b44e8676 | [
"MIT"
] | 1 | 2022-03-09T11:34:36.000Z | 2022-03-09T11:34:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 16 12:47:50 2021
@author: Sebastian Schfer
@institution: Martin-Luther-Universitt Halle-Wittenberg
@email: sebastian.schaefer@student.uni-halle.de
"""
import tkinter.ttk as ttk
if __name__ == "__main__":
topasgraphsim()
| 25.844444 | 68 | 0.549441 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 16 12:47:50 2021
@author: Sebastian Schäfer
@institution: Martin-Luther-Universität Halle-Wittenberg
@email: sebastian.schaefer@student.uni-halle.de
"""
import os
import sys
import tkinter as tk
import tkinter.ttk as ttk
from .src.classes.install_... | 4 | 0 | 0 | 0 | 0 | 2,925 | 0 | 85 | 179 |
73719213febb3aaf7912003f61382fc82b463bf1 | 1,664 | py | Python | address/migrations/0004_auto_20201108_1146.py | thapaliya19/covaplad | f3ff6db582165611d03dab6d227b4e5d81214d43 | [
"MIT"
] | 1 | 2021-02-03T15:09:45.000Z | 2021-02-03T15:09:45.000Z | address/migrations/0004_auto_20201108_1146.py | thapaliya19/covaplad | f3ff6db582165611d03dab6d227b4e5d81214d43 | [
"MIT"
] | 25 | 2021-03-08T07:01:32.000Z | 2022-03-31T09:05:30.000Z | address/migrations/0004_auto_20201108_1146.py | thapaliya19/covaplad | f3ff6db582165611d03dab6d227b4e5d81214d43 | [
"MIT"
] | 3 | 2021-02-22T15:06:56.000Z | 2021-08-03T13:00:00.000Z | # Generated by Django 3.1.3 on 2020-11-08 06:01
| 30.254545 | 85 | 0.564303 | # Generated by Django 3.1.3 on 2020-11-08 06:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("address", "0003_municipality_is_rural"),
]
operations = [
migrations.RemoveConstraint(
model_name="district",
name="... | 0 | 0 | 0 | 1,550 | 0 | 0 | 0 | 19 | 46 |
3077a019561fddea4b27a609f1e607d644b85a1b | 13,955 | py | Python | storage.py | rfelixmg/util | 899360382f8b097b0f3faf70e9b3e7abcdd0b255 | [
"Unlicense"
] | null | null | null | storage.py | rfelixmg/util | 899360382f8b097b0f3faf70e9b3e7abcdd0b255 | [
"Unlicense"
] | null | null | null | storage.py | rfelixmg/util | 899360382f8b097b0f3faf70e9b3e7abcdd0b255 | [
"Unlicense"
] | 1 | 2018-12-13T00:57:15.000Z | 2018-12-13T00:57:15.000Z | """
MIT License
Copyright (c) 2018 Rafael Felix Alves
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, pub... | 32.37819 | 102 | 0.529774 | """
MIT License
Copyright (c) 2018 Rafael Felix Alves
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, pub... | 0 | 780 | 0 | 11,530 | 0 | 174 | 0 | 16 | 249 |
831858eaab39b268c44947afc4f596f40497a05f | 2,993 | py | Python | tests/test_parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 4 | 2019-09-30T10:04:45.000Z | 2021-09-18T05:39:08.000Z | tests/test_parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 2 | 2021-07-30T02:13:56.000Z | 2021-07-30T02:14:02.000Z | tests/test_parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 1 | 2021-03-23T10:40:37.000Z | 2021-03-23T10:40:37.000Z |
invalid_messages = [
'No money',
'No currency 12.0 USD',
'3.0',
'+ no money' '+12 stuff',
'-12 items',
'# ',
]
| 28.778846 | 84 | 0.556632 | from decimal import Decimal
import pytest
from freezegun import freeze_time
from beanbot.errors import UserError
from beanbot.models import Action, Event
from beanbot.parser import parse_keyboard_data, parse_message
invalid_messages = [
'No money',
'No currency 12.0 USD',
'3.0',
'+ no money' '+12 st... | 0 | 2,589 | 0 | 0 | 0 | 0 | 0 | 84 | 180 |
38afc6f880db3b2e8eeff847100ff26ab8fb76fe | 4,210 | py | Python | qtstrap/extras/log_monitor/log_widget.py | qtstrap/qtstrap | 7b5ea2b1e3b9dd896aabf8edfb10c8dd3cf8782e | [
"MIT"
] | 2 | 2021-08-14T01:39:00.000Z | 2022-02-07T02:07:57.000Z | qtstrap/extras/log_monitor/log_widget.py | qtstrap/qtstrap | 7b5ea2b1e3b9dd896aabf8edfb10c8dd3cf8782e | [
"MIT"
] | null | null | null | qtstrap/extras/log_monitor/log_widget.py | qtstrap/qtstrap | 7b5ea2b1e3b9dd896aabf8edfb10c8dd3cf8782e | [
"MIT"
] | 1 | 2021-03-30T18:38:57.000Z | 2021-03-30T18:38:57.000Z |
try:
command_palette_available = True
except:
command_palette_available = False
| 33.412698 | 97 | 0.649406 | from qtstrap import *
from qtpy.QtSql import *
from .log_table_view import LogTableView
from .log_filter_controls import FilterControls
from .log_database_handler import DatabaseHandler, db_conn_name
try:
from command_palette import CommandPalette, Command
command_palette_available = True
except:
command_... | 0 | 0 | 0 | 3,793 | 0 | 0 | 0 | 120 | 205 |
17a1d486467729e659dd94dc29391166bc4ecda4 | 10,968 | py | Python | libs/Sessions.py | lavalamp-/RootTheBox | d35d203d7aa0abc6907804bc873068773ab7367e | [
"Apache-2.0"
] | 3 | 2016-04-21T11:21:21.000Z | 2019-02-22T17:19:47.000Z | libs/Sessions.py | lavalamp-/RootTheBox | d35d203d7aa0abc6907804bc873068773ab7367e | [
"Apache-2.0"
] | null | null | null | libs/Sessions.py | lavalamp-/RootTheBox | d35d203d7aa0abc6907804bc873068773ab7367e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
@author: Milan Cermak <milan.cermak@gmail.com>
@author: Moloch
This module implements sessions for Tornado using Memcached.
'''
import logging
from os import _exit
SID_SIZE = 16 # Size in bytes
try:
except ImportError:
logging.exception("Failed to import PyLibmc, no session supp... | 35.495146 | 79 | 0.609044 | # -*- coding: utf-8 -*-
'''
@author: Milan Cermak <milan.cermak@gmail.com>
@author: Moloch
This module implements sessions for Tornado using Memcached.
'''
import re
import os
import time
import base64
import logging
import datetime
import collections
import cPickle as pickle
from os import _exit
SID_SIZE = 16 #... | 0 | 1,001 | 0 | 9,440 | 0 | 0 | 0 | -55 | 242 |
451d831b5e9a7473c478029b3413a36c07c0dd71 | 2,263 | py | Python | run.py | awesome-archive/Auto_Record_Matsuri | 6f6bd01ff3be0893fa964a71b2d37ee2d2fe8b4d | [
"MIT"
] | null | null | null | run.py | awesome-archive/Auto_Record_Matsuri | 6f6bd01ff3be0893fa964a71b2d37ee2d2fe8b4d | [
"MIT"
] | null | null | null | run.py | awesome-archive/Auto_Record_Matsuri | 6f6bd01ff3be0893fa964a71b2d37ee2d2fe8b4d | [
"MIT"
] | null | null | null | from daemon import VideoUpload
if __name__ == '__main__':
uploader = VideoUpload()
uploader.start()
e = Event()
e.start()
| 27.597561 | 105 | 0.645161 | from multiprocessing import Process
from bilibili import Bilibili
from config import (enable_youtube, enable_twitcasting, enable_openrec, enable_mirrativ, enable_bilibili,
enable_youtube_temp, channel_id, userid, oprec_id, twitcasting_ld, bilibili_id)
from daemon import VideoUpload
from mirrativ im... | 0 | 606 | 0 | 1,079 | 0 | 0 | 0 | 259 | 178 |
6d5e0dafcbd006672ffcf9a50659e7c30f42ab70 | 358 | py | Python | dti/__init__.py | matchu/dti.py | e5c8617150fdc60baf934599346fca1da1476c50 | [
"MIT"
] | 1 | 2020-12-02T21:19:53.000Z | 2020-12-02T21:19:53.000Z | dti/__init__.py | matchu/dti.py | e5c8617150fdc60baf934599346fca1da1476c50 | [
"MIT"
] | 1 | 2021-11-17T15:31:22.000Z | 2021-11-17T15:31:22.000Z | dti/__init__.py | matchu/dti.py | e5c8617150fdc60baf934599346fca1da1476c50 | [
"MIT"
] | 2 | 2021-05-22T23:30:08.000Z | 2021-11-17T06:13:34.000Z | __title__ = "dti"
__author__ = "diceroll123"
__license__ = "MIT"
__copyright__ = "Copyright 2020-present diceroll123"
__version__ = "0.0.1a"
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 21.058824 | 61 | 0.765363 | __title__ = "dti"
__author__ = "diceroll123"
__license__ = "MIT"
__copyright__ = "Copyright 2020-present diceroll123"
__version__ = "0.0.1a"
import logging
from . import utils
from .client import Client
from .constants import *
from .enums import *
from .errors import *
from .models import *
logging.getLogger(__name... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 133 |
0444301fcbab4ba52a3b2936bda8ed9943f63d81 | 1,843 | py | Python | 2018/04.10/python/jya_gAPIclass.2.py | mksweetlife/study | 0786a4bd7901ac0d1aa5efdae5b755693eee5cd3 | [
"MIT"
] | 1 | 2017-10-24T08:19:15.000Z | 2017-10-24T08:19:15.000Z | 2018/04.10/python/jya_gAPIclass.2.py | mksweetlife/study | 0786a4bd7901ac0d1aa5efdae5b755693eee5cd3 | [
"MIT"
] | 31 | 2017-10-31T11:09:44.000Z | 2018-12-04T07:47:46.000Z | 2018/04.10/python/jya_gAPIclass.2.py | mksweetlife/study | 0786a4bd7901ac0d1aa5efdae5b755693eee5cd3 | [
"MIT"
] | 5 | 2017-10-26T02:13:08.000Z | 2018-07-05T04:58:47.000Z | import config
id = config.GAPI_CONFIG['client_id']
secret = config.GAPI_CONFIG['client_secret']
type = config.GAPI_CONFIG['grant_type']
# api1 = GapiClass()
# a = api1.getMember('planning_d')
# if __name__ == "__main__":
# print(a) | 31.775862 | 112 | 0.591427 | import requests, base64
import config
id = config.GAPI_CONFIG['client_id']
secret = config.GAPI_CONFIG['client_secret']
type = config.GAPI_CONFIG['grant_type']
class GapiClass:
def __init__(self, host='https://gapi.gabia.com'):
self.__host = host
self.__headers = self.__encoded_token()
sel... | 48 | 0 | 0 | 1,543 | 0 | 0 | 0 | 2 | 45 |
32ddf576131727d1fc5f3374155b0570267dcc41 | 5,441 | py | Python | news/views.py | kneeraazon01/webNewsNepal | bb337678e79293896b88b0ccea77b090b8e1075e | [
"Apache-2.0"
] | 1 | 2020-09-19T16:12:05.000Z | 2020-09-19T16:12:05.000Z | news/views.py | kneeraazon01/webNewsNepal | bb337678e79293896b88b0ccea77b090b8e1075e | [
"Apache-2.0"
] | null | null | null | news/views.py | kneeraazon01/webNewsNepal | bb337678e79293896b88b0ccea77b090b8e1075e | [
"Apache-2.0"
] | null | null | null |
# Class BASED VIEWS END HERE
| 26.158654 | 88 | 0.657783 | from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.core.mail import EmailMessage
from django.shortcuts import redirect, render
from .models import Newsle... | 0 | 723 | 0 | 1,348 | 0 | 2,192 | 0 | 470 | 658 |
2900fdcc2a19bb3cdd6e1db3310132f96d8aaea1 | 69,149 | py | Python | pysnmp-with-texts/A3COM-HUAWEI-EPON-DEVICE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/A3COM-HUAWEI-EPON-DEVICE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/A3COM-HUAWEI-EPON-DEVICE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-HUAWEI-EPON-DEVICE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-EPON-DEVICE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:04:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | 225.977124 | 6,436 | 0.793027 | #
# PySNMP MIB module A3COM-HUAWEI-EPON-DEVICE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-EPON-DEVICE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:04:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f31eaaa57631730d3f49236c6cc83a9f6627b02a | 1,016 | py | Python | Difficult/Montagnes_russes.py | Alumet/Codingame | 5cb2f779bb7107864283744f7bbac260f4641af6 | [
"MIT"
] | null | null | null | Difficult/Montagnes_russes.py | Alumet/Codingame | 5cb2f779bb7107864283744f7bbac260f4641af6 | [
"MIT"
] | null | null | null | Difficult/Montagnes_russes.py | Alumet/Codingame | 5cb2f779bb7107864283744f7bbac260f4641af6 | [
"MIT"
] | null | null | null | '''
Author Alumet 2015
https://github.com/Alumet/Codingame
'''
l, c, n = [int(i) for i in input().split()]
groupes=[]
loop_g=[]
loop_m=[]
looping=True
for i in range(n):
groupes.append([i,int(input())])
result=0
j=0
while j < c:
load=0
sub_group=[]
for i in range (n):
if l-l... | 18.814815 | 64 | 0.517717 | '''
Author Alumet 2015
https://github.com/Alumet/Codingame
'''
l, c, n = [int(i) for i in input().split()]
groupes=[]
loop_g=[]
loop_m=[]
looping=True
for i in range(n):
groupes.append([i,int(input())])
result=0
j=0
while j < c:
load=0
sub_group=[]
for i in range (n):
if l-l... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eeb4219d0f04bc0b7451e78ea7eee261864ab821 | 6,685 | py | Python | DRC/core/DRCCommonUtil.py | pingArnab/django-rest-commerce | d737a325cad8cf32efbdc6304b95df1b0cb92717 | [
"MIT"
] | null | null | null | DRC/core/DRCCommonUtil.py | pingArnab/django-rest-commerce | d737a325cad8cf32efbdc6304b95df1b0cb92717 | [
"MIT"
] | 1 | 2021-11-14T09:14:54.000Z | 2021-11-14T17:07:12.000Z | DRC/core/DRCCommonUtil.py | pingPoltergeist/django-rest-commerce | d737a325cad8cf32efbdc6304b95df1b0cb92717 | [
"MIT"
] | 1 | 2022-02-28T10:54:29.000Z | 2022-02-28T10:54:29.000Z | import logging
from django.core.mail import EmailMultiAlternatives
from DRC.settings import PROJECT_NAME
__module_name = f'{PROJECT_NAME}.' + __name__ + '::'
logger = logging.getLogger(__module_name)
# Mailer Client
def sendmail(mailData=None):
"""
template = loader.get_template('mail-view/password-... | 30.112613 | 113 | 0.572326 | import logging
import random
import secrets
import string
import uuid
import hashlib
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.http import Http404
from django.shortcuts import redirect
from django.core.mail import send_mail, EmailMultiAlternatives
from DRC.set... | 0 | 3,562 | 0 | 357 | 0 | 209 | 0 | 42 | 497 |
c5ad80ffda2f5443beefcae452c60f3ef14f88fe | 429 | py | Python | kratos/apps/log/migrations/0011_log_envs.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | 1 | 2020-11-30T09:53:40.000Z | 2020-11-30T09:53:40.000Z | kratos/apps/log/migrations/0011_log_envs.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | kratos/apps/log/migrations/0011_log_envs.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-11-02 16:58
| 21.45 | 85 | 0.620047 | # Generated by Django 3.0.5 on 2020-11-02 16:58
from django.db import migrations
import django_mysql.models
class Migration(migrations.Migration):
dependencies = [
('log', '0010_auto_20201102_1401'),
]
operations = [
migrations.AddField(
model_name='log',
name='e... | 0 | 0 | 0 | 296 | 0 | 0 | 0 | 16 | 68 |
4a8c5462309aa52617edcd542edbe0abc2ac8724 | 3,175 | py | Python | src/dnp/slope2.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | 1 | 2016-07-19T08:50:54.000Z | 2016-07-19T08:50:54.000Z | src/dnp/slope2.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | null | null | null | src/dnp/slope2.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | null | null | null | import sys
seismicDir = "/data/seis/tpd/csm/oldslices/"
ffile = "tp73"
s1 = Sampling(251,0.004,0.500)
s2 = Sampling(357,0.025,0.000)
n1,n2 = s1.count,s2.count
fmin,fmax = -1.0,1.0
emin,emax = -1.0,1.0
pmin,pmax = -0.5,0.5
#############################################################################
# graphics
gray ... | 26.458333 | 77 | 0.648504 | import sys
from java.awt import *
from java.io import *
from java.lang import *
from javax.swing import *
from edu.mines.jtk.awt import *
from edu.mines.jtk.dsp import *
from edu.mines.jtk.io import *
from edu.mines.jtk.mosaic import *
from edu.mines.jtk.util import *
from edu.mines.jtk.util.ArrayMath import *
from ... | 0 | 0 | 0 | 93 | 0 | 1,958 | 0 | 66 | 472 |
bc64f241bc71e5f4032c8e8b932d2286251fc81c | 10,145 | py | Python | server.py | ernitron/temperature-server | 7b212d4d031836cbc829d7195ce51cb85031060b | [
"MIT"
] | 4 | 2016-06-02T21:08:27.000Z | 2017-04-26T17:02:14.000Z | server.py | ernitron/temperature-server | 7b212d4d031836cbc829d7195ce51cb85031060b | [
"MIT"
] | 1 | 2016-05-19T12:38:48.000Z | 2016-05-29T17:53:33.000Z | server.py | ernitron/temperature-server | 7b212d4d031836cbc829d7195ce51cb85031060b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A temperature/pressure/humidity server application
'''
# Imports
import os
#from __future__ import division
import cherrypy
from socket import getfqdn as gethostname
# Jinja2 templating
from jinja2 import Environment, FileSystemLoader
# My libraries
# Globals
vers... | 32.620579 | 129 | 0.593593 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A temperature/pressure/humidity server application
'''
# Imports
import os
#from __future__ import division
import sys
import cherrypy
from socket import getfqdn as gethostname
from datetime import datetime
# Jinja2 templating
from jinja2 import Environment, FileSys... | 0 | 5,177 | 0 | -10 | 0 | 1,222 | 0 | 86 | 669 |
b0ae40a8176ebb7c330fafa8ef59191624cc0c9a | 4,182 | py | Python | fritzconnection/core/logger.py | bufemc/fritzconnection | 9f1eb3394a2740392230083bde3a6afed1b96687 | [
"MIT"
] | null | null | null | fritzconnection/core/logger.py | bufemc/fritzconnection | 9f1eb3394a2740392230083bde3a6afed1b96687 | [
"MIT"
] | null | null | null | fritzconnection/core/logger.py | bufemc/fritzconnection | 9f1eb3394a2740392230083bde3a6afed1b96687 | [
"MIT"
] | null | null | null | """
Logging interface for the fritzconnection library.
On module level an instance of `FritzLogger` gets created as `fritzlogger`
that can get imported by:
>>> from fritzconnection.core.logger import fritzlogger
The fritzlogger instance is preset to report on DEBUG level, the default
handler is the NullHandler. To d... | 32.169231 | 74 | 0.657341 | """
Logging interface for the fritzconnection library.
On module level an instance of `FritzLogger` gets created as `fritzlogger`
that can get imported by:
>>> from fritzconnection.core.logger import fritzlogger
The fritzlogger instance is preset to report on DEBUG level, the default
handler is the NullHandler. To d... | 0 | 0 | 0 | 2,996 | 0 | 0 | 0 | -7 | 46 |
23ae67d3bbd3324973fbb5fe0084917a06072d45 | 722 | py | Python | exercises/ex6_calculate_square_root_C_D_H.py | ivanlmj/SnakeEggs | 540843dcf6fba4b3fe0d6d57dd19654f33cccb74 | [
"MIT"
] | 1 | 2019-05-20T18:19:45.000Z | 2019-05-20T18:19:45.000Z | exercises/ex6_calculate_square_root_C_D_H.py | ivanlmj/SnakeEggs | 540843dcf6fba4b3fe0d6d57dd19654f33cccb74 | [
"MIT"
] | null | null | null | exercises/ex6_calculate_square_root_C_D_H.py | ivanlmj/SnakeEggs | 540843dcf6fba4b3fe0d6d57dd19654f33cccb74 | [
"MIT"
] | null | null | null | """ Write a program that calculates and prints the value according
to the given formula:
Q = Square root of [(2 * C * D)/H]
Following are the fixed values of C and H:
C is 50.
H is 30.
D is the variable whose values should be input to your program in a
comma-separated sequence.... | 21.235294 | 72 | 0.619114 | """ Write a program that calculates and prints the value according
to the given formula:
Q = Square root of [(2 * C * D)/H]
Following are the fixed values of C and H:
C is 50.
H is 30.
D is the variable whose values should be input to your program in a
comma-separated sequence.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51b9fe8e4d203a790dfece90649cf230af652ce4 | 932 | py | Python | dataloader/data_preprocessing/helpers/tikz_standalone.py | ifnspaml/IFN_Dataloader | 864a10f0dfea27cbbe46f18cf3c9958768f3c0be | [
"MIT"
] | 6 | 2020-09-18T06:25:20.000Z | 2021-11-16T22:33:37.000Z | dataloader/data_preprocessing/helpers/tikz_standalone.py | ifnspaml/IFN_Dataloader | 864a10f0dfea27cbbe46f18cf3c9958768f3c0be | [
"MIT"
] | null | null | null | dataloader/data_preprocessing/helpers/tikz_standalone.py | ifnspaml/IFN_Dataloader | 864a10f0dfea27cbbe46f18cf3c9958768f3c0be | [
"MIT"
] | 1 | 2021-03-05T08:36:49.000Z | 2021-03-05T08:36:49.000Z | # this routine creates a standalone tikz image from the code of a single tikz image | 38.833333 | 83 | 0.592275 | # this routine creates a standalone tikz image from the code of a single tikz image
def create_standalone(filename):
with open(filename, "r") as f:
lines = f.readlines()
f.close()
with open(filename, "w") as f:
f.write("\\documentclass[convert={convertexe={magick.exe}}]{standalone}\n")
... | 0 | 0 | 0 | 0 | 0 | 826 | 0 | 0 | 23 |
530dad2631c0460de656c8f416927e6c8960bedf | 20,643 | py | Python | nibabel/tests/test_nifti1.py | satra/nibabel | b04fe7c29e4c097edc9d519fccf1c804969232f1 | [
"BSD-3-Clause"
] | 3 | 2017-01-10T17:25:50.000Z | 2021-02-23T04:36:35.000Z | nibabel/tests/test_nifti1.py | satra/nibabel | b04fe7c29e4c097edc9d519fccf1c804969232f1 | [
"BSD-3-Clause"
] | 9 | 2015-10-27T15:13:37.000Z | 2016-08-15T17:18:35.000Z | nibabel/tests/test_nifti1.py | satra/nibabel | b04fe7c29e4c097edc9d519fccf1c804969232f1 | [
"BSD-3-Clause"
] | 4 | 2015-07-21T20:27:15.000Z | 2020-04-17T14:23:02.000Z | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... | 37.46461 | 78 | 0.624619 | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... | 0 | 9,396 | 0 | 3,916 | 1,710 | 3,527 | 0 | 420 | 708 |
59dd16e6d73195cb4a3d42e0eee92b7612e8c1cf | 992 | py | Python | research/cv/ArtTrack/src/dataset/mpii.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ArtTrack/src/dataset/mpii.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ArtTrack/src/dataset/mpii.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.740741 | 92 | 0.645161 | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 | 0 | 0 | 259 | 0 | 0 | 0 | 19 | 46 |
f01018039956a1980a5543d0afe369feca9ebc10 | 4,751 | py | Python | python/cudf/cudf/tests/test_resampling.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 239 | 2018-10-10T09:55:22.000Z | 2018-10-28T20:47:23.000Z | python/cudf/cudf/tests/test_resampling.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 25 | 2018-10-10T14:46:32.000Z | 2018-10-28T22:16:14.000Z | python/cudf/cudf/tests/test_resampling.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 19 | 2018-10-10T12:42:51.000Z | 2018-10-26T16:33:22.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
| 29.509317 | 76 | 0.608083 | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
import numpy as np
import pandas as pd
import pytest
import cudf
from cudf.testing._utils import assert_eq
def assert_resample_results_equal(lhs, rhs, **kwargs):
assert_eq(
lhs.sort_index(),
rhs.sort_index(),
check_dtype=False,
check... | 0 | 2,287 | 0 | 0 | 0 | 2,044 | 0 | -3 | 365 |
7775bd45b7ab18ca4b47eafa4d2b185cacc33198 | 1,808 | py | Python | examples/segmentation/segmentor.py | rriyaldhi/flexinfer | 523b9bf49226001c0477a3635ffe9071387ae788 | [
"Apache-2.0"
] | 81 | 2020-06-17T07:46:19.000Z | 2022-03-29T23:29:33.000Z | examples/segmentation/segmentor.py | rriyaldhi/flexinfer | 523b9bf49226001c0477a3635ffe9071387ae788 | [
"Apache-2.0"
] | 1 | 2020-07-02T08:14:49.000Z | 2020-07-20T11:34:30.000Z | examples/segmentation/segmentor.py | rriyaldhi/flexinfer | 523b9bf49226001c0477a3635ffe9071387ae788 | [
"Apache-2.0"
] | 20 | 2020-06-29T01:30:44.000Z | 2022-03-23T09:47:41.000Z | import argparse
import sys
sys.path.insert(0, '../../')
PALETTE = [[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128],
[128, 0, 128], [0, 128, 128], [128, 128, 128], [64, 0, 0],
[192, 0, 0], [64, 128, 0], [192, 128, 0], [64, 0, 128],
[192, 0, 128], [64, 128, 128], [192, 1... | 26.985075 | 79 | 0.627212 | import argparse
import sys
sys.path.insert(0, '../../')
import cv2
import numpy as np
from flexinfer.misc import Config, set_device
from flexinfer.preprocess import build_preprocess
from flexinfer.model import build_model
from flexinfer.postprocess import build_postprocess
PALETTE = [[0, 0, 0], [128, 0, 0], [0, 128,... | 0 | 0 | 0 | 0 | 0 | 857 | 0 | 86 | 179 |
ed34d3c4bb663b4131499d9255d90043cd8486d9 | 14,686 | py | Python | tests.py | subwavesignals/hb_project | a3c19b480c43f962b7f429a856f9960d62389ca9 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | tests.py | subwavesignals/hb_project | a3c19b480c43f962b7f429a856f9960d62389ca9 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | tests.py | subwavesignals/hb_project | a3c19b480c43f962b7f429a856f9960d62389ca9 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | import unittest
if __name__ == "__main__":
unittest.main() | 43.321534 | 91 | 0.634209 | import unittest
from server import app
from model import (db, connect_to_db, example_data, User, Review, CriticReview,
Game, CurrentGame, Cover, Franchise, Genre, Developer,
Platform, Screenshot)
from correlation import pearson
import pull_data
import datetime
import gen_fake_dat... | 0 | 0 | 0 | 14,220 | 0 | 0 | 0 | 172 | 226 |
eaa71e17a2294d8c7c581a1cd6e7dc14fff64008 | 526 | py | Python | iota/exceptions.py | plenarius/iota.lib.py | ac6167dadb8b60a64b33eeb9db755be32c7cef12 | [
"MIT"
] | 62 | 2017-12-20T20:22:15.000Z | 2020-08-11T06:07:31.000Z | iota/exceptions.py | plenarius/iota.lib.py | ac6167dadb8b60a64b33eeb9db755be32c7cef12 | [
"MIT"
] | null | null | null | iota/exceptions.py | plenarius/iota.lib.py | ac6167dadb8b60a64b33eeb9db755be32c7cef12 | [
"MIT"
] | 20 | 2017-12-20T20:36:13.000Z | 2021-06-12T13:55:30.000Z | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
def with_context(exc, context):
# type: (Exception, dict) -> Exception
"""
Attaches a ``context`` value to an Exception.
Before::
exc = Exception('Frog blast the vent core!')
exc.context = { ... }... | 20.230769 | 72 | 0.644487 | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
def with_context(exc, context):
# type: (Exception, dict) -> Exception
"""
Attaches a ``context`` value to an Exception.
Before::
exc = Exception('Frog blast the vent core!')
exc.context = { ... }... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b9eba98ef0f631c7b67f1c52fe69e69b037a827 | 241 | py | Python | configserver/web/templates.py | jovanbrakus/cherrypy-example | d3eaa00d99816366e2c09699ebeba0bb3b102aaa | [
"BSD-3-Clause"
] | 13 | 2015-02-17T07:04:16.000Z | 2020-09-23T03:50:37.000Z | configserver/web/templates.py | Alex237/CherryXSS | 4d8d2127240ba0f591f97a053ea2543bc3579273 | [
"BSD-3-Clause"
] | null | null | null | configserver/web/templates.py | Alex237/CherryXSS | 4d8d2127240ba0f591f97a053ea2543bc3579273 | [
"BSD-3-Clause"
] | 5 | 2015-05-28T18:42:13.000Z | 2020-03-21T02:30:09.000Z | __author__ = 'Jovan Brakus <jovan@brakus.rs>'
__contact__ = 'jovan@brakus.rs'
__date__ = '31 May 2012'
from jinja2 import Environment, PackageLoader
jinja_env = Environment(loader=PackageLoader('configserver', 'static/templates')) | 40.166667 | 81 | 0.751037 | __author__ = 'Jovan Brakus <jovan@brakus.rs>'
__contact__ = 'jovan@brakus.rs'
__date__ = '31 May 2012'
from jinja2 import Environment, PackageLoader
jinja_env = Environment(loader=PackageLoader('configserver', 'static/templates')) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b72abe75e3722a3483ad2f4e12d86cf8fd2a32d6 | 4,090 | py | Python | main.py | TaigaOsguthorpe/PySide2-Multiple-Windows | 2d2574288f290f50fcf7f908103ebe1d525395c9 | [
"CC0-1.0"
] | null | null | null | main.py | TaigaOsguthorpe/PySide2-Multiple-Windows | 2d2574288f290f50fcf7f908103ebe1d525395c9 | [
"CC0-1.0"
] | null | null | null | main.py | TaigaOsguthorpe/PySide2-Multiple-Windows | 2d2574288f290f50fcf7f908103ebe1d525395c9 | [
"CC0-1.0"
] | null | null | null | import sys
from PySide2.QtWidgets import QApplication
if __name__ == "__main__":
# Run the aplication
app = QApplication(sys.argv)
window = MainWindow()
window.show()
# Start the main loop of the program
sys.exit(app.exec_())
| 36.19469 | 156 | 0.647433 | import sys
from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtCore import QFile
from PySide2 import QtCore
from PySide2.QtGui import QPixmap
from ui_files.main_gui import Ui_MainWindow
from ui_files.image_window_gui import Ui_MainWindow as Ui_ImageWindow
from pathlib import Path
class MainWindow(Q... | 0 | 0 | 0 | 3,540 | 0 | 0 | 0 | 114 | 178 |
5ebca8ed469afbba8c886b1cccfa304ab8b0ddb7 | 4,886 | py | Python | preprocessing/create_labels.py | Jack-0-0/Detecting-and-Classifying-Animal-Calls | 7632216c389b579ef048823247c835cc5942d6df | [
"MIT"
] | null | null | null | preprocessing/create_labels.py | Jack-0-0/Detecting-and-Classifying-Animal-Calls | 7632216c389b579ef048823247c835cc5942d6df | [
"MIT"
] | null | null | null | preprocessing/create_labels.py | Jack-0-0/Detecting-and-Classifying-Animal-Calls | 7632216c389b579ef048823247c835cc5942d6df | [
"MIT"
] | 1 | 2019-10-24T21:19:43.000Z | 2019-10-24T21:19:43.000Z | import numpy as np
import pandas as pd
import glob
import sys
import os
def find_label(file, path):
"""Find audit label relating to spectrogram file.
# Arguments
file: spectrogram file.
path: spectrogram directory.
# Returns
audit label file path relating to spectrogram file.
If the ... | 35.151079 | 113 | 0.576955 | import numpy as np
import pandas as pd
import glob
import sys
import os
def find_label(file, path):
"""Find audit label relating to spectrogram file.
# Arguments
file: spectrogram file.
path: spectrogram directory.
# Returns
audit label file path relating to spectrogram file.
If the ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5cf1c1a592e9a11f76ac8c1ab93efa37046a37fb | 1,654 | py | Python | sight.py | userElaina/small-tools | 314713a646b48e7f49179b8f5f51c5eac3f28db1 | [
"MIT"
] | 2 | 2021-03-19T08:34:01.000Z | 2021-03-26T11:31:40.000Z | sight.py | userElaina/small-tools | 314713a646b48e7f49179b8f5f51c5eac3f28db1 | [
"MIT"
] | null | null | null | sight.py | userElaina/small-tools | 314713a646b48e7f49179b8f5f51c5eac3f28db1 | [
"MIT"
] | null | null | null | import sys
l=sys.argv[1:]
js=dict()
for j in range(len(l)):
i=l[j]
if i.startswith('-'):
try:
js[i[1:]]=l[j+1]
except:
js['h']=1
if 'help' in js or 'h' in js:
print('sight -x 1920 -y 1080 -color #ff0000 -name sight -r 20 -wd 6 -len 40')
exit()
u('waits',0.2,float)
u('alpha',0.4,flo... | 23.971014 | 103 | 0.530834 | import sys
import tkinter as tk
l=sys.argv[1:]
js=dict()
for j in range(len(l)):
i=l[j]
if i.startswith('-'):
try:
js[i[1:]]=l[j+1]
except:
js['h']=1
if 'help' in js or 'h' in js:
print('sight -x 1920 -y 1080 -color #ff0000 -name sight -r 20 -wd 6 -len 40')
exit()
def u(k:str,v:all... | 0 | 0 | 0 | 0 | 0 | 338 | 0 | -3 | 73 |
e723383cba212af7b96caf20a8333eeaff4221c5 | 461 | py | Python | GradescpeExportRenamer.py | ryancarr/ClassRoster | c84a5ba000dcb7408550779fafc83d103d07a6fc | [
"MIT"
] | null | null | null | GradescpeExportRenamer.py | ryancarr/ClassRoster | c84a5ba000dcb7408550779fafc83d103d07a6fc | [
"MIT"
] | null | null | null | GradescpeExportRenamer.py | ryancarr/ClassRoster | c84a5ba000dcb7408550779fafc83d103d07a6fc | [
"MIT"
] | null | null | null | # Name : Gradescope Export Renamer
# Author : Ryan Carr
# Modified : 05/17/2019
# Purppose : Opens .yml file in exports folder and renames .pdfs according
# to student name.
# Ask user for full path to .yml file
# Open yml file and skip first line
# Process file one submission at a time storing filen... | 28.8125 | 77 | 0.726681 | # Name : Gradescope Export Renamer
# Author : Ryan Carr
# Modified : 05/17/2019
# Purppose : Opens .yml file in exports folder and renames .pdfs according
# to student name.
# Ask user for full path to .yml file
# Open yml file and skip first line
# Process file one submission at a time storing filen... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5844ac797738ee1de2c09b685aafbad8cec46a71 | 10,384 | py | Python | orange3/Orange/tests/test_tab_reader.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/tests/test_tab_reader.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/tests/test_tab_reader.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
| 35.319728 | 88 | 0.573286 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import io
from os import path, remove
import unittest
import tempfile
import shutil
import time
from collections import OrderedDict
import numpy as np
from Orange.data import Table, DiscreteVariable
from Orange.data.io... | 0 | 0 | 0 | 9,953 | 0 | 45 | 0 | 16 | 269 |
1c59d326eca066bfdc7a173f8079d8d2014dd45c | 20,641 | py | Python | airrun/utils/adb.py | Hanlen520/airtest_run | 75111163443fd7ab3dfaf20f1bdc90102abba29a | [
"Apache-2.0"
] | 1 | 2020-04-15T10:49:09.000Z | 2020-04-15T10:49:09.000Z | airrun/utils/adb.py | Hanlen520/airtest_run | 75111163443fd7ab3dfaf20f1bdc90102abba29a | [
"Apache-2.0"
] | null | null | null | airrun/utils/adb.py | Hanlen520/airtest_run | 75111163443fd7ab3dfaf20f1bdc90102abba29a | [
"Apache-2.0"
] | 1 | 2020-07-08T04:23:40.000Z | 2020-07-08T04:23:40.000Z | import logging
logger = logging.getLogger(__name__)
| 37.873394 | 114 | 0.53854 | import logging
import os
import platform
import re
import time
import traceback
import prettytable
from airtest.core.android.constant import DEFAULT_ADB_PATH
from airrun.common.command_helper import command_execute
from airrun.common.exception import LocalPackageNotFoundException
from airrun.common.helper import deal... | 447 | 646 | 0 | 19,443 | 0 | 0 | 0 | 104 | 245 |
60cbf3b63690e3a52221030fd20e962fb604c340 | 2,821 | py | Python | scripts/tools/filter_bugs.py | ganler/LEMON | bc8d24ad5142c5eb7f8cdf6dfed09abf8da23619 | [
"Apache-2.0"
] | 29 | 2020-06-30T06:34:37.000Z | 2022-03-24T03:12:03.000Z | scripts/tools/filter_bugs.py | terminiter/LEMON | 128ee67f8c72ccb3d38c6d1d0d67c8191c833560 | [
"Apache-2.0"
] | 5 | 2020-11-28T03:32:53.000Z | 2022-03-12T00:32:46.000Z | scripts/tools/filter_bugs.py | terminiter/LEMON | 128ee67f8c72ccb3d38c6d1d0d67c8191c833560 | [
"Apache-2.0"
] | 18 | 2020-07-01T00:25:18.000Z | 2022-01-17T07:56:48.000Z | """
# Part of localization phase
"""
import sys
import os
import pickle
def simplify_layer_name(layer_name:str):
"""
simplify layer name 'conv2d_copy_LA' -> conv2d
"""
if 'copy' in layer_name:
layer_name = layer_name.split("_copy_")[0]
if 'insert' in layer_name:
layer_name = layer_... | 36.636364 | 95 | 0.648352 | """
# Part of localization phase
"""
import sys
import os
import pickle
import keras
import keras.backend as K
from scripts.tools.utils import ModelUtils
def simplify_layer_name(layer_name:str):
"""
simplify layer name 'conv2d_copy_LA' -> conv2d
"""
if 'copy' in layer_name:
layer_name = layer_... | 0 | 0 | 0 | 0 | 0 | 1,672 | 0 | 16 | 112 |
e55d81a16087c62c75dcbc22f1a00ae460fb60ec | 3,911 | py | Python | build/lib/DataCollectTool/RecToolUI.py | Artori-kun/SpeechCommandDataCollectingTool | 11cc64682e0bcff7336364b89aad06fa6872beda | [
"MIT"
] | null | null | null | build/lib/DataCollectTool/RecToolUI.py | Artori-kun/SpeechCommandDataCollectingTool | 11cc64682e0bcff7336364b89aad06fa6872beda | [
"MIT"
] | null | null | null | build/lib/DataCollectTool/RecToolUI.py | Artori-kun/SpeechCommandDataCollectingTool | 11cc64682e0bcff7336364b89aad06fa6872beda | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'RecToolUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
| 46.559524 | 115 | 0.693173 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'RecToolUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjec... | 43 | 0 | 0 | 3,630 | 0 | 0 | 0 | 21 | 46 |
3009a77ac62feb849ae94774db9494ef575ee1db | 5,289 | py | Python | webapp.py | isuruf/github-clang-format | a39641929b2370c5026f3e95aa03b54b1c380d26 | [
"MIT"
] | 1 | 2017-07-20T15:48:28.000Z | 2017-07-20T15:48:28.000Z | webapp.py | isuruf/github-clang-format | a39641929b2370c5026f3e95aa03b54b1c380d26 | [
"MIT"
] | null | null | null | webapp.py | isuruf/github-clang-format | a39641929b2370c5026f3e95aa03b54b1c380d26 | [
"MIT"
] | null | null | null | import tornado.httpserver
import tornado.ioloop
if __name__ == "__main__":
main()
| 35.496644 | 122 | 0.607298 |
from contextlib import contextmanager
import os
import tornado.httpserver
import tornado.ioloop
import tornado.web
import requests
import tempfile
import shutil
import subprocess
from git import GitCommandError, Repo, Actor
import github
from fnmatch import fnmatch
@contextmanager
def tmp_directory():
tmp_dir = ... | 0 | 108 | 0 | 779 | 0 | 3,952 | 0 | -2 | 364 |
a89761121dbc5b48c8b71d5c4986a3d03ce34808 | 31,600 | py | Python | newapi/tests/integ/test_integration.py | hellais/ooni-measurements | 05e2a144b506c015d9e2f90502a7ca036ce2c9ef | [
"BSD-3-Clause"
] | null | null | null | newapi/tests/integ/test_integration.py | hellais/ooni-measurements | 05e2a144b506c015d9e2f90502a7ca036ce2c9ef | [
"BSD-3-Clause"
] | null | null | null | newapi/tests/integ/test_integration.py | hellais/ooni-measurements | 05e2a144b506c015d9e2f90502a7ca036ce2c9ef | [
"BSD-3-Clause"
] | null | null | null | """
Integration test for API
Warning: this test runs against a real database
See README.adoc
Lint using:
black -t py37 -l 100 --fast ooniapi/tests/integ/test_integration.py
Test using:
pytest-3 -k test_aggregation
"""
from datetime import datetime, timedelta
# The flask app is created in tests/conftest.py
... | 35.545557 | 190 | 0.664399 | """
Integration test for API
Warning: this test runs against a real database
See README.adoc
Lint using:
black -t py37 -l 100 --fast ooniapi/tests/integ/test_integration.py
Test using:
pytest-3 -k test_aggregation
"""
from datetime import datetime, timedelta
from hashlib import shake_128
from urllib.parse i... | 258 | 16,939 | 0 | 0 | 0 | 11,431 | 0 | 67 | 1,626 |