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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8610d811befae6e575ff7f591c6961562d7dc4b9 | 69,207 | py | Python | salt/modules/debian_ip.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | 1 | 2021-04-05T19:46:35.000Z | 2021-04-05T19:46:35.000Z | salt/modules/debian_ip.py | dv-trading/salt | f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e | [
"Apache-2.0"
] | null | null | null | salt/modules/debian_ip.py | dv-trading/salt | f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
The networking module for Debian based distros
References:
* http://www.debian.org/doc/manuals/debian-reference/ch05.en.html
'''
# Import python libs
from __future__ import absolute_import
import logging
import os.path
import os
import re
import time
# Import third party libs
import jinj... | 32.62942 | 114 | 0.587917 | # -*- coding: utf-8 -*-
'''
The networking module for Debian based distros
References:
* http://www.debian.org/doc/manuals/debian-reference/ch05.en.html
'''
# Import python libs
from __future__ import absolute_import
import functools
import logging
import os.path
import os
import re
import time
# Import third party... | 0 | 0 | 0 | 0 | 0 | 554 | 0 | -5 | 137 |
369a9a39bc0dffc579cc1557c234597a461013c7 | 8,726 | py | Python | openmmmcmc/tests/test_mcmc.py | choderalab/openmm-mcmc | 0b28cb9465699685176bbd8cfa5c83125af8fda9 | [
"MIT"
] | 1 | 2016-01-14T20:10:00.000Z | 2016-01-14T20:10:00.000Z | openmmmcmc/tests/test_mcmc.py | choderalab/openmmmcmc | 0b28cb9465699685176bbd8cfa5c83125af8fda9 | [
"MIT"
] | 9 | 2016-01-14T18:47:21.000Z | 2017-02-02T23:08:54.000Z | openmmmcmc/tests/test_mcmc.py | choderalab/openmmmcmc | 0b28cb9465699685176bbd8cfa5c83125af8fda9 | [
"MIT"
] | 3 | 2016-01-14T20:59:52.000Z | 2021-04-01T00:38:29.000Z |
import simtk.openmm as openmm
import simtk.unit as units
from openmmtools import testsystems
from openmmmcmc.mcmc import HMCMove, GHMCMove, LangevinDynamicsMove
# Test various combinations of systems and MCMC schemes
analytical_testsystems = [
("HarmonicOscillator", testsystems.HarmonicOscillator(),
[GH... | 44.748718 | 258 | 0.655168 | import numpy as np
import simtk.openmm as openmm
import simtk.unit as units
from openmmtools import testsystems
from pymbar import timeseries
from functools import partial
from openmmmcmc.mcmc import HMCMove, GHMCMove, LangevinDynamicsMove, MonteCarloBarostatMove
import logging
# Test various combinations of syste... | 0 | 0 | 0 | 0 | 347 | 6,912 | 0 | 30 | 158 |
f519e5a9d3baabea7b9efdf4583778ebf50e0b07 | 163 | py | Python | aula/aula013.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | aula/aula013.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | aula/aula013.py | henriquekirchheck/Curso-em-video-Python | 1a29f68515313af85c8683f626ba35f8fcdd10e7 | [
"MIT"
] | null | null | null | from time import sleep
#Aula N13
print("Aula N13 \n")
sleep(0.2)
s = 0
for c in range(1, 4):
n = int(input('Escolha um numero: '))
s = s + n
print(s) | 12.538462 | 41 | 0.576687 | from time import sleep
#Aula N°13
print("Aula N°13 \n")
sleep(0.2)
s = 0
for c in range(1, 4):
n = int(input('Escolha um numero: '))
s = s + n
print(s) | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
033708bec7b12d53ab2579de5592e8c6448a6dee | 1,043 | py | Python | Leetcode/0151-0200/0167-two-sum-ii.py | MiKueen/Data-Structures-and-Algorithms | 8788bde5349f326aac0267531f39ac7a2a708ee6 | [
"MIT"
] | null | null | null | Leetcode/0151-0200/0167-two-sum-ii.py | MiKueen/Data-Structures-and-Algorithms | 8788bde5349f326aac0267531f39ac7a2a708ee6 | [
"MIT"
] | null | null | null | Leetcode/0151-0200/0167-two-sum-ii.py | MiKueen/Data-Structures-and-Algorithms | 8788bde5349f326aac0267531f39ac7a2a708ee6 | [
"MIT"
] | 1 | 2019-10-06T15:46:14.000Z | 2019-10-06T15:46:14.000Z | '''
Author : MiKueen
Level : Easy
Problem Statement : Two Sum II - Input array is sorted
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta... | 34.766667 | 137 | 0.628955 | '''
Author : MiKueen
Level : Easy
Problem Statement : Two Sum II - Input array is sorted
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta... | 0 | 0 | 0 | 317 | 0 | 0 | 0 | 0 | 23 |
1a3533a122ed8825db4a37879558e890c3636d80 | 22,998 | py | Python | trueskilltest.py | adity5/trueskill | cd616d625973305a40d3259d9371cb430bf31dd4 | [
"BSD-3-Clause"
] | 533 | 2015-01-09T06:23:49.000Z | 2022-03-18T07:01:21.000Z | trueskilltest.py | adity5/trueskill | cd616d625973305a40d3259d9371cb430bf31dd4 | [
"BSD-3-Clause"
] | 40 | 2015-04-26T15:47:54.000Z | 2022-02-02T17:35:30.000Z | trueskilltest.py | adity5/trueskill | cd616d625973305a40d3259d9371cb430bf31dd4 | [
"BSD-3-Clause"
] | 116 | 2015-01-05T03:22:58.000Z | 2022-03-18T07:01:31.000Z | # -*- coding: utf-8 -*-
from __future__ import with_statement
import warnings
from trueskill import (quality, quality_1vs1, rate, rate_1vs1, Rating)
warnings.simplefilter('always')
inf = float('inf')
nan = float('nan')
_rate = almost.wrap(rate)
_rate_1vs1 = almost.wrap(rate_1vs1)
_quality = almost.wrap(quality)... | 35.71118 | 79 | 0.587573 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import warnings
from almost import Approximate
from pytest import deprecated_call, raises
from conftest import various_backends
import trueskill as t
from trueskill import (
quality, quality_1vs1, rate, rate_1vs1, Rating, setup, TrueSkill)
warnings.... | 0 | 12,554 | 0 | 716 | 856 | 6,344 | 0 | 69 | 944 |
13add9bde409fbeafca507098bc9056f4d2fe97e | 44,491 | py | Python | main.py | qinyiwei/MuTual | 3bdd13c1388d6136b8944666dfd434870760cc93 | [
"MIT"
] | null | null | null | main.py | qinyiwei/MuTual | 3bdd13c1388d6136b8944666dfd434870760cc93 | [
"MIT"
] | null | null | null | main.py | qinyiwei/MuTual | 3bdd13c1388d6136b8944666dfd434870760cc93 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 41.310121 | 190 | 0.572835 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 0 | 0 | 0 | 9,039 | 0 | 28,422 | 0 | 462 | 993 |
1c82a092d652b6f6dacceb9ea22aa4185bdac0bb | 1,389 | py | Python | netbox/users/migrations/0001_api_tokens_squashed_0002_unicode_literals.py | xcorp/netbox | 48b9c9da932dc736710d9c14793067093f8f1bde | [
"Apache-2.0"
] | 6 | 2017-12-01T05:13:39.000Z | 2020-01-23T13:04:43.000Z | netbox/users/migrations/0001_api_tokens_squashed_0002_unicode_literals.py | xcorp/netbox | 48b9c9da932dc736710d9c14793067093f8f1bde | [
"Apache-2.0"
] | 8 | 2021-04-16T01:38:00.000Z | 2022-01-04T21:27:27.000Z | netbox/users/migrations/0001_api_tokens_squashed_0002_unicode_literals.py | xcorp/netbox | 48b9c9da932dc736710d9c14793067093f8f1bde | [
"Apache-2.0"
] | 3 | 2017-11-18T01:28:22.000Z | 2018-05-17T14:04:43.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-01 17:43
import django.core.validators
| 40.852941 | 141 | 0.635709 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-01 17:43
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
replaces = [('users', '0001_api_tokens'), ('users', '0002_unico... | 0 | 0 | 0 | 1,154 | 0 | 0 | 0 | 41 | 89 |
924b4ba3b425982309ec0f08bffb018f6cdf7467 | 497 | py | Python | downscale-lls.py | jni/useful-histories | 0c75003e4fa3a80d4bf7281314cdf6e363d3be56 | [
"BSD-3-Clause"
] | null | null | null | downscale-lls.py | jni/useful-histories | 0c75003e4fa3a80d4bf7281314cdf6e363d3be56 | [
"BSD-3-Clause"
] | null | null | null | downscale-lls.py | jni/useful-histories | 0c75003e4fa3a80d4bf7281314cdf6e363d3be56 | [
"BSD-3-Clause"
] | null | null | null | # IPython log file
from tqdm import tqdm
import dask.array as da
import zarr
import itertools
from skimage.transform import downscale_local_mean
lls = da.from_zarr('data/gokul-lls/aollsm-m4-560nm.zarr')
lls3 = zarr.open('data/gokul-lls/aollsm-m4-560nm-downscale.zarr', dtype=np.float32, shape=(199, 201, 192, 256), chu... | 33.133333 | 138 | 0.730382 | # IPython log file
from tqdm import tqdm
import dask.array as da
import zarr
import itertools
from skimage.transform import downscale_local_mean
lls = da.from_zarr('data/gokul-lls/aollsm-m4-560nm.zarr')
lls3 = zarr.open('data/gokul-lls/aollsm-m4-560nm-downscale.zarr', dtype=np.float32, shape=(199, 201, 192, 256), chu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9f95ccb9bd06253bf86b034d97ce272134d0fd4 | 967 | py | Python | snake.py | kuntaltattu/beginning-python | 59b6e0b179fbf973976f8b12470fab8243aad793 | [
"Apache-2.0"
] | 1 | 2017-06-30T10:43:27.000Z | 2017-06-30T10:43:27.000Z | snake.py | kuntaltattu/beginning-python | 59b6e0b179fbf973976f8b12470fab8243aad793 | [
"Apache-2.0"
] | null | null | null | snake.py | kuntaltattu/beginning-python | 59b6e0b179fbf973976f8b12470fab8243aad793 | [
"Apache-2.0"
] | null | null | null | import pygame, sys
pygame.init()
FPS = 10
frametime = 1000/FPS
fpsClock = pygame.time.Clock ()
DISPLAYSURF = pygame.display.set_mode((700,500),pygame.DOUBLEBUF, 32)
DISPLAYSURF = pygame.display.set_caption ('Snakes!')
snakeImg = pygame.image.load ('snake.png')
WHITE = (255,255,255)
snakeht = pygame.image.get_height ... | 21.977273 | 69 | 0.649431 | import pygame,sys
from pygame.locals import *
pygame.init()
FPS = 10
frametime = 1000/FPS
fpsClock = pygame.time.Clock ()
DISPLAYSURF = pygame.display.set_mode((700,500),pygame.DOUBLEBUF, 32)
DISPLAYSURF = pygame.display.set_caption ('Snakes!')
snakeImg = pygame.image.load ('snake.png')
WHITE = (255,255,255)
snakeht... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
4a8c44382a90003bcba3dd0fb83e3532d22fe13e | 201 | py | Python | rts/python/panic.py | Snektron/futhark | ca9a33d511ba30b27409aef46e5df92556ab2e8b | [
"ISC"
] | 2 | 2022-01-02T16:21:11.000Z | 2022-01-09T09:49:43.000Z | rts/python/panic.py | q60/futhark | a9421d922778281ac8a84e66497c340290c1e23b | [
"ISC"
] | null | null | null | rts/python/panic.py | q60/futhark | a9421d922778281ac8a84e66497c340290c1e23b | [
"ISC"
] | null | null | null | # Start of panic.py.
# End of panic.py.
| 20.1 | 42 | 0.61194 | # Start of panic.py.
def panic(exitcode, fmt, *args):
sys.stderr.write('%s: ' % sys.argv[0])
sys.stderr.write(fmt % args)
sys.stderr.write('\n')
sys.exit(exitcode)
# End of panic.py.
| 0 | 0 | 0 | 0 | 0 | 137 | 0 | 0 | 23 |
4248b02199f22375a1b1218c15ae4465fdf441ae | 1,276 | py | Python | codetools/contexts/name_filter_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 29 | 2015-08-10T20:25:00.000Z | 2021-11-30T23:34:24.000Z | codetools/contexts/name_filter_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 40 | 2015-01-05T15:01:37.000Z | 2022-03-11T13:47:06.000Z | codetools/contexts/name_filter_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 4 | 2015-04-14T10:06:26.000Z | 2021-01-19T16:46:48.000Z | #
# (C) Copyright 2013 Enthought, Inc., Austin, TX
# All right reserved.
#
# This file is open source software distributed according to the terms in
# LICENSE.txt
#
from __future__ import absolute_import
# Enthought library imports
# Local imports
| 28.355556 | 85 | 0.582288 | #
# (C) Copyright 2013 Enthought, Inc., Austin, TX
# All right reserved.
#
# This file is open source software distributed according to the terms in
# LICENSE.txt
#
from __future__ import absolute_import
# Enthought library imports
from traits.api import Any
# Local imports
from .data_context import DataContext
cla... | 0 | 0 | 0 | 936 | 0 | 0 | 0 | 21 | 67 |
3b89cf23a8f1210a9d5cf7e6030cb9a5160845ec | 591 | py | Python | setup.py | joeyearsley/quiver | 0702720f0d97fdd57e8bbac087c44a7982ff2e0e | [
"MIT"
] | 1,129 | 2016-11-14T06:16:21.000Z | 2022-03-03T02:24:37.000Z | setup.py | ankur248/quiver | cc901e43ab0dbc5544e4196ecaa079dd87f1f6ec | [
"MIT"
] | 43 | 2016-11-14T08:38:32.000Z | 2017-02-03T17:24:11.000Z | setup.py | ankur248/quiver | cc901e43ab0dbc5544e4196ecaa079dd87f1f6ec | [
"MIT"
] | 129 | 2016-11-14T10:51:25.000Z | 2021-11-14T03:06:09.000Z | from setuptools import setup, find_packages
setup(
name='quiver_engine',
version="0.1.4.1.4",
author="Jake Bian",
author_email="jake@keplr.io",
description=("Interactive per-layer visualization for convents in keras"),
license='mit',
packages=find_packages(),
include_package_data=True,
... | 24.625 | 78 | 0.617597 | from setuptools import setup, find_packages
setup(
name='quiver_engine',
version="0.1.4.1.4",
author="Jake Bian",
author_email="jake@keplr.io",
description=("Interactive per-layer visualization for convents in keras"),
license='mit',
packages=find_packages(),
include_package_data=True,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2132da8d7e158e987542f256421399d9c24000d9 | 1,867 | py | Python | test/test_voice_endpoints_api.py | networthdata/generated-swagger-client | 41dd3fb02b322ed1d39cbaef6b4091ae6cab0d0b | [
"MIT"
] | null | null | null | test/test_voice_endpoints_api.py | networthdata/generated-swagger-client | 41dd3fb02b322ed1d39cbaef6b4091ae6cab0d0b | [
"MIT"
] | null | null | null | test/test_voice_endpoints_api.py | networthdata/generated-swagger-client | 41dd3fb02b322ed1d39cbaef6b4091ae6cab0d0b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Speech Services API v2.0
Speech Services API v2.0. # noqa: E501
OpenAPI spec version: v2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
if __name__ == '__main__':
unittest.main()
| 24.246753 | 98 | 0.668988 | # coding: utf-8
"""
Speech Services API v2.0
Speech Services API v2.0. # noqa: E501
OpenAPI spec version: v2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.api.voice_endp... | 0 | 0 | 0 | 1,380 | 0 | 0 | 0 | 70 | 104 |
fc7dd1c1e382aa08a027fdd5d8a16f08b7a9fd25 | 192 | py | Python | infoset/utils/__init__.py | clayton-colovore/infoset-ng | b0404fdda9e805effc16cebc9caef5f86b6bfe33 | [
"Apache-2.0"
] | null | null | null | infoset/utils/__init__.py | clayton-colovore/infoset-ng | b0404fdda9e805effc16cebc9caef5f86b6bfe33 | [
"Apache-2.0"
] | null | null | null | infoset/utils/__init__.py | clayton-colovore/infoset-ng | b0404fdda9e805effc16cebc9caef5f86b6bfe33 | [
"Apache-2.0"
] | null | null | null | """Infoset utilities package.
This package's modules which perform important tasks within
the project but are either not specific enough or not large
enough to warrant their own package
"""
| 24 | 59 | 0.796875 | """Infoset utilities package.
This package's modules which perform important tasks within
the project but are either not specific enough or not large
enough to warrant their own package
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b2011b74dfaf912f01e8af596df8d01c9f15ebc9 | 465 | py | Python | kagi/lower/east/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | kagi/lower/east/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | kagi/lower/east/_capital/four.py | jedhsu/kagi | 1301f7fc437bb445118b25ca92324dbd58d6ad2d | [
"MIT"
] | null | null | null | """
*Lower-East Capital 4*
The lower-east capital four gi.
"""
__all__ = ["LowerEastCapital4"]
| 15 | 33 | 0.668817 | """
*Lower-East Capital 4* ⠨
The lower-east capital four gi.
"""
from dataclasses import dataclass
from ....._gi import Gi
from ....capital import CapitalGi
from ...._gi import StrismicGi
from ....east import EasternGi
from ...._number import FourGi
from ..._gi import LowerGi
__all__ = ["LowerEastCapital4... | 3 | 118 | 0 | 0 | 0 | 0 | 0 | 58 | 179 |
53bb5459b58c2bd4de374bf23136490aac39de80 | 3,974 | py | Python | 2 - Conceptual Design/4 - Wing Design/aircraft_plotter.py | JARC99/DISECON_PIA | 8b05b39ffce9dc9cdfdae5b21129857bad6e4d99 | [
"MIT"
] | null | null | null | 2 - Conceptual Design/4 - Wing Design/aircraft_plotter.py | JARC99/DISECON_PIA | 8b05b39ffce9dc9cdfdae5b21129857bad6e4d99 | [
"MIT"
] | null | null | null | 2 - Conceptual Design/4 - Wing Design/aircraft_plotter.py | JARC99/DISECON_PIA | 8b05b39ffce9dc9cdfdae5b21129857bad6e4d99 | [
"MIT"
] | null | null | null | """Provide tools for creating parametirc aircraft geometry."""
import numpy as np
import matplotlib.pyplot as plt
import openvsp as vsp
def naca_4_series(max_camber, max_camber_loc, max_tc, n_points,
plot_switch=False):
"""Plot NACA 4-Series airfoil with the given characteristics."""
airfoi... | 33.116667 | 108 | 0.585053 | """Provide tools for creating parametirc aircraft geometry."""
import numpy as np
import matplotlib.pyplot as plt
import openvsp as vsp
def naca_4_series(max_camber, max_camber_loc, max_tc, n_points,
plot_switch=False):
"""Plot NACA 4-Series airfoil with the given characteristics."""
airfoi... | 0 | 0 | 0 | 0 | 0 | 874 | 0 | 0 | 54 |
ce957869072f6295537bd57aeed256f7e4c2f9c5 | 2,574 | py | Python | app/centroid-to-feet-interpolation/funzioniUtili.py | davave/EdgeRealtimeVideoAnalytics | 8f6abf233b2e1822d4ab0b65c6f5eb7a91df090d | [
"Apache-2.0"
] | null | null | null | app/centroid-to-feet-interpolation/funzioniUtili.py | davave/EdgeRealtimeVideoAnalytics | 8f6abf233b2e1822d4ab0b65c6f5eb7a91df090d | [
"Apache-2.0"
] | null | null | null | app/centroid-to-feet-interpolation/funzioniUtili.py | davave/EdgeRealtimeVideoAnalytics | 8f6abf233b2e1822d4ab0b65c6f5eb7a91df090d | [
"Apache-2.0"
] | null | null | null | import yaml
import numpy as np
def centroidFeetFromFile(fileName="/home/davide/Documenti/progetti/playground/centroid-to-feet-interpolation/101_640x480.yaml", normalization=False):
'''
funzione che carica e restituisce le coordinate di centroide e piedi nel formato [[x y]]
'''
with open(fileName, 'r') ... | 41.516129 | 156 | 0.6554 | import cv2
import yaml
import numpy as np
def pointsMap(imgName='640x480.jpg',windowName='Disposizione punti del centroide'):
img = cv2.imread(imgName)
windowName = windowName
centroidCoordinates, feetCoordinates = centroidFeetFromFile()
#img = cv2.drawMarker(img, (320,240), color=(255,255,0), marker... | 0 | 0 | 0 | 0 | 0 | 1,424 | 0 | -11 | 91 |
0fb04afb3633198dd89331a36a5ad6f08b43e364 | 4,856 | py | Python | tetris/a2c_rewards/play.py | NeuralFlux/rl-analysis | bb45e1f8bb9da4683cce4bd0a5e687770a4005e2 | [
"MIT"
] | 1 | 2020-12-05T13:15:35.000Z | 2020-12-05T13:15:35.000Z | tetris/a2c_rewards/play.py | NeuralFlux/rl-analysis | bb45e1f8bb9da4683cce4bd0a5e687770a4005e2 | [
"MIT"
] | null | null | null | tetris/a2c_rewards/play.py | NeuralFlux/rl-analysis | bb45e1f8bb9da4683cce4bd0a5e687770a4005e2 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.optim as optim
from Tetris.src.tetris import Tetris
# height, width and possible actions for the agent
HEIGHT, WIDTH = 20, 6
ACTION_LIST = [(x, n_rotations) for n_rotations in range(4) for x in range(WIDTH)]
ACTION_LIST.remove((WIDTH - 1, 0))
ACTION_LIST.remove((WIDTH - 1, 2))
prin... | 30.161491 | 116 | 0.585255 | import sys
import numpy as np
import random
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.distributions import Categorical
from Tetris.src.tetris import Tetris
from PIL import Image
from time import sleep
from pathlib import Path
import cv2
# height, w... | 0 | 0 | 0 | 3,829 | 0 | 0 | 0 | -6 | 271 |
acffc3c4325c7c1e2ca199cc4221f5c4c74b9ede | 11,253 | py | Python | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | 4 | 2019-08-06T03:23:14.000Z | 2019-11-08T10:58:54.000Z | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | null | null | null | mltk/batch_agg.py | haowen-xu/ml-essentials | ca44186be37887461205227c32995f1485b4ff41 | [
"MIT"
] | 2 | 2019-12-03T08:09:05.000Z | 2020-10-15T06:50:20.000Z |
__all__ = [
'BatchAggregationMode',
'BatchAggregator', 'BatchAggregatorDict',
]
| 36.3 | 83 | 0.566071 | import operator
from enum import Enum
from functools import reduce
from typing import *
import numpy as np
from .stage import StageType
from .utils import ALL, NOT_SET
__all__ = [
'BatchAggregationMode',
'BatchAggregator', 'BatchAggregatorDict',
]
class BatchAggregationMode(str, Enum):
CONCAT = 'CONCA... | 0 | 3,831 | 0 | 7,091 | 0 | 0 | 0 | 14 | 225 |
d18d2231e33b1398489d8cb8ae750e5dfd0e3996 | 32 | py | Python | Exercicios - Mundo1/Ex001.py | BrianMath/ExerciciosPythonCeV | 4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f | [
"MIT"
] | null | null | null | Exercicios - Mundo1/Ex001.py | BrianMath/ExerciciosPythonCeV | 4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f | [
"MIT"
] | null | null | null | Exercicios - Mundo1/Ex001.py | BrianMath/ExerciciosPythonCeV | 4960f1a58d281b32afd5dfd6ea65e0ae5ad48b4f | [
"MIT"
] | null | null | null | # Ex. 001
print("Ol, Mundo!")
| 8 | 20 | 0.5625 | # Ex. 001
print("Olá, Mundo!")
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d28049b5492eb31932111a9fa01bbadbb299b94d | 244 | py | Python | symposion_project/proposals/admin.py | pyconca/2013-web | 3d4169e39ae850a26cf19bef37a3f0ca36e67d7f | [
"BSD-3-Clause"
] | null | null | null | symposion_project/proposals/admin.py | pyconca/2013-web | 3d4169e39ae850a26cf19bef37a3f0ca36e67d7f | [
"BSD-3-Clause"
] | null | null | null | symposion_project/proposals/admin.py | pyconca/2013-web | 3d4169e39ae850a26cf19bef37a3f0ca36e67d7f | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from symposion_project.proposals.models import TalkProposal, TutorialProposal, LightningProposal
admin.site.register(TalkProposal)
admin.site.register(TutorialProposal)
admin.site.register(LightningProposal)
| 27.111111 | 96 | 0.864754 | from django.contrib import admin
from symposion_project.proposals.models import TalkProposal, TutorialProposal, LightningProposal
admin.site.register(TalkProposal)
admin.site.register(TutorialProposal)
admin.site.register(LightningProposal)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d6e9732ca672a71c416021c2409f40951babaccc | 813 | py | Python | example/messaging/check-credit-usage.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 2 | 2020-11-21T18:10:46.000Z | 2021-09-21T19:28:03.000Z | example/messaging/check-credit-usage.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 3 | 2021-11-11T15:04:46.000Z | 2021-11-11T15:15:47.000Z | example/messaging/check-credit-usage.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 7 | 2019-08-05T18:46:22.000Z | 2021-11-15T16:49:34.000Z | #!/usr/bin/env python
from api.messaging.sms.sms_message_request import SMSMessageRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# User will be able to check account us... | 30.111111 | 74 | 0.797048 | #!/usr/bin/env python
from api.messaging.sms.sms_message_request import SMSMessageRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# User will be able to check account us... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f142c9575b6ac762f1f77e3c862d5fb6ba209f3a | 10,836 | py | Python | agent/src/Custom_JMX/yarn.py | ekbanasolutions/aditas | 2e8291202cb6781a1a0855a1cccb86348b710b71 | [
"MIT"
] | 2 | 2019-01-03T07:42:45.000Z | 2019-03-15T09:06:12.000Z | agent/src/Custom_JMX/yarn.py | ekbanatechnology/aditas | 2e8291202cb6781a1a0855a1cccb86348b710b71 | [
"MIT"
] | null | null | null | agent/src/Custom_JMX/yarn.py | ekbanatechnology/aditas | 2e8291202cb6781a1a0855a1cccb86348b710b71 | [
"MIT"
] | 2 | 2019-01-21T10:34:44.000Z | 2021-07-06T08:49:41.000Z | import os
from bigdata_logs.logger import getLoggingInstance
log = getLoggingInstance()
hadoop_bin=os.getenv("hadoop_bin_dir")
get_yarn_cmd = "%syarn node -all -list" % hadoop_bin
get_node_info = "%syarn node -status " % hadoop_bin
get_yarn_master_cmd = "%syarn rmadmin -getAllServiceState" % hadoop_bin
get_nm_addres... | 36.982935 | 160 | 0.457549 | import ast
import json
import os
import re
import subprocess
import time
from multiprocessing.pool import ThreadPool
from Postgres_connection.connection import get_postgres_connection
from bigdata_logs.logger import getLoggingInstance
log = getLoggingInstance()
hadoop_bin=os.getenv("hadoop_bin_dir")
get_yarn_cmd = ... | 0 | 0 | 0 | 0 | 0 | 9,948 | 0 | 20 | 362 |
3e6384f78ff13e875854845743693ace589399d0 | 4,736 | py | Python | rule_surrogate/core/model_base.py | myaooo/rule-surrogate | 3f909062eef86419d86a9d8056521e9be519d537 | [
"MIT"
] | null | null | null | rule_surrogate/core/model_base.py | myaooo/rule-surrogate | 3f909062eef86419d86a9d8056521e9be519d537 | [
"MIT"
] | null | null | null | rule_surrogate/core/model_base.py | myaooo/rule-surrogate | 3f909062eef86419d86a9d8056521e9be519d537 | [
"MIT"
] | null | null | null |
FILE_EXTENSION = '.mdl'
CLASSIFICATION = 'classification'
REGRESSION = 'regression'
| 26.909091 | 93 | 0.629856 | import dill as pickle
from typing import Optional, Union
from sklearn.base import ClassifierMixin, RegressorMixin
from sklearn.metrics import log_loss, accuracy_score, mean_squared_error, r2_score
from rule_surrogate import Config
from rule_surrogate.utils.io_utils import get_path, obj2pkl, assert_file_exists
from ru... | 0 | 815 | 0 | 3,043 | 0 | 262 | 0 | 207 | 317 |
8f62197fa70260e7332679cdc42f33f42b283aef | 1,835 | py | Python | keygen/generator.py | encode1/keygen-api | 84a69c40766f68daee866b5c305b6a0b1c99f056 | [
"Apache-2.0"
] | null | null | null | keygen/generator.py | encode1/keygen-api | 84a69c40766f68daee866b5c305b6a0b1c99f056 | [
"Apache-2.0"
] | 6 | 2021-03-19T00:40:57.000Z | 2021-09-22T18:41:41.000Z | keygen/generator.py | encode1/keygen-api | 84a69c40766f68daee866b5c305b6a0b1c99f056 | [
"Apache-2.0"
] | null | null | null | """
KeyGenerator uses the RSA keys to encrypt the email
"""
| 28.230769 | 80 | 0.53406 | """
KeyGenerator uses the RSA keys to encrypt the email
"""
import os
import re
import rsa
import pickle
from base64 import b64encode, b64decode
class KeyGenerator(object):
_pubkey = pickle.loads(b64decode(os.getenv('PUB_KEY')))
_privkey = pickle.loads(b64decode(os.getenv('PRIV_KEY')))
def __init__(self,... | 0 | 0 | 0 | 1,666 | 0 | 0 | 0 | -25 | 133 |
6f197ce0a20b9f48a593503aafee8223eb8d7826 | 2,998 | py | Python | site-packages/cinderclient/tests/unit/fixture_data/availability_zones.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 74 | 2015-01-29T20:10:47.000Z | 2022-03-03T05:09:00.000Z | site-packages/cinderclient/tests/unit/fixture_data/availability_zones.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 6 | 2015-08-10T10:23:42.000Z | 2022-02-16T02:28:22.000Z | site-packages/cinderclient/tests/unit/fixture_data/availability_zones.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | 125 | 2015-02-24T11:04:51.000Z | 2021-12-23T01:28:05.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 33.685393 | 75 | 0.442628 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 0 | 0 | 0 | 2,232 | 0 | 0 | 0 | 40 | 69 |
27c38e84ddccbff6b7a91df729523fc4d21dc45d | 2,755 | py | Python | imgurpx.py | andrewpx1/apiai-weather-webhook-sample-master | 4cdd28f8d6a8a3fa5d303a163bfdfd24bdb19a80 | [
"Apache-2.0"
] | null | null | null | imgurpx.py | andrewpx1/apiai-weather-webhook-sample-master | 4cdd28f8d6a8a3fa5d303a163bfdfd24bdb19a80 | [
"Apache-2.0"
] | null | null | null | imgurpx.py | andrewpx1/apiai-weather-webhook-sample-master | 4cdd28f8d6a8a3fa5d303a163bfdfd24bdb19a80 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
import os
from flask import Flask
# Flask app should start in global layout
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.getenv('PORT', 5000))
print("St... | 22.04 | 58 | 0.564428 | #!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
from os.path import splitext
from re import findall
from random ... | 0 | 0 | 0 | 0 | 0 | 1,967 | 0 | 69 | 315 |
3d77627e7314207b9f89032fbd647f63aa3aebb9 | 4,866 | py | Python | model_api/model_training/next_framework/tests/training_util_functions_test.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 21 | 2020-09-29T12:45:50.000Z | 2022-03-27T13:11:12.000Z | model_api/model_training/next_framework/tests/training_util_functions_test.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 3 | 2020-12-03T10:34:54.000Z | 2021-03-29T09:01:05.000Z | model_api/model_training/next_framework/tests/training_util_functions_test.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 3 | 2021-02-14T08:39:02.000Z | 2021-07-29T02:33:14.000Z | import sys
sys.path.append("../")
import random
random_state = 42
random.seed(random_state)
# assert ['not'] == func.extract_queries_from_explanations(text)
# text = "Finally we also handle `backticks as quotes`"
# assert ["backticks as quotes"] == func.extract_queries_from_explanations(text)
# tex... | 39.560976 | 123 | 0.601315 | import sys
sys.path.append("../")
import random
import training.next_util_functions as func
random_state = 42
random.seed(random_state)
def test_build_custom_vocab():
custom_vocab = func.build_custom_vocab("tacred", 10)
actual_custom_vocab = {
'SUBJ-PERSON': 10, 'OBJ-PERSON': 11, 'SUBJ-ORGANIZATION': ... | 0 | 0 | 0 | 0 | 0 | 4,252 | 0 | 22 | 160 |
4c58561faba3770f46167adad05650809146160e | 2,305 | py | Python | tests/test_subqueues.py | hadren/mrq | 9851294b04ddb5071e9e366bc6b71b3e1d4a98e8 | [
"MIT"
] | null | null | null | tests/test_subqueues.py | hadren/mrq | 9851294b04ddb5071e9e366bc6b71b3e1d4a98e8 | [
"MIT"
] | null | null | null | tests/test_subqueues.py | hadren/mrq | 9851294b04ddb5071e9e366bc6b71b3e1d4a98e8 | [
"MIT"
] | null | null | null | import time
from mrq.job import Job
def test_refresh_interval(worker):
""" Tests that a refresh interval of 0 disables the subqueue detection """
worker.start(queues="test/", flags="--subqueues_refresh_interval=0")
time.sleep(2)
job_id1 = worker.send_task(
"tests.tasks.general.GetTime",... | 29.935065 | 109 | 0.657701 | import time
import pytest
from mrq.job import Job
from mrq.queue import Queue
@pytest.mark.parametrize(["queues", "enqueue_on"], [
[["main/", "second/"], ["main/", "main/sub", "main/sub/nested", "second/x"]],
[["prefix/main/"], ["prefix/main/", "prefix/main/sub", "prefix/main/sub/nested"]],
])
def test_matcha... | 0 | 1,703 | 0 | 0 | 0 | 0 | 0 | -2 | 113 |
04f4ab1b9e2bf0dbfeeb420de45c222c9e8ceeeb | 356 | py | Python | src/verify/word_count.py | privong/still-magic | 1d651840497d66d44ff43528f6e1f38e698ce168 | [
"CC-BY-4.0"
] | null | null | null | src/verify/word_count.py | privong/still-magic | 1d651840497d66d44ff43528f6e1f38e698ce168 | [
"CC-BY-4.0"
] | 1 | 2019-05-11T23:42:33.000Z | 2019-05-13T18:48:36.000Z | src/verify/word_count.py | privong/still-magic | 1d651840497d66d44ff43528f6e1f38e698ce168 | [
"CC-BY-4.0"
] | null | null | null | import sys
num_words = 0
count = {}
for word in sys.stdin:
num_words += 1
count[word] = count.get(word, 0) + 1
for word in count:
print('{} {}', word, count[word])
with open('logfile.csv', 'a') as logger:
logger.write('word_count.py,num_words,{}\n'.format(num_words))
logger.write('word_count.py,num... | 27.384615 | 70 | 0.648876 | import sys
num_words = 0
count = {}
for word in sys.stdin:
num_words += 1
count[word] = count.get(word, 0) + 1
for word in count:
print('{} {}', word, count[word])
with open('logfile.csv', 'a') as logger:
logger.write('word_count.py,num_words,{}\n'.format(num_words))
logger.write('word_count.py,num... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ebeec0234d92bb2d9070e26f0c45f95a600d814b | 300 | py | Python | examples/inverted_pendulum/one_link_runs.py | ashander/opty | 85f8c5d75c924d393edcbc07324088c3266bca31 | [
"BSD-2-Clause-FreeBSD"
] | 63 | 2015-03-07T19:38:10.000Z | 2022-03-31T17:17:53.000Z | examples/inverted_pendulum/one_link_runs.py | ashander/opty | 85f8c5d75c924d393edcbc07324088c3266bca31 | [
"BSD-2-Clause-FreeBSD"
] | 52 | 2015-02-15T17:24:03.000Z | 2021-06-18T16:43:45.000Z | examples/inverted_pendulum/one_link_runs.py | ashander/opty | 85f8c5d75c924d393edcbc07324088c3266bca31 | [
"BSD-2-Clause-FreeBSD"
] | 22 | 2015-05-25T21:28:16.000Z | 2022-03-14T03:55:57.000Z | from pendulum import Identifier
num_links = 1
sample_rate = 100.0
init_type = 'random'
sensor_noise = True
duration = 10.0
for i in range(20):
identifier = Identifier(num_links, duration, sample_rate, init_type,
sensor_noise, False, False)
identifier.identify()
| 23.076923 | 72 | 0.683333 | from pendulum import Identifier
num_links = 1
sample_rate = 100.0
init_type = 'random'
sensor_noise = True
duration = 10.0
for i in range(20):
identifier = Identifier(num_links, duration, sample_rate, init_type,
sensor_noise, False, False)
identifier.identify()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d56e19f8410b988a477a969567156413be055ccd | 1,499 | py | Python | train_ResNet_cifar.py | kwonsungil/Faster-RCNN | 673879871a87f60d992eae24e0d8c6a6c0a22cec | [
"Apache-2.0"
] | null | null | null | train_ResNet_cifar.py | kwonsungil/Faster-RCNN | 673879871a87f60d992eae24e0d8c6a6c0a22cec | [
"Apache-2.0"
] | null | null | null | train_ResNet_cifar.py | kwonsungil/Faster-RCNN | 673879871a87f60d992eae24e0d8c6a6c0a22cec | [
"Apache-2.0"
] | null | null | null | import numpy as np
from models.ResNet_cifar import ResNet
from utils.load_cifar import load_train
if __name__ == '__main__':
nnum_classes = 10
batch_size = 128
epochs = 100
train_x, train_y = load_train(nnum_classes)
net = ResNet(True)
train_set_len = train_x.shape[0]
r_idx... | 34.860465 | 118 | 0.575717 | import numpy as np
import os
import pickle
from models.ResNet_cifar import ResNet
from utils.load_cifar import load_train
if __name__ == '__main__':
nnum_classes = 10
batch_size = 128
epochs = 100
train_x, train_y = load_train(nnum_classes)
net = ResNet(True)
train_set_len = t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -20 | 46 |
0dd45a4c1483a9359fd50b2f7912fc5c5c5c34da | 11,837 | py | Python | nvtabular/groupby.py | rjzamora/NVTabular | 068ce230b34b0eeae3fd15379291a0e79632b731 | [
"Apache-2.0"
] | null | null | null | nvtabular/groupby.py | rjzamora/NVTabular | 068ce230b34b0eeae3fd15379291a0e79632b731 | [
"Apache-2.0"
] | null | null | null | nvtabular/groupby.py | rjzamora/NVTabular | 068ce230b34b0eeae3fd15379291a0e79632b731 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 39.195364 | 100 | 0.530709 | #
# Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 0 | 0 | 0 | 11,159 | 0 | 0 | 0 | -27 | 112 |
1c6767b3796c48b41209477099da1adff5686cd7 | 662 | py | Python | migrations/versions/825d555af49_bill_versions_enacted.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | migrations/versions/825d555af49_bill_versions_enacted.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | migrations/versions/825d555af49_bill_versions_enacted.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | """bill-versions-enacted
Revision ID: 825d555af49
Revises: 3101ec185bdf
Create Date: 2015-12-08 08:35:52.703472
"""
# revision identifiers, used by Alembic.
revision = '825d555af49'
down_revision = '3101ec185bdf'
| 24.518519 | 120 | 0.705438 | """bill-versions-enacted
Revision ID: 825d555af49
Revises: 3101ec185bdf
Create Date: 2015-12-08 08:35:52.703472
"""
# revision identifiers, used by Alembic.
revision = '825d555af49'
down_revision = '3101ec185bdf'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alem... | 0 | 0 | 0 | 0 | 0 | 350 | 0 | 3 | 91 |
15bb3f8c0b20ec4171272b2b9585e828d86f8694 | 1,165 | py | Python | core/mail.py | Shaffron/qtpie | d41e719477558584aea14fc8724d0faf01dab2bd | [
"MIT"
] | null | null | null | core/mail.py | Shaffron/qtpie | d41e719477558584aea14fc8724d0faf01dab2bd | [
"MIT"
] | 10 | 2020-03-31T09:54:38.000Z | 2021-08-23T20:28:52.000Z | core/mail.py | Shaffron/qtpie | d41e719477558584aea14fc8724d0faf01dab2bd | [
"MIT"
] | null | null | null |
'''
django.core.mail
from django.core.mail import send_mail
send_mail(
'Subject here',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False,
)
[ settings.py ]
EMAIL_BACKEND
EMAIL_FILE_PATH
EMAIL_HOST
EMAIL_HOST_PASSWORD
EMAIL_HOST_USER
EMAIL_PORT
EMAIL_SSL_CER... | 19.416667 | 56 | 0.656652 | import smtplib
from email.mime.text import MIMEText
'''
이거 버리고 django.core.mail 사용하기
from django.core.mail import send_mail
send_mail(
'Subject here',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False,
)
[ settings.py 설정값들 ]
EMAIL_BACKEND
EMAIL_FILE_PATH
EMAIL_... | 39 | 479 | 0 | 197 | 0 | 0 | 0 | 8 | 66 |
4c23276f93dc613fd18302346d3e93c749f7dadc | 3,746 | py | Python | core/settings.py | kalaLokia/fbr_live_production | e793a00356adbc1823b896ce7a3c0a58001eb011 | [
"MIT"
] | null | null | null | core/settings.py | kalaLokia/fbr_live_production | e793a00356adbc1823b896ce7a3c0a58001eb011 | [
"MIT"
] | null | null | null | core/settings.py | kalaLokia/fbr_live_production | e793a00356adbc1823b896ce7a3c0a58001eb011 | [
"MIT"
] | null | null | null | """
Main configurations of the application, this file needed to be loaded initially.
"""
import configparser
import os
from . import ROOT, CONNECTION_STRING, LOG_SUNDAY, MIN_PRODUCTION, PRODUCTION_START_HOUR
from .log_me import logMessage
if not os.path.exists(ROOT):
os.makedirs(ROOT)
SLACK_WH = None
DISCORD_W... | 32.573913 | 88 | 0.599306 | """
Main configurations of the application, this file needed to be loaded initially.
"""
import configparser
import os
from . import ROOT, CONNECTION_STRING, LOG_SUNDAY, MIN_PRODUCTION, PRODUCTION_START_HOUR
from .log_me import logMessage
if not os.path.exists(ROOT):
os.makedirs(ROOT)
SLACK_WH = None
DISCORD_W... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
abe28dbb7a9606c85b5e2ef9fa54be539aebaec3 | 544 | py | Python | apps/comics/migrations/0041_auto_20200621_1553.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | 50 | 2018-09-14T20:43:07.000Z | 2022-02-02T03:16:12.000Z | apps/comics/migrations/0041_auto_20200621_1553.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | null | null | null | apps/comics/migrations/0041_auto_20200621_1553.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | 7 | 2018-10-16T19:22:55.000Z | 2022-01-05T02:01:44.000Z | # Generated by Django 3.0.7 on 2020-06-21 15:53
| 23.652174 | 63 | 0.612132 | # Generated by Django 3.0.7 on 2020-06-21 15:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comics', '0040_linkedsocialplatform_requires_money'),
]
operations = [
migrations.RemoveField(
model_name='linkedsocialplatform'... | 0 | 0 | 0 | 430 | 0 | 0 | 0 | 19 | 46 |
d9d4ad5b8efeb904f43847d591df9604686969cc | 1,626 | py | Python | tests/snc/agents/hedgehog/asymptotic_covariance/test_computer_asymptotic_cov_bernoulli_service_interface.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 5 | 2021-03-24T16:23:10.000Z | 2021-11-17T12:44:51.000Z | tests/snc/agents/hedgehog/asymptotic_covariance/test_computer_asymptotic_cov_bernoulli_service_interface.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 3 | 2021-03-26T01:16:08.000Z | 2021-05-08T22:06:47.000Z | tests/snc/agents/hedgehog/asymptotic_covariance/test_computer_asymptotic_cov_bernoulli_service_interface.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 2 | 2021-03-24T17:20:06.000Z | 2021-04-19T09:01:12.000Z |
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_and_arrivals import ComputeAsymptoticCovBernoulliServiceAndArrivals
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_poisson_arrivals import ComputeAsymptoticCovBernoulliServic... | 39.658537 | 100 | 0.830873 | import numpy as np
import pytest
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_and_arrivals \
import ComputeAsymptoticCovBernoulliServiceAndArrivals
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_poisson_arrivals \
... | 0 | 182 | 0 | 0 | 0 | 847 | 0 | 17 | 181 |
53db234b40ed5f4ee788777a29aedb4f2a88eef7 | 1,421 | py | Python | 2021/scratchpad/day_24_wolfram1.py | apple-phi/Advent-of-Code | 7227b5692eb456f23afd1a9f93a44c48436cb1ad | [
"Unlicense"
] | null | null | null | 2021/scratchpad/day_24_wolfram1.py | apple-phi/Advent-of-Code | 7227b5692eb456f23afd1a9f93a44c48436cb1ad | [
"Unlicense"
] | null | null | null | 2021/scratchpad/day_24_wolfram1.py | apple-phi/Advent-of-Code | 7227b5692eb456f23afd1a9f93a44c48436cb1ad | [
"Unlicense"
] | null | null | null |
with open("i") as f:
data = f.read().splitlines()
print(simplify_data(data)["z"])
| 29.604167 | 81 | 0.564391 | from typing import *
class CustomDict(dict):
def __getitem__(self, key):
if key not in self:
return int(key)
return super().__getitem__(key)
def parse_instr(instr: str, *params: str, var_map: dict, input_iter: Iterator):
if instr == "inp":
var_map[params[0]] = next(input_... | 0 | 0 | 0 | 130 | 0 | 1,108 | 0 | -1 | 91 |
f8b368344adb9fdf26b8972dbfb79fe854662c67 | 125 | py | Python | home/urls.py | mdpe-ir/mdCms | 69aea3687a2b9d7846b196c00a0cd3866c54fd4c | [
"BSD-3-Clause-Attribution"
] | 1 | 2021-03-09T19:03:35.000Z | 2021-03-09T19:03:35.000Z | home/urls.py | mdpe-ir/mdCms | 69aea3687a2b9d7846b196c00a0cd3866c54fd4c | [
"BSD-3-Clause-Attribution"
] | null | null | null | home/urls.py | mdpe-ir/mdCms | 69aea3687a2b9d7846b196c00a0cd3866c54fd4c | [
"BSD-3-Clause-Attribution"
] | 1 | 2021-11-13T06:04:33.000Z | 2021-11-13T06:04:33.000Z | from django.urls import path
app_name = 'home'
urlpatterns = [
path('<slug>', index, name='home'),
]
| 17.857143 | 36 | 0.664 | from django.urls import path
from .views import *
app_name = 'home'
urlpatterns = [
path('<slug>', index, name='home'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
9458a24a25f2d4c036eb618cfbe0ca2e7bcbc16f | 141 | py | Python | fusesoc/capi2/__init__.py | idex-biometrics/fusesoc | 58bbb864723112e9bfd7e02a17749800225815e9 | [
"BSD-2-Clause"
] | 829 | 2015-03-10T12:28:42.000Z | 2022-03-28T02:44:12.000Z | fusesoc/capi2/__init__.py | idex-biometrics/fusesoc | 58bbb864723112e9bfd7e02a17749800225815e9 | [
"BSD-2-Clause"
] | 460 | 2015-01-26T18:03:19.000Z | 2022-03-30T08:30:41.000Z | fusesoc/capi2/__init__.py | idex-biometrics/fusesoc | 58bbb864723112e9bfd7e02a17749800225815e9 | [
"BSD-2-Clause"
] | 177 | 2015-02-02T13:58:12.000Z | 2022-03-30T20:56:21.000Z | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
| 35.25 | 67 | 0.794326 | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
638e099a8fe7bfbdb8ba7e6197e7eb8943cc0296 | 819 | py | Python | examples/async_experiment_3.py | sandutsar/pyinstrument | d3c45164a385021f366c1081baec18a1a226a573 | [
"BSD-3-Clause"
] | 3,768 | 2015-01-04T07:44:17.000Z | 2022-03-30T16:18:32.000Z | examples/async_experiment_3.py | sandutsar/pyinstrument | d3c45164a385021f366c1081baec18a1a226a573 | [
"BSD-3-Clause"
] | 136 | 2015-01-21T22:07:46.000Z | 2022-03-24T20:27:14.000Z | examples/async_experiment_3.py | sandutsar/pyinstrument | d3c45164a385021f366c1081baec18a1a226a573 | [
"BSD-3-Clause"
] | 177 | 2015-01-15T19:07:19.000Z | 2022-03-25T15:00:32.000Z |
import trio
trio.run(task)
| 18.2 | 63 | 0.628816 | import asyncio
import time
import trio
import pyinstrument
def do_nothing():
pass
def busy_wait(duration):
end_time = time.time() + duration
while time.time() < end_time:
do_nothing()
async def say(what, when, profile=False):
if profile:
p = pyinstrument.Profiler()
p.sta... | 0 | 0 | 543 | 0 | 0 | 102 | 0 | -19 | 159 |
160e8c205570d971714c7b71e9230402530f0d1c | 1,467 | py | Python | cibuildwheel/util.py | GjjvdBurg/cibuildwheel | 5f416b194a488b79aaab7a696e23ab6958f99932 | [
"BSD-2-Clause"
] | 1 | 2021-07-07T14:30:22.000Z | 2021-07-07T14:30:22.000Z | cibuildwheel/util.py | josh146/cibuildwheel | 38b3b0a3dad69d4c3989fe5a524020166390c293 | [
"BSD-2-Clause"
] | null | null | null | cibuildwheel/util.py | josh146/cibuildwheel | 38b3b0a3dad69d4c3989fe5a524020166390c293 | [
"BSD-2-Clause"
] | 2 | 2019-07-16T02:06:43.000Z | 2019-11-17T02:30:54.000Z |
def prepare_command(command, project):
'''
Preprocesses a command by expanding variables like {project}.
For example, used in the test_command option, to specify the path to the
tests directory.
'''
return command.format(python='python', pip='pip', project=project)
# Taken from https://st... | 27.679245 | 111 | 0.657805 | from fnmatch import fnmatch
import warnings
def prepare_command(command, project):
'''
Preprocesses a command by expanding variables like {project}.
For example, used in the test_command option, to specify the path to the
tests directory.
'''
return command.format(python='python', pip='pip', ... | 0 | 0 | 0 | 851 | 0 | 159 | 0 | 0 | 112 |
dffefedf4722660bfa1a035fbf6b5f10872b1e3e | 9,328 | py | Python | models.py | JeffreyTsang/Brickbreaker | 37f0d143e9f937027fc281aef1511d0e9c804b8b | [
"MIT"
] | null | null | null | models.py | JeffreyTsang/Brickbreaker | 37f0d143e9f937027fc281aef1511d0e9c804b8b | [
"MIT"
] | null | null | null | models.py | JeffreyTsang/Brickbreaker | 37f0d143e9f937027fc281aef1511d0e9c804b8b | [
"MIT"
] | null | null | null | # models.py
# Michael Huang (mh999), Jeffrey Tsang (jet253)
# December 3rd, 2016
"""Models module for Breakout
This module contains the model classes for the Breakout game. That is anything that you
interact with on the screen is model: the paddle, the ball, and any of the bricks.
Technically, just because something ... | 40.206897 | 89 | 0.650836 | # models.py
# Michael Huang (mh999), Jeffrey Tsang (jet253)
# December 3rd, 2016
"""Models module for Breakout
This module contains the model classes for the Breakout game. That is anything that you
interact with on the screen is model: the paddle, the ball, and any of the bricks.
Technically, just because something ... | 0 | 0 | 0 | 8,059 | 0 | 0 | 0 | -7 | 175 |
543dbe56b8a9f46a7e6cfdb575bff7fc61babb0b | 2,718 | py | Python | tests.py | afcarl/campaign-bot | db82b41b5a764673f60ce744c72d201e702c7a1d | [
"MIT"
] | 1 | 2019-04-22T16:46:06.000Z | 2019-04-22T16:46:06.000Z | tests.py | afcarl/campaign-bot | db82b41b5a764673f60ce744c72d201e702c7a1d | [
"MIT"
] | null | null | null | tests.py | afcarl/campaign-bot | db82b41b5a764673f60ce744c72d201e702c7a1d | [
"MIT"
] | null | null | null | """ super simple tests """
import os
from jinja2 import Environment, FileSystemLoader
jinja_environment = Environment(autoescape=True,loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
test_filing = {
'date': 'today',
'committees': [
{
'committee_name': 'test co... | 33.975 | 126 | 0.511038 | """ super simple tests """
import os
import mail_script
import requests
from jinja2 import Template, Environment, FileSystemLoader
jinja_environment = Environment(autoescape=True,loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
test_filing = {
'date': 'today',
'committees': [
... | 0 | 0 | 0 | 0 | 0 | 236 | 0 | 1 | 92 |
9c83e77ead949d28aa78d167f38b9d3cb628f582 | 9,620 | py | Python | zaza/charm_tests/test_utils.py | yoshikado/zaza | b2dbf7aa47b709b79b941dc0a017ce651b9e0cb5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_tests/test_utils.py | yoshikado/zaza | b2dbf7aa47b709b79b941dc0a017ce651b9e0cb5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_tests/test_utils.py | yoshikado/zaza | b2dbf7aa47b709b79b941dc0a017ce651b9e0cb5 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-06-25T09:52:11.000Z | 2019-06-25T09:52:11.000Z | # Copyright 2018 Canonical 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 in writin... | 40.251046 | 79 | 0.62474 | # Copyright 2018 Canonical 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 in writin... | 0 | 5,566 | 0 | 2,652 | 0 | 368 | 0 | 43 | 159 |
9ed3b9df069b19db2b97f052b0de3f3663c36562 | 1,745 | py | Python | py/torch_tensorrt/fx/test/trt_lower/test_observer_gpu.py | hassan11196/Torch-TensorRT | a2d0d0e935bf223523a7c28d7814cdbd32f323b2 | [
"BSD-3-Clause"
] | 430 | 2021-11-09T08:08:01.000Z | 2022-03-31T10:13:45.000Z | py/torch_tensorrt/fx/test/trt_lower/test_observer_gpu.py | NVIDIA/Torch-TensorRT | 1a22204fecec690bc3c2a318dab4f57b98c57f05 | [
"BSD-3-Clause"
] | 257 | 2021-11-09T07:17:03.000Z | 2022-03-31T20:29:31.000Z | py/torch_tensorrt/fx/test/trt_lower/test_observer_gpu.py | hassan11196/Torch-TensorRT | a2d0d0e935bf223523a7c28d7814cdbd32f323b2 | [
"BSD-3-Clause"
] | 68 | 2021-11-10T05:03:22.000Z | 2022-03-22T17:07:32.000Z | # Owner(s): ["oncall: gpu_enablement"]
| 32.314815 | 78 | 0.629226 | # Owner(s): ["oncall: gpu_enablement"]
import functools
from unittest import TestCase
import torch_tensorrt.fx.observer as ob
from test_observer import execution_verifier, set_observer_callback_rethrow
from torch_tensorrt.fx.passes.lower_basic_pass import fuse_permute_linear
class ObserverGPUTests(TestCase):
@se... | 0 | 1,406 | 0 | 12 | 0 | 0 | 0 | 127 | 160 |
353e36f4f35b597ef0dcf8b5ab98d766ea5a7e74 | 13,078 | py | Python | BCL2FASTQPostprocessor.py | EdinburghGenomics/illuminatus | c92d6448675fb451f2dc284d67db1711f2974c74 | [
"BSD-2-Clause"
] | 1 | 2020-02-15T00:18:51.000Z | 2020-02-15T00:18:51.000Z | BCL2FASTQPostprocessor.py | EdinburghGenomics/illuminatus | c92d6448675fb451f2dc284d67db1711f2974c74 | [
"BSD-2-Clause"
] | 1 | 2021-03-30T10:50:38.000Z | 2021-03-30T10:50:39.000Z | BCL2FASTQPostprocessor.py | EdinburghGenomics/illuminatus | c92d6448675fb451f2dc284d67db1711f2974c74 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
""" "Fixes" the output of bcl2fastq to meet our requirements.
Files are renamed, grouped by pool, and shifted out of the demultiplexing directory.
projects_ready.txt is added listing the projects found
projects_pending.txt is deleted if it exists
"""
# I guess we could go back to kee... | 41.125786 | 109 | 0.61332 | #!/usr/bin/env python3
""" "Fixes" the output of bcl2fastq to meet our requirements.
Files are renamed, grouped by pool, and shifted out of the demultiplexing directory.
projects_ready.txt is added listing the projects found
projects_pending.txt is deleted if it exists
"""
# I guess we could go back to kee... | 0 | 0 | 0 | 0 | 0 | 489 | 0 | 0 | 114 |
299d61d1196dddc6c524858100a86c524836b0be | 2,599 | py | Python | scripts/automated-scripts/kit/scrapper.py | ksripathi/ui-1.0-toolkit | b32cd482b455ccfb0581ba3cee48108a02f7201c | [
"MIT"
] | null | null | null | scripts/automated-scripts/kit/scrapper.py | ksripathi/ui-1.0-toolkit | b32cd482b455ccfb0581ba3cee48108a02f7201c | [
"MIT"
] | null | null | null | scripts/automated-scripts/kit/scrapper.py | ksripathi/ui-1.0-toolkit | b32cd482b455ccfb0581ba3cee48108a02f7201c | [
"MIT"
] | null | null | null | #!/usr/bin/python
import re
import os
import sys
from bs4 import BeautifulSoup
if __name__ == '__main__':
try:
labContent = driveContentScrappers()
serializeLabContent(labContent)
except Exception, e:
print 'Exception! ', e
#raise
| 32.4875 | 120 | 0.734898 | #!/usr/bin/python
import re
import os
import sys
from bs4 import BeautifulSoup
def getIndexDotHtmlFiles():
return filter(lambda fname: True if re.match(r'index\.html*', fname) else False, \
os.listdir('.'))
def contentScrapper(fname):
#print 'I am in contentScrapper', fname
f = open(fname, "r")
s... | 0 | 0 | 0 | 0 | 0 | 2,262 | 0 | 0 | 93 |
759d74d5bfe408f60d4fce2cff0968d98ac2f59c | 1,508 | py | Python | test/utils/command_to_test.py | gantzgraf/vape | f939cb527d72d852cb0919a57332110c15c5fd4a | [
"MIT"
] | 4 | 2020-03-25T06:09:39.000Z | 2021-03-23T11:22:00.000Z | test/utils/command_to_test.py | gantzgraf/vape | f939cb527d72d852cb0919a57332110c15c5fd4a | [
"MIT"
] | 1 | 2020-10-02T14:50:30.000Z | 2020-10-12T15:24:24.000Z | test/utils/command_to_test.py | gantzgraf/vape | f939cb527d72d852cb0919a57332110c15c5fd4a | [
"MIT"
] | 1 | 2021-02-20T11:32:34.000Z | 2021-02-20T11:32:34.000Z | #!/usr/bin/env python3
import sys
import re
arg_re = re.compile(r'--\S+')
if __name__ == '__main__':
if len(sys.argv) != 2:
sys.exit("Usage: {} tests.sh\n".format(sys.argv[0]))
main(sys.argv[1])
| 28.45283 | 67 | 0.408488 | #!/usr/bin/env python3
import sys
import re
arg_re = re.compile(r'--\S+')
def output_args(args, func):
print('''
def {}():
output = get_tmp_out()
test_args = dict('''.format(func))
for x in args:
print(" {}={},".format(x[0].replace("-", ""), x[1]))
print(''' output=output,
... | 0 | 0 | 0 | 0 | 0 | 1,245 | 0 | 0 | 46 |
966179a164e51151330f8b14be5ec6adc1c899a7 | 3,398 | py | Python | coax/utils/_misc_test.py | sleepy-owl/coax | 37c3e667b81537768beb25bb59d0f05124624128 | [
"MIT"
] | null | null | null | coax/utils/_misc_test.py | sleepy-owl/coax | 37c3e667b81537768beb25bb59d0f05124624128 | [
"MIT"
] | null | null | null | coax/utils/_misc_test.py | sleepy-owl/coax | 37c3e667b81537768beb25bb59d0f05124624128 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------------------------ #
# MIT License #
# #
# Copyright (c) 2... | 41.950617 | 100 | 0.472631 | # ------------------------------------------------------------------------------------------------ #
# MIT License #
# #
# Copyright (c) 2... | 0 | 19 | 0 | 0 | 0 | 1,191 | 0 | 6 | 159 |
dec8d2fcabc5d2693c110d790d4c8a005a3bc037 | 148 | py | Python | main/admin.py | Unviray/Internet-consumption | b6b7a7d27c20f3a0dad24f801be1c19f2f685bb2 | [
"MIT"
] | null | null | null | main/admin.py | Unviray/Internet-consumption | b6b7a7d27c20f3a0dad24f801be1c19f2f685bb2 | [
"MIT"
] | null | null | null | main/admin.py | Unviray/Internet-consumption | b6b7a7d27c20f3a0dad24f801be1c19f2f685bb2 | [
"MIT"
] | null | null | null | """
main.admin
==========
"""
from django.contrib import admin
from .models import InternetConsumption
admin.site.register(InternetConsumption)
| 12.333333 | 40 | 0.72973 | """
main.admin
==========
"""
from django.contrib import admin
from .models import InternetConsumption
admin.site.register(InternetConsumption)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67d58d168e90ba1d0a25d1919d7162e9097f1c6e | 9,043 | py | Python | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/cloud/openstack/os_user.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/cloud/openstack/os_user.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/cloud/openstack/os_user.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | 31.729825 | 84 | 0.608095 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | 0 | 0 | 0 | 0 | 0 | 4,738 | 0 | 33 | 163 |
33c2d5b3fc9db8a4cc6fabb36d76ee63fc85b395 | 423 | py | Python | python-libraries/collections/re/re_option_verbose.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | python-libraries/collections/re/re_option_verbose.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | python-libraries/collections/re/re_option_verbose.py | nkhn37/python-tech-sample-source | e8aea7ed3d810494682b3c2dde952ddd0f7acf84 | [
"MIT"
] | null | null | null | """ re
(VERBOSE)
[]
https://tech.nkhn37.net/python-re-options/#VERBOSE
"""
import re
text = 'user_01@test.com'
ptrn = re.compile(r'''([a-z0-9_.+-]+) #local
@ #delimiter
([a-z0-9][a-z0-9-]*[a-z0-9]*\.)+[a-z]{2,} #domain''',
re.VERBOSE)
if result := ptrn... | 22.263158 | 75 | 0.550827 | """正規表現モジュール re の使い方
オプション:空行/コメントを付与して正規表現を見やすくする (VERBOSE)
[説明ページ]
https://tech.nkhn37.net/python-re-options/#VERBOSE
"""
import re
text = '私のメールアドレスは、user_01@test.comです。'
ptrn = re.compile(r'''([a-z0-9_.+-]+) #local
@ #delimiter
([a-z0-9][a-z0-9-]*[a-z0-9]*\.)+[a-z]{2,}... | 183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
671300b770bf9c3369c6c23582656d5224123c9a | 25,035 | py | Python | molmod/importer/importer.py | pragermh/mol-mod | 2cf1ea6808c0142bb6c885313fec0b26a3a917d6 | [
"CC0-1.0"
] | null | null | null | molmod/importer/importer.py | pragermh/mol-mod | 2cf1ea6808c0142bb6c885313fec0b26a3a917d6 | [
"CC0-1.0"
] | 15 | 2020-10-13T11:53:08.000Z | 2021-06-08T08:34:49.000Z | molmod/importer/importer.py | pragermh/mol-mod | 2cf1ea6808c0142bb6c885313fec0b26a3a917d6 | [
"CC0-1.0"
] | 4 | 2020-11-20T10:40:26.000Z | 2022-02-10T09:00:58.000Z | #!/usr/bin/env python3
"""
The mol-mod data importer takes an Excel or Tar file stream, then rearranges
and inserts the data into the database. The script is executed inside a running
container using the import_excel.py wrapper.
"""
import hashlib
import json
import logging
import os
import re
import select
import sys... | 34.867688 | 79 | 0.602237 | #!/usr/bin/env python3
"""
The mol-mod data importer takes an Excel or Tar file stream, then rearranges
and inserts the data into the database. The script is executed inside a running
container using the import_excel.py wrapper.
"""
import hashlib
import json
import logging
import os
import re
import select
import sys... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
523087f5c9b541dd171447caeea6a7c8373464ea | 33,904 | py | Python | upddatedb_pi.py | LTAcosta/TBN-Plex | 35e9eaf20d38c4b2770070932b5b8f48ced1e6a3 | [
"MIT"
] | 2 | 2020-12-19T22:16:52.000Z | 2021-05-31T23:53:12.000Z | upddatedb_pi.py | LTAcosta/TBN-Plex | 35e9eaf20d38c4b2770070932b5b8f48ced1e6a3 | [
"MIT"
] | null | null | null | upddatedb_pi.py | LTAcosta/TBN-Plex | 35e9eaf20d38c4b2770070932b5b8f48ced1e6a3 | [
"MIT"
] | 1 | 2018-01-10T09:40:43.000Z | 2018-01-10T09:40:43.000Z | import urllib3
import sys
import sqlite3
import platform
#top
try:
input = raw_input
except NameError:
pass
global favtv
global favmve
global tvgenres
global moviegenres
favtv = []
favmve = []
tvgenres = []
moviegenres = []
MYDB = homedir + "myplex.db"
http = urllib3.PoolManager()
sql = sqlite3.connect(MYDB)
cur... | 26.039939 | 191 | 0.602259 | import urllib3
import subprocess
import requests
import time
import os
import sys
import sqlite3
import platform
#top
try:
input = raw_input
except NameError:
pass
global favtv
global favmve
global tvgenres
global moviegenres
favtv = []
favmve = []
tvgenres = []
moviegenres = []
MYDB = homedir + "myplex.db"
http ... | 0 | 0 | 0 | 0 | 0 | 29,887 | 0 | -32 | 502 |
45ad8a2491616a12823e7c286b15c945f03ec986 | 1,541 | py | Python | chat/views.py | chyuting/dj4e-samples | bbe3dcd214789e4be96dd2460018524f8078b4e3 | [
"MIT"
] | 1 | 2021-01-29T15:00:43.000Z | 2021-01-29T15:00:43.000Z | chat/views.py | Lucasmiguelmac/dj4e-samples | a636ce0d49e57bebd098b271ff9356555e468577 | [
"MIT"
] | null | null | null | chat/views.py | Lucasmiguelmac/dj4e-samples | a636ce0d49e57bebd098b271ff9356555e468577 | [
"MIT"
] | null | null | null |
# References
# https://simpleisbetterthancomplex.com/tutorial/2016/07/27/how-to-return-json-encoded-response.html
| 32.104167 | 100 | 0.699546 | from django.shortcuts import render, redirect, reverse
from django.views import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.http import JsonResponse, HttpResponse
from chat.models import Message
from datetime import dat... | 0 | 0 | 0 | 849 | 0 | 134 | 0 | 173 | 268 |
12ac692d0a10589809a84612868ff0ec0d7b7906 | 7,605 | py | Python | src/sentry/web/frontend/accounts.py | mattrobenolt/sentry | 3468714db277391de6cbcfda20842e6b460eecb3 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/accounts.py | mattrobenolt/sentry | 3468714db277391de6cbcfda20842e6b460eecb3 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/accounts.py | mattrobenolt/sentry | 3468714db277391de6cbcfda20842e6b460eecb3 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
| 31.820084 | 101 | 0.673899 | """
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import itertools
from django.contrib import messages
from django.contrib.auth import login as lo... | 0 | 4,013 | 0 | 0 | 0 | 2,255 | 0 | 570 | 538 |
0ac7bc4c005624506cc0f66028b041697831c329 | 8,696 | py | Python | fonts/OpenTypeMath/Asana-Math/config.py | Klortho/MathJax-dev | e9aa047a806b645b6a87ef1ca1017775d57a7761 | [
"Apache-2.0"
] | 1 | 2019-12-13T14:54:24.000Z | 2019-12-13T14:54:24.000Z | fonts/OpenTypeMath/Asana-Math/config.py | Klortho/MathJax-dev | e9aa047a806b645b6a87ef1ca1017775d57a7761 | [
"Apache-2.0"
] | null | null | null | fonts/OpenTypeMath/Asana-Math/config.py | Klortho/MathJax-dev | e9aa047a806b645b6a87ef1ca1017775d57a7761 | [
"Apache-2.0"
] | null | null | null | # -*- Mode: Python; tab-width: 2; indent-tabs-mode:nil; -*-
# vim: set ts=2 et sw=2 tw=80:
#
# Copyright (c) 2013 MathJax Project
#
# 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://ww... | 27.606349 | 84 | 0.554163 | # -*- Mode: Python; tab-width: 2; indent-tabs-mode:nil; -*-
# vim: set ts=2 et sw=2 tw=80:
#
# Copyright (c) 2013 MathJax Project
#
# 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://ww... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
490f550c2793789f398c35b62fd7284c7ce09273 | 1,716 | py | Python | dags/pyspark/enem_join_final.py | edgallojr/igti-edc-mod4 | 199b8c1cafa295ae49b1b23b830dfc6d21db7f9c | [
"MIT"
] | null | null | null | dags/pyspark/enem_join_final.py | edgallojr/igti-edc-mod4 | 199b8c1cafa295ae49b1b23b830dfc6d21db7f9c | [
"MIT"
] | null | null | null | dags/pyspark/enem_join_final.py | edgallojr/igti-edc-mod4 | 199b8c1cafa295ae49b1b23b830dfc6d21db7f9c | [
"MIT"
] | null | null | null | from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
# set conf
conf = (
SparkConf()
.set("spark.hadoop.fs.s3a.fast.upload", True)
.set("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem")
.set('spark.hadoop.fs.s3a.aws.credentials.provider', 'com.amazonaws.auth.... | 24.169014 | 117 | 0.567599 | from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
# set conf
conf = (
SparkConf()
.set("spark.hadoop.fs.s3a.fast.upload", True)
.set("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem")
.set('spark.hadoop.fs.s3a.aws.credentials.provider', 'com.amazonaws.auth.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2adf70534d48e48c16a4e653ed9e91daa879d5eb | 500 | py | Python | api/migrations/20210706_01_a9a26-fix-flores-description.py | zpapakipos/dynabench-1 | 95884b4e29c57263dc1a85909be979c084d5fac3 | [
"MIT"
] | 15 | 2021-09-24T00:46:04.000Z | 2022-03-16T13:24:56.000Z | api/migrations/20210706_01_a9a26-fix-flores-description.py | zpapakipos/dynabench-1 | 95884b4e29c57263dc1a85909be979c084d5fac3 | [
"MIT"
] | 98 | 2021-09-22T12:33:21.000Z | 2022-03-21T22:23:52.000Z | api/migrations/20210706_01_a9a26-fix-flores-description.py | zpapakipos/dynabench-1 | 95884b4e29c57263dc1a85909be979c084d5fac3 | [
"MIT"
] | 12 | 2021-09-25T05:08:18.000Z | 2022-02-28T21:02:20.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Fix the Flores description."""
from yoyo import step
__depends__ = {"20210503_01_xxxx-add-flores-task"}
fix_desc = """Machine Translatio... | 29.411765 | 87 | 0.748 | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Fix the Flores description."""
from yoyo import step
__depends__ = {"20210503_01_xxxx-add-flores-task"}
fix_desc = """Machine Translatio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
013e2e26f5ea37158de12fb17c6167cc62c21d74 | 7,490 | py | Python | dropletbuilder/tests/test_dropletbuilder.py | ftiet/droplet-builder | 5f8a9cd548a58207e45ca77adf92453410eda377 | [
"MIT"
] | 4 | 2019-12-17T13:36:11.000Z | 2020-11-08T23:47:41.000Z | dropletbuilder/tests/test_dropletbuilder.py | rmatsum836/droplet-builder | 5f8a9cd548a58207e45ca77adf92453410eda377 | [
"MIT"
] | 1 | 2019-03-28T02:56:11.000Z | 2019-03-28T02:56:11.000Z | dropletbuilder/tests/test_dropletbuilder.py | rmatsum836/droplet-builder | 5f8a9cd548a58207e45ca77adf92453410eda377 | [
"MIT"
] | 2 | 2019-03-22T20:29:01.000Z | 2020-05-04T16:33:57.000Z |
"""
Unit Tests for Droplet class.
"""
| 40.928962 | 112 | 0.635381 | import pytest
import sys
import numpy as np
import mbuild
from dropletbuilder.utils.io_tools import get_fn
class BaseTest:
@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()
@pytest.fixture
def GoldLattice(self):
lattice_compound = mbuild.Compound(name='Au')
... | 0 | 987 | 0 | 6,201 | 0 | 0 | 0 | -3 | 264 |
faacc746284c9cb9411340754bd24b3ef1455892 | 578 | py | Python | Number_of_Tags.py | blockchainhelppro/dataanalysis-Crypto | 15941b1f64af215c89d87e9b21469bd5b9f1138b | [
"MIT"
] | null | null | null | Number_of_Tags.py | blockchainhelppro/dataanalysis-Crypto | 15941b1f64af215c89d87e9b21469bd5b9f1138b | [
"MIT"
] | null | null | null | Number_of_Tags.py | blockchainhelppro/dataanalysis-Crypto | 15941b1f64af215c89d87e9b21469bd5b9f1138b | [
"MIT"
] | null | null | null |
'''
The code below is to find out how many types of tags are there and the number of each tag.
'''
if __name__ == "__main__":
test() | 23.12 | 91 | 0.626298 | import xml.etree.cElementTree as ET
import pprint
from collections import defaultdict
import re
'''
The code below is to find out how many types of tags are there and the number of each tag.
'''
def count_tags(filename):
tags = {}
for event, element in ET.iterparse(filename):
if element.ta... | 0 | 0 | 0 | 0 | 0 | 284 | 0 | 8 | 142 |
4dde47225dc6718cce7a86dbac87d5e9e13b9956 | 188 | py | Python | packages/PIPS/validation/Effects/struct_enum01.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | packages/PIPS/validation/Effects/struct_enum01.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | packages/PIPS/validation/Effects/struct_enum01.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | from validation import vworkspace
#import os
with vworkspace() as w:
#os.environ['PROPER_EFFECTS_DEBUG_LEVEL'] = '8'
w.all_functions.display(activate="print_code_proper_effects")
| 26.857143 | 65 | 0.771277 | from validation import vworkspace
#import os
with vworkspace() as w:
#os.environ['PROPER_EFFECTS_DEBUG_LEVEL'] = '8'
w.all_functions.display(activate="print_code_proper_effects")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e85f6158ec674ad4e9ba40cb7bd212b4fe5fe4a | 699 | py | Python | aulas/Aula#9a.py | dani-fn/Projetinhos_Python | 692ff0a7f57d8f8f2e28f7b2c38bb6401e013bdb | [
"MIT"
] | null | null | null | aulas/Aula#9a.py | dani-fn/Projetinhos_Python | 692ff0a7f57d8f8f2e28f7b2c38bb6401e013bdb | [
"MIT"
] | null | null | null | aulas/Aula#9a.py | dani-fn/Projetinhos_Python | 692ff0a7f57d8f8f2e28f7b2c38bb6401e013bdb | [
"MIT"
] | null | null | null | frase = 'Curso em Vdeo Python'
print(frase.upper().count('O')) # Antes no tinha nenhum O maisculo, mas com a combinao feita, tem!
print(len(frase))
print(frase[0])
print(frase.replace('Python', 'Daniel'))
print(frase) # No contou o 'Daniel' da linha anterior!
frase = frase.replace('Python', 'Daniel')
print(... | 38.833333 | 107 | 0.692418 | frase = 'Curso em Vídeo Python'
print(frase.upper().count('O')) # Antes não tinha nenhum O maiúsculo, mas com a combinação feita, tem!
print(len(frase))
print(frase[0])
print(frase.replace('Python', 'Daniel'))
print(frase) # Não contou o 'Daniel' da linha anterior!
frase = frase.replace('Python', 'Daniel')
... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
df66dd8a2155a45d1ccc9f19b29ed5e0169da35e | 558 | py | Python | many_users.py | csy1993/PythonPractice | 67efe09f6c01a90d4d39ccce45b00fb5980535d7 | [
"Apache-2.0"
] | null | null | null | many_users.py | csy1993/PythonPractice | 67efe09f6c01a90d4d39ccce45b00fb5980535d7 | [
"Apache-2.0"
] | null | null | null | many_users.py | csy1993/PythonPractice | 67efe09f6c01a90d4d39ccce45b00fb5980535d7 | [
"Apache-2.0"
] | null | null | null | '''
* @Author: csy
* @Date: 2019-04-28 13:55:42
* @Last Modified by: csy
* @Last Modified time: 2019-04-28 13:55:42
'''
users = {
'aeinstein': {
'first': 'albert',
'last': 'einstein',
'location': 'princeton',
},
'mcurie': {
'first': 'marie',
'last': 'curie',
... | 23.25 | 64 | 0.53405 | '''
* @Author: csy
* @Date: 2019-04-28 13:55:42
* @Last Modified by: csy
* @Last Modified time: 2019-04-28 13:55:42
'''
users = {
'aeinstein': {
'first': 'albert',
'last': 'einstein',
'location': 'princeton',
},
'mcurie': {
'first': 'marie',
'last': 'curie',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f279d8497722db3069ab278db686c4ef9d42d7a2 | 378 | py | Python | blocks/__init__.py | dennisme/AESBlockCiphers | 2179a380f6ad3a1976ff8fea4f4b17b1cc3affd1 | [
"MIT"
] | null | null | null | blocks/__init__.py | dennisme/AESBlockCiphers | 2179a380f6ad3a1976ff8fea4f4b17b1cc3affd1 | [
"MIT"
] | null | null | null | blocks/__init__.py | dennisme/AESBlockCiphers | 2179a380f6ad3a1976ff8fea4f4b17b1cc3affd1 | [
"MIT"
] | null | null | null | __all__ = ['aesECB',
'aesCBC',
'aesCFB',
'aesOFB',
'aesCTR',
'padding',
'xor',
'chunk']
from blocks import aesECB
from blocks import aesCBC
from blocks import aesCFB
from blocks import aesOFB
from blocks import aesCTR
from blocks import... | 19.894737 | 26 | 0.595238 | __all__ = ['aesECB',
'aesCBC',
'aesCFB',
'aesOFB',
'aesCTR',
'padding',
'xor',
'chunk']
from blocks import aesECB
from blocks import aesCBC
from blocks import aesCFB
from blocks import aesOFB
from blocks import aesCTR
from blocks import... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa074e5e9056fb559e9b8abc0881ad6ae56b47c9 | 4,532 | py | Python | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py | fearthecowboy/autorest.python | a251e361218598b55b0621db2275aafcb7158a5c | [
"MIT"
] | null | null | null | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py | fearthecowboy/autorest.python | a251e361218598b55b0621db2275aafcb7158a5c | [
"MIT"
] | null | null | null | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py | fearthecowboy/autorest.python | a251e361218598b55b0621db2275aafcb7158a5c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 30.013245 | 106 | 0.621801 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 0 | 0 | 0 | 3,802 | 0 | 0 | 0 | 44 | 206 |
cc07f893fa695d5935ee5d0a272a35b1c4ecd157 | 5,348 | py | Python | src/oci/data_safe/models/random_digits_format_entry.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_safe/models/random_digits_format_entry.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_safe/models/random_digits_format_entry.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 40.210526 | 516 | 0.679506 | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 0 | 4,780 | 0 | 0 | 0 | 0 | 0 | 121 | 104 |
29fa035934fe9456c08fa3d09c2af1de16124dc1 | 311 | py | Python | problem_3.py | bazitur/my-euler-solutions | eb70c9866989dee16677819901b1a2e3206b2725 | [
"MIT"
] | null | null | null | problem_3.py | bazitur/my-euler-solutions | eb70c9866989dee16677819901b1a2e3206b2725 | [
"MIT"
] | null | null | null | problem_3.py | bazitur/my-euler-solutions | eb70c9866989dee16677819901b1a2e3206b2725 | [
"MIT"
] | null | null | null | #/usr/bin/env python3
if __name__ == "__main__":
print(max(factorize(int(input("Enter a number: ")))))
| 20.733333 | 57 | 0.466238 | #/usr/bin/env python3
def factorize(n):
for i in range(2, int(n ** 0.5+1)):
if n == 1:
break
while n % i == 0:
yield i
n /= i
else:
if n != 1: yield int(n)
if __name__ == "__main__":
print(max(factorize(int(input("Enter a number: ")))))
| 0 | 0 | 0 | 0 | 180 | 0 | 0 | 0 | 23 |
839bb6f494bb25acb34abb8eb5f79588bb7a6a50 | 241 | py | Python | students/K33402/Michshenko_Violetta/Lr2/django_project_Michshenko/homeworks/admin.py | mynamesvioletta/ITMO_ICT_WebDevelopment_2021-2022 | 0314e5ec29718af5570662486621983cd6c1332a | [
"MIT"
] | null | null | null | students/K33402/Michshenko_Violetta/Lr2/django_project_Michshenko/homeworks/admin.py | mynamesvioletta/ITMO_ICT_WebDevelopment_2021-2022 | 0314e5ec29718af5570662486621983cd6c1332a | [
"MIT"
] | null | null | null | students/K33402/Michshenko_Violetta/Lr2/django_project_Michshenko/homeworks/admin.py | mynamesvioletta/ITMO_ICT_WebDevelopment_2021-2022 | 0314e5ec29718af5570662486621983cd6c1332a | [
"MIT"
] | null | null | null |
# Register your models here.
| 17.214286 | 38 | 0.771784 | from django.contrib import admin
from .models import Homework, Done
@admin.register(Homework)
class Homeworkadmin(admin.ModelAdmin):
pass
@admin.register(Done)
class Doneadmin(admin.ModelAdmin):
pass
# Register your models here.
| 0 | 96 | 0 | 0 | 0 | 0 | 0 | 24 | 90 |
d935367ad31f6f824a4fef8bb25981dd415424f2 | 1,407 | py | Python | mine/renderer/train_renderer.py | jefequien/ICCV2019-LearningToPaint | 8d638a9a6782e39386b2083ea0eb85fed8c0a7ab | [
"MIT"
] | null | null | null | mine/renderer/train_renderer.py | jefequien/ICCV2019-LearningToPaint | 8d638a9a6782e39386b2083ea0eb85fed8c0a7ab | [
"MIT"
] | null | null | null | mine/renderer/train_renderer.py | jefequien/ICCV2019-LearningToPaint | 8d638a9a6782e39386b2083ea0eb85fed8c0a7ab | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.optim as optim
if __name__ == "__main__":
main()
| 21.984375 | 72 | 0.621891 | import argparse
import os
import random
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from gym_dataset import GymDataset
from gym_canvas import CanvasEnv
from model import FCN
class RendererTrainer:
def __init__(self, env, model):
self.device = t... | 0 | 0 | 0 | 890 | 0 | 196 | 0 | 7 | 225 |
896f54576f48c217af8bc801ac04da0c61b592f3 | 398 | py | Python | resources/models/incidentModel.py | Jonasdart/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | null | null | null | resources/models/incidentModel.py | Jonasdart/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | 1 | 2020-05-21T18:25:07.000Z | 2020-05-21T18:25:07.000Z | resources/models/incidentModel.py | duzzsys/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | 1 | 2020-11-22T19:19:45.000Z | 2020-11-22T19:19:45.000Z | #encoding utf-8
#__author__ = Jonas Duarte, duarte.jsystem@gmail.com
#Python3
__author__ = 'Jonas Duarte'
| 19.9 | 60 | 0.748744 | #encoding utf-8
#__author__ = Jonas Duarte, duarte.jsystem@gmail.com
#Python3
__author__ = 'Jonas Duarte'
class IncidentModel():
def _search_incidents_by_name(self, name):
raise NotImplementedError
def _search_incidents_by_description(self, description):
raise NotImplementedError
de... | 0 | 0 | 0 | 268 | 0 | 0 | 0 | 0 | 23 |
6fb5fa8c1118a7d60cd0ea69433cc2b5d47fc852 | 4,116 | py | Python | setup.py | Dalbasar/background-zmq-ipython | 6b9b523b01a3424999404a2af6037ff4945d13e0 | [
"BSD-2-Clause"
] | 12 | 2019-05-30T09:34:21.000Z | 2022-03-14T04:43:54.000Z | setup.py | Dalbasar/background-zmq-ipython | 6b9b523b01a3424999404a2af6037ff4945d13e0 | [
"BSD-2-Clause"
] | 11 | 2019-09-28T10:52:16.000Z | 2022-03-14T05:06:54.000Z | setup.py | Dalbasar/background-zmq-ipython | 6b9b523b01a3424999404a2af6037ff4945d13e0 | [
"BSD-2-Clause"
] | 3 | 2020-02-01T01:26:26.000Z | 2021-12-14T19:29:56.000Z |
"""
Usage:
Create ~/.pypirc with info:
[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: ...
password: ...
(Not needed anymore) Registering the project: python3 setup.py register
New release: python3 setup.py sdist upload
I had some troub... | 28 | 102 | 0.63484 |
"""
Usage:
Create ~/.pypirc with info:
[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: ...
password: ...
(Not needed anymore) Registering the project: python3 setup.py register
New release: python3 setup.py sdist upload
I had some troub... | 0 | 0 | 0 | 0 | 0 | 1,196 | 0 | 31 | 159 |
9b8bb54dc558a7e41047440e0f04aef4061a7ef6 | 477 | py | Python | instance/config.py | paulzay/Sendit2 | e1da79c4c49547ac63834338583bfb39f9e2b25c | [
"MIT"
] | 3 | 2019-01-23T11:15:24.000Z | 2020-08-06T11:56:39.000Z | instance/config.py | paulzay/Sendit2 | e1da79c4c49547ac63834338583bfb39f9e2b25c | [
"MIT"
] | null | null | null | instance/config.py | paulzay/Sendit2 | e1da79c4c49547ac63834338583bfb39f9e2b25c | [
"MIT"
] | 1 | 2019-01-24T05:38:07.000Z | 2019-01-24T05:38:07.000Z |
app_config = dict(
development = DevelopmentConfig,
testing = TestingConfig,
production = ProductionConfig
) | 17.035714 | 36 | 0.679245 | import os
class BaseConfig:
DEBUG = False
TESTING = False
class DevelopmentConfig(BaseConfig):
ENV = 'development'
DEBUG = True
TESTING = False
class TestingConfig(BaseConfig):
ENV = 'testing'
DEBUG = True
TESTING = True
class ProductionConfig(BaseConfig):
ENV = 'production'
... | 0 | 0 | 0 | 252 | 0 | 0 | 0 | -12 | 114 |
2b9ca9f6cb11eea479bcbdb32e35d05807baf760 | 16,543 | py | Python | wautils.py | sudobob/WildApricotUtils | 8b633fde0a845f7fe0da84a1dc08b926dff07ef1 | [
"MIT"
] | null | null | null | wautils.py | sudobob/WildApricotUtils | 8b633fde0a845f7fe0da84a1dc08b926dff07ef1 | [
"MIT"
] | 5 | 2021-03-25T14:42:23.000Z | 2021-06-02T00:38:58.000Z | wautils.py | sudobob/WildApricotUtils | 8b633fde0a845f7fe0da84a1dc08b926dff07ef1 | [
"MIT"
] | 3 | 2020-03-08T19:56:27.000Z | 2021-03-25T19:56:24.000Z | #!/usr/bin/env python3
"""
wautils
A set of web-based tools for Wild Apricot Integration
o Accepts your Wild Apricot Credentials via Wild Apricot OAuth
o Determines if you are have Wild Apricot admin credentials
o Give you further access only if you have admin credentials
"""
usage_mesg = "... | 29.073814 | 109 | 0.629874 | #!/usr/bin/env python3
"""
wautils
A set of web-based tools for Wild Apricot Integration
o Accepts your Wild Apricot Credentials via Wild Apricot OAuth
o Determines if you are have Wild Apricot admin credentials
o Give you further access only if you have admin credentials
"""
usage_mesg = "... | 0 | 6,471 | 0 | 637 | 0 | 1,278 | 0 | 149 | 454 |
3a0b2e89672653b9a900abc4afcc73eda8e7bed0 | 5,458 | py | Python | status_lights.py | Nwhitten/Status_Check_Build | 36e2859ad9d5115d07ef3f6fc41a0469dc73ede1 | [
"MIT"
] | null | null | null | status_lights.py | Nwhitten/Status_Check_Build | 36e2859ad9d5115d07ef3f6fc41a0469dc73ede1 | [
"MIT"
] | null | null | null | status_lights.py | Nwhitten/Status_Check_Build | 36e2859ad9d5115d07ef3f6fc41a0469dc73ede1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
import unicornhat as uh
import subprocess
# Import the library
import pihole as ph
#from blinkt import set_pixel, set_brightness, show, clear
uh.set_layout(uh.PHAT)
#blinkt.set_clear_on_exit()
import subprocess
Cr,Cg,Cb = 0,50,0
Gr,Gg,Gb = 0,70,0
Ar,Ag,Ab = 130,60,0
Rr,Rg,Rb = 2... | 27.846939 | 137 | 0.532429 | #!/usr/bin/env python3
import time
import unicornhat as uh
import requests
import signal
import buttonshim
import subprocess
# Import the library
import pihole as ph
#from blinkt import set_pixel, set_brightness, show, clear
uh.set_layout(uh.PHAT)
#blinkt.set_clear_on_exit()
def website_up(url):
try:
r... | 0 | 0 | 0 | 0 | 0 | 301 | 0 | -8 | 111 |
6b5c9bf45ceb56541227c7a5b4ad744db34b61e7 | 3,953 | py | Python | rstudio_fargate/rstudio/ses/ses_custom_resource_handler.py | aws-samples/aws-fargate-with-rstudio-open-source | 67029f300b5fbf011e78e3f245f6332afa29dbc6 | [
"MIT-0"
] | 56 | 2021-06-22T21:51:37.000Z | 2022-03-16T08:09:30.000Z | rstudio_fargate/rstudio/ses/ses_custom_resource_handler.py | aws-samples/aws-fargate-with-rstudio-open-source | 67029f300b5fbf011e78e3f245f6332afa29dbc6 | [
"MIT-0"
] | 4 | 2021-11-17T14:04:25.000Z | 2021-12-05T08:13:51.000Z | rstudio_fargate/rstudio/ses/ses_custom_resource_handler.py | aws-samples/aws-fargate-with-rstudio-open-source | 67029f300b5fbf011e78e3f245f6332afa29dbc6 | [
"MIT-0"
] | 9 | 2021-06-22T23:04:55.000Z | 2022-02-04T03:50:34.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
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 l... | 36.266055 | 87 | 0.625601 | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
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 l... | 0 | 0 | 0 | 0 | 0 | 2,574 | 0 | -26 | 242 |
e6b1d28814a329b1f8be57f21014aa4dad907500 | 152 | py | Python | ex030.py | GuilhermeDallari/desafiomuundo1 | df4e06393970d2b686622d13d0ef433b761164fd | [
"MIT"
] | null | null | null | ex030.py | GuilhermeDallari/desafiomuundo1 | df4e06393970d2b686622d13d0ef433b761164fd | [
"MIT"
] | null | null | null | ex030.py | GuilhermeDallari/desafiomuundo1 | df4e06393970d2b686622d13d0ef433b761164fd | [
"MIT"
] | null | null | null | n1 = int(input('digite um numero: '))
r = n1 % 2
if r == 1:
print('O numero {} IMPAR!'.format(n1))
else:
print('O numero {} PAR'.format(n1)) | 25.333333 | 44 | 0.565789 | n1 = int(input('digite um numero: '))
r = n1 % 2
if r == 1:
print('O numero {} é IMPAR!'.format(n1))
else:
print('O numero {} é PAR'.format(n1)) | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
402932507d958cc74d1592134bb29af38bec7576 | 243 | py | Python | tests/unit/sample.py | BTruer/fastapi-prod-starter | 1b2ae5b1a2b0ec6424af4145cae4f64df8d9a457 | [
"MIT"
] | 2 | 2021-07-07T12:33:42.000Z | 2022-02-13T12:33:28.000Z | api/tests/unit/sample.py | poltavski/CalorieCounter | 24763364bbdbd803233521954e8b2584f97edf39 | [
"Apache-2.0"
] | null | null | null | api/tests/unit/sample.py | poltavski/CalorieCounter | 24763364bbdbd803233521954e8b2584f97edf39 | [
"Apache-2.0"
] | 1 | 2020-11-16T20:07:24.000Z | 2020-11-16T20:07:24.000Z | """A sample test."""
| 17.357143 | 35 | 0.534979 | """A sample test."""
class TestSample:
"""A sample unit test class."""
def test_setup(self) -> None:
"""Test setup."""
return None
def test_one(self) -> None:
"""Assert something."""
assert True
| 0 | 0 | 0 | 198 | 0 | 0 | 0 | 0 | 23 |
56c101ae9fe7521ee7dc2434734541a2b1b6c9b7 | 2,649 | py | Python | PFERD/utils.py | ff781/PFERD | ba9215ebe81e67940f88c52eb1a42b2dc480661b | [
"MIT"
] | null | null | null | PFERD/utils.py | ff781/PFERD | ba9215ebe81e67940f88c52eb1a42b2dc480661b | [
"MIT"
] | null | null | null | PFERD/utils.py | ff781/PFERD | ba9215ebe81e67940f88c52eb1a42b2dc480661b | [
"MIT"
] | null | null | null | """
A few utility bobs and bits.
"""
import re
from pathlib import Path, PurePath
from typing import Optional, Tuple, Union
import bs4
import requests
from .progress import ProgressSettings, progress_for, size_from_headers
PathLike = Union[PurePath, str, Tuple[str, ...]]
def to_path(pathlike: PathLike) -> Path:
... | 26.757576 | 90 | 0.627029 | """
A few utility bobs and bits.
"""
import re
from pathlib import Path, PurePath
from typing import Optional, Tuple, Union
import bs4
import requests
from .progress import ProgressSettings, progress_for, size_from_headers
PathLike = Union[PurePath, str, Tuple[str, ...]]
def to_path(pathlike: PathLike) -> Path:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
21698d26b2be15c167c979d47b10597d56dd1c9d | 69 | py | Python | examples/pyminifier/source/hello_world.py | sleeyax/PyDeobfuscator | cffc6cb6ac1fea8e9c99d8501c8b95e93272279f | [
"MIT"
] | 10 | 2020-02-13T19:26:38.000Z | 2021-12-13T08:28:04.000Z | examples/pyminifier/source/hello_world.py | sleeyax/PyDeobfuscator | cffc6cb6ac1fea8e9c99d8501c8b95e93272279f | [
"MIT"
] | null | null | null | examples/pyminifier/source/hello_world.py | sleeyax/PyDeobfuscator | cffc6cb6ac1fea8e9c99d8501c8b95e93272279f | [
"MIT"
] | 3 | 2020-10-03T18:43:50.000Z | 2021-04-28T14:12:48.000Z | msg = "hello"
target = "world"
print("{0} {1} !".format(msg, target)) | 23 | 38 | 0.594203 | msg = "hello"
target = "world"
print("{0} {1} !".format(msg, target)) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a260dbe0bee13a0aa6700d7b1a39090542319c3 | 12,868 | py | Python | mmtbx/hydrogens/reduce_hydrogen.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/hydrogens/reduce_hydrogen.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/hydrogens/reduce_hydrogen.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import boost_adaptbx.boost.python as bp
#
ext = bp.import_ext("cctbx_geometry_restraints_ext")
# ==============================================================================
# ==========================================================================... | 37.083573 | 96 | 0.626515 | from __future__ import absolute_import, division, print_function
import six
import sys
import mmtbx.model
import iotbx.pdb
import boost_adaptbx.boost.python as bp
from libtbx.utils import null_out
from libtbx import group_args
from cctbx.array_family import flex
from collections import OrderedDict
#
from cctbx.maptbx.b... | 0 | 0 | 0 | 10,862 | 0 | 420 | 0 | 45 | 244 |
3d17970c0c659e800676554673a5275b1a642224 | 1,585 | py | Python | gberatings/history/views.py | georgeeldredge/gberatings | a0d5137075c7bec09555abcc2faf73939e57cd87 | [
"MIT"
] | null | null | null | gberatings/history/views.py | georgeeldredge/gberatings | a0d5137075c7bec09555abcc2faf73939e57cd87 | [
"MIT"
] | null | null | null | gberatings/history/views.py | georgeeldredge/gberatings | a0d5137075c7bec09555abcc2faf73939e57cd87 | [
"MIT"
] | null | null | null |
# Create your views here.
#from history.models import Seasonindex
| 31.078431 | 105 | 0.764669 | from django.shortcuts import render
# Create your views here.
from django.shortcuts import render_to_response
from django.template import RequestContext
from history.models import Teamindex
#from history.models import Seasonindex
from history.models import Seasondata
def index(request):
# Obtain the context from t... | 0 | 0 | 0 | 0 | 0 | 1,268 | 0 | 92 | 158 |
076aaece575282bf0fb3436ef9daab5a06bb37ea | 96,186 | py | Python | tencentcloud/dts/v20180330/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/dts/v20180330/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/dts/v20180330/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 31.526057 | 236 | 0.600867 | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 16,776 | 0 | 0 | 87,201 | 0 | 0 | 0 | 33 | 1,909 |
76c8eb89e8c19b860d88bb86c31cd4003a856411 | 1,412 | py | Python | interview-preparation-kit/dictionaries-and-hashmaps/count-triplets/count-triplets-v1.py | victorwongth/hackerrank-solutions | b3125204e7ff9c83efb2417c7dab3630a6dc7165 | [
"MIT"
] | null | null | null | interview-preparation-kit/dictionaries-and-hashmaps/count-triplets/count-triplets-v1.py | victorwongth/hackerrank-solutions | b3125204e7ff9c83efb2417c7dab3630a6dc7165 | [
"MIT"
] | null | null | null | interview-preparation-kit/dictionaries-and-hashmaps/count-triplets/count-triplets-v1.py | victorwongth/hackerrank-solutions | b3125204e7ff9c83efb2417c7dab3630a6dc7165 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/count-triplets-1/problem
# This solution works but will time out
#!/bin/python3
import os
# Complete the countTriplets function below.
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
nr = input().rstrip().split()
n = int(nr[0])
r = int... | 25.672727 | 76 | 0.592068 | # https://www.hackerrank.com/challenges/count-triplets-1/problem
# This solution works but will time out
#!/bin/python3
import math
import os
import random
import re
import sys
from collections import defaultdict
# Complete the countTriplets function below.
def countTriplets(arr, r):
# First count occurence of ... | 0 | 0 | 0 | 0 | 0 | 841 | 0 | -27 | 133 |
d80dc03d4bc0d8cecdd2b7e8d49958c94ddb8c4d | 52 | py | Python | kitsune/wiki/__init__.py | AndrewDVXI/kitsune | 84bd4fa60346681c3fc5a03b0b1540fd1335cee2 | [
"BSD-3-Clause"
] | 929 | 2015-01-04T08:08:51.000Z | 2022-03-31T06:20:44.000Z | kitsune/wiki/__init__.py | hafixo/kitsune | d7756872e16590eea1c6adaeb5bc78f83414d753 | [
"BSD-3-Clause"
] | 1,751 | 2015-01-02T00:04:37.000Z | 2022-03-31T10:24:30.000Z | kitsune/wiki/__init__.py | Whoerr/kitsune | 2428573b4920a824c3e712b8a4870f8c1ada8f64 | [
"BSD-3-Clause"
] | 605 | 2015-01-01T14:08:36.000Z | 2022-03-28T15:39:45.000Z | default_app_config = "kitsune.wiki.apps.WikiConfig"
| 26 | 51 | 0.826923 | default_app_config = "kitsune.wiki.apps.WikiConfig"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d87f10d1aaea2f6d2a753d7e0c53bcd18dac070c | 1,086 | py | Python | database/migrations/0043_auto_20210111_2318.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | 51 | 2018-01-12T01:51:44.000Z | 2022-03-10T00:06:34.000Z | database/migrations/0043_auto_20210111_2318.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | 213 | 2018-01-10T19:57:03.000Z | 2022-03-29T04:30:53.000Z | database/migrations/0043_auto_20210111_2318.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | 35 | 2018-03-08T03:28:53.000Z | 2022-03-11T13:58:44.000Z | # Generated by Django 2.2.14 on 2021-01-11 23:18
| 29.351351 | 93 | 0.607735 | # Generated by Django 2.2.14 on 2021-01-11 23:18
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('database', '0042_auto_20201204_2223'),
]
operations = [
migrations.AddField(
model_name='intervent... | 0 | 0 | 0 | 942 | 0 | 0 | 0 | 26 | 68 |
86010bad3e726db8bdb9130199a575bb8a5e2ad0 | 1,585 | py | Python | tools/ci_new_boards_check.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 13 | 2021-01-27T13:12:17.000Z | 2022-02-25T20:16:00.000Z | tools/ci_new_boards_check.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 1 | 2020-12-30T11:48:24.000Z | 2020-12-30T11:48:24.000Z | tools/ci_new_boards_check.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 6 | 2021-05-12T20:45:46.000Z | 2021-12-27T04:51:56.000Z | #! /usr/bin/env python3
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
import sys
import os
import yaml
import build_board_info
workflow_file = '.github/workflows/build.yml'
# Get boards in jso... | 28.303571 | 135 | 0.699685 | #! /usr/bin/env python3
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
import sys
import os
import json
import yaml
import build_board_info
workflow_file = '.github/workflows/build.yml'
# Get b... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |
76c575b41eb793e9db73c54281f26f3309864947 | 599 | py | Python | setup.py | lmarzora/pyspatialite | 173ae3e8a9f2523adbaa2cefb23195f9d32aae18 | [
"Zlib"
] | null | null | null | setup.py | lmarzora/pyspatialite | 173ae3e8a9f2523adbaa2cefb23195f9d32aae18 | [
"Zlib"
] | null | null | null | setup.py | lmarzora/pyspatialite | 173ae3e8a9f2523adbaa2cefb23195f9d32aae18 | [
"Zlib"
] | null | null | null | #! /usr/bin/env python
from setuptools import setup
setup(
name = 'pyspatialite',
version = '0.2',
packages=['pyspatialite'],
description = 'DB-API 2.0 interface for SQLite 3.x with Spatialite',
author = 'Lokkju Brennr',
author_email = 'lokkju@lokkju.com',
license = 'zlib/libpng license',
... | 33.277778 | 75 | 0.644407 | #! /usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'pyspatialite',
version = '0.2',
packages=['pyspatialite'],
description = 'DB-API 2.0 interface for SQLite 3.x with Spatialite',
author = 'Lokkju Brennr',
author_email = 'lokkju@lokkju.com',
license = 'zlib/libp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0 |
2e156082d1f30393329123b4788d9175bae86f19 | 39,794 | py | Python | src/mpeg1audio/__init__.py | sbrubes/mpeg1audio | 2feb3a53861f623bab56280c06ab1fedf6804f6c | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2016-04-06T04:39:04.000Z | 2020-04-23T22:55:58.000Z | src/mpeg1audio/__init__.py | sbrubes/mpeg1audio | 2feb3a53861f623bab56280c06ab1fedf6804f6c | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/mpeg1audio/__init__.py | sbrubes/mpeg1audio | 2feb3a53861f623bab56280c06ab1fedf6804f6c | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-04-30T22:35:47.000Z | 2020-10-03T04:25:30.000Z | """
Python package which is intended to gather all kinds of MPEG-1 Audio related
meta information from file. Such as duration of MPEGAudio file, average bitrate
for variable bitrate (VBR) MPEGAudio files, etc.
Most of the information about MPEGAudio Headers is from excellent article
`MPEGAudio Audio Frame Header By Ko... | 33.217028 | 83 | 0.569659 | """
Python package which is intended to gather all kinds of MPEG-1 Audio related
meta information from file. Such as duration of MPEGAudio file, average bitrate
for variable bitrate (VBR) MPEGAudio files, etc.
Most of the information about MPEGAudio Headers is from excellent article
`MPEGAudio Audio Frame Header By Ko... | 0 | 8,097 | 0 | 28,548 | 0 | 0 | 0 | -3 | 307 |
c796e4aedea9165d4abb0e19c96c41b69a14c690 | 1,762 | py | Python | lithium/manage/commands/elements.py | PressLabs/lithium | a222e4021aabcbec0fd24bcecf904a0ee7ec852d | [
"Apache-2.0"
] | 2 | 2015-03-20T10:57:14.000Z | 2015-03-20T11:03:39.000Z | lithium/manage/commands/elements.py | PressLabs/lithium | a222e4021aabcbec0fd24bcecf904a0ee7ec852d | [
"Apache-2.0"
] | null | null | null | lithium/manage/commands/elements.py | PressLabs/lithium | a222e4021aabcbec0fd24bcecf904a0ee7ec852d | [
"Apache-2.0"
] | null | null | null | all = [
' hydrogen',
' helium',
' lithium',
' beryllium',
' boron',
' carbon',
' nitrogen',
' oxygen',
' fluorine',
' neon',
' sodium',
' magnesium',
' aluminum',
' silicon',
' phosphorus',
' sulfur',
' chlorine',
' argon',
' potassium',
' calcium',
' scandium',
' titanium',
... | 14.561983 | 19 | 0.527242 | all = [
' hydrogen',
' helium',
' lithium',
' beryllium',
' boron',
' carbon',
' nitrogen',
' oxygen',
' fluorine',
' neon',
' sodium',
' magnesium',
' aluminum',
' silicon',
' phosphorus',
' sulfur',
' chlorine',
' argon',
' potassium',
' calcium',
' scandium',
' titanium',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1612bd5463c81961855ff2aaea65396b1ed23f7 | 1,183 | py | Python | setup.py | barlehmann/project_spring_2020 | 7bb2611e51c11d893540dbe1e3439d7406d87fba | [
"Apache-2.0"
] | null | null | null | setup.py | barlehmann/project_spring_2020 | 7bb2611e51c11d893540dbe1e3439d7406d87fba | [
"Apache-2.0"
] | null | null | null | setup.py | barlehmann/project_spring_2020 | 7bb2611e51c11d893540dbe1e3439d7406d87fba | [
"Apache-2.0"
] | null | null | null |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="EEG/GSR Wellness Tracker",
version="0.0.1",
author="Bar Lehmann",
author_email="bar.lehmann@gmail.com",
description="A package to help explore connections between EEG/GSR with self repo... | 40.793103 | 449 | 0.725275 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="EEG/GSR Wellness Tracker",
version="0.0.1",
author="Bar Lehmann",
author_email="bar.lehmann@gmail.com",
description="A package to help explore connections between EEG/GSR with self repo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4bf620e1943b76b856bc1c75ba75cc33660fcf13 | 485 | py | Python | 3rd_week/02_selection_sort.py | ysong0504/algorithm | 76bfef16bd5bdc13b7ad260ee5f4e9dc62316403 | [
"MIT"
] | null | null | null | 3rd_week/02_selection_sort.py | ysong0504/algorithm | 76bfef16bd5bdc13b7ad260ee5f4e9dc62316403 | [
"MIT"
] | null | null | null | 3rd_week/02_selection_sort.py | ysong0504/algorithm | 76bfef16bd5bdc13b7ad260ee5f4e9dc62316403 | [
"MIT"
] | null | null | null | input = [4, 6, 2, 9, 1]
print(selection_sort(input))
# print(input) # [1, 2, 4, 6, 9] !
| 25.526316 | 88 | 0.536082 | input = [4, 6, 2, 9, 1]
def selection_sort(array): #O(N^2) - 배열반복문 두번진행됐다.
n = len(array)
# 이 부분을 채워보세요!
for i in range(n-1): #-1를 함으로서 마지막에 남은 한개의 원소는 비교하지 않는다. 왜냐 그전에 이미 정렬이 마무리되었을 거니까!
for j in range(n-i): # -i는 정렬이 끝난 애들은 다시 보기 않기 때무넹
# 현재보고 있는 인덱스
if array[i+j] < arr... | 291 | 0 | 0 | 0 | 0 | 271 | 0 | 0 | 23 |
04dcff38b12edaf5393625191a5c85d55ed8498b | 403 | py | Python | oo/Carro.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null | oo/Carro.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null | oo/Carro.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null |
carro = Carro("Chevrolet", "Tracker", "Branco")
carro.ligar()
carro.desligar()
carro.exibirInformacoes()
| 18.318182 | 47 | 0.687345 |
class Carro:
def __init__(self, marca, modelo, cor):
self.marca = marca
self.modelo = modelo
self.cor = cor
def ligar(self):
print("Ligando o carro!")
def desligar(self):
print("Desligando o carro!")
def exibirInformacoes(self):
print(self.marca, self.modelo, self.cor)
carro = Carro("Chevrol... | 0 | 0 | 0 | 273 | 0 | 0 | 0 | 0 | 23 |
5807592c185000a0680905d226dc7db080e9f91f | 376 | py | Python | plot_meteo_data.py | Mintaka/mypyladies_sqlite | 4f0762864f0cacd3de5234e90ccf517ee9760dbe | [
"MIT"
] | 1 | 2021-03-10T08:21:15.000Z | 2021-03-10T08:21:15.000Z | plot_meteo_data.py | Mintaka/mypyladies_sqlite | 4f0762864f0cacd3de5234e90ccf517ee9760dbe | [
"MIT"
] | 17 | 2021-02-28T20:48:37.000Z | 2021-03-31T06:06:01.000Z | plot_meteo_data.py | Mintaka/mypyladies_sqlite | 4f0762864f0cacd3de5234e90ccf517ee9760dbe | [
"MIT"
] | 4 | 2021-02-23T17:01:55.000Z | 2021-03-30T16:27:27.000Z |
from matplotlib import pyplot as plt
from process_meteo_data import setup_db_connection, EXPORTS_FOLDER
connection, cursor = setup_db_connection()
data = cursor.execute(f'SELECT * FROM temperatures LIMIT 100;').fetchall()
_, date, temp = list(zip(*data))
plt.plot(temp)
plt.savefig(EXPORTS_FOLDER + '/' + "temp.pn... | 19.789474 | 74 | 0.760638 | from pathlib import Path
import sqlite3
from matplotlib import pyplot as plt
from process_meteo_data import setup_db_connection, EXPORTS_FOLDER
connection, cursor = setup_db_connection()
data = cursor.execute(f'SELECT * FROM temperatures LIMIT 100;').fetchall()
_, date, temp = list(zip(*data))
plt.plot(temp)
plt... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 44 |
a71b247387d6cb0eb3a8a7808dbf88dbf790d3ab | 281 | py | Python | tests/correctness/targets/java/Javac_source_target/Input/source_target.xpybuild.py | xpybuild/xpybuild | c71a73e47414871c8192381d0356ab62f5a58127 | [
"Apache-2.0"
] | 9 | 2017-02-06T16:45:46.000Z | 2021-12-05T09:42:58.000Z | tests/correctness/targets/java/Javac_source_target/Input/source_target.xpybuild.py | xpybuild/xpybuild | c71a73e47414871c8192381d0356ab62f5a58127 | [
"Apache-2.0"
] | 15 | 2019-01-11T19:39:34.000Z | 2022-01-08T11:11:35.000Z | tests/correctness/targets/java/Javac_source_target/Input/source_target.xpybuild.py | xpybuild/xpybuild | c71a73e47414871c8192381d0356ab62f5a58127 | [
"Apache-2.0"
] | 5 | 2017-02-06T16:51:17.000Z | 2020-12-02T17:36:30.000Z |
Javac('${OUTPUT_DIR}/test-source-target/', ['./Simple.java'], []).option('javac.source', '7').option('javac.target', '8')
| 31.222222 | 121 | 0.736655 | from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *
from xpybuild.targets.java import *
import logging
Javac('${OUTPUT_DIR}/test-source-target/', ['./Simple.java'], []).option('javac.source', '7').option('javac.target', '8')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 111 |
9c22dd938df65e858a051fdc3c845ce9406f89e1 | 1,034 | py | Python | tests/gopkg/test_translate.py | fabric8-analytics/fabric8-analytics-github-events-monitor | bda33c3521d36677a7c70056621e18ff24e525c3 | [
"Apache-2.0"
] | null | null | null | tests/gopkg/test_translate.py | fabric8-analytics/fabric8-analytics-github-events-monitor | bda33c3521d36677a7c70056621e18ff24e525c3 | [
"Apache-2.0"
] | 43 | 2018-12-10T10:53:05.000Z | 2021-12-13T19:53:58.000Z | tests/gopkg/test_translate.py | fabric8-analytics/fabric8-analytics-github-events-monitor | bda33c3521d36677a7c70056621e18ff24e525c3 | [
"Apache-2.0"
] | 5 | 2018-12-07T11:20:55.000Z | 2022-01-28T23:31:25.000Z | """Test the gopkg module."""
from ghmonitor.gopkg.translate import get_repo_from_random_urn, translate, GITHUB_REPO_RE
def test_get_repo_urn():
"""Test the function. Be careful though, it requires an Internet access."""
assert 'kubernetes/metrics' == get_repo_from_random_urn('k8s.io/metrics')
assert get_... | 36.928571 | 89 | 0.705996 | """Test the gopkg module."""
from ghmonitor.gopkg.translate import get_repo_from_random_urn, translate, GITHUB_REPO_RE
def test_get_repo_urn():
"""Test the function. Be careful though, it requires an Internet access."""
assert 'kubernetes/metrics' == get_repo_from_random_urn('k8s.io/metrics')
assert get_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f5a42791d7219800d12d437fb87fac92788c7a05 | 731 | py | Python | formatter.py | RichPayne/Jenny | d7607bee71cdfafdf446713a58486433b6747eeb | [
"MIT"
] | 18 | 2017-01-11T22:27:30.000Z | 2021-06-21T11:22:31.000Z | formatter.py | RichPayne/Jenny | d7607bee71cdfafdf446713a58486433b6747eeb | [
"MIT"
] | null | null | null | formatter.py | RichPayne/Jenny | d7607bee71cdfafdf446713a58486433b6747eeb | [
"MIT"
] | 6 | 2017-01-10T22:33:12.000Z | 2021-08-21T19:02:24.000Z |
'''
Created by: Richard Payne
Created on: 05/08/17
Desc: Takes string from connection and extracts username, password
and IP address of the attempted login.
'''
| 23.580645 | 73 | 0.538988 | import mailer as m
import consoleLogger as cl
import fileLogger as fl
'''
Created by: Richard Payne
Created on: 05/08/17
Desc: Takes string from connection and extracts username, password
and IP address of the attempted login.
'''
def format(ip, usr, pw):
ip = ip
usr = usr.rsp... | 0 | 0 | 0 | 0 | 0 | 444 | 0 | 4 | 94 |
47d60851cc18b7fd14824a9784874a0d7c89358a | 602 | py | Python | shop/urls.py | knkemree/django_ecommerce_website | 19876976bc872cf4835778d12d82756c573cf3b9 | [
"bzip2-1.0.6"
] | null | null | null | shop/urls.py | knkemree/django_ecommerce_website | 19876976bc872cf4835778d12d82756c573cf3b9 | [
"bzip2-1.0.6"
] | 8 | 2020-06-06T01:22:59.000Z | 2022-01-13T02:14:24.000Z | shop/urls.py | knkemree/django_ecommerce_website | 19876976bc872cf4835778d12d82756c573cf3b9 | [
"bzip2-1.0.6"
] | null | null | null | from django.urls import path
from . import views
from .views import (SearchsProductView)
app_name = 'shop'
urlpatterns = [
#path('', views.index, name='index'),
path('', views.product_list, name='product_list'),
path('shop/', views.product_list, name='product_list'),
path('addtocartform/', views.ad... | 27.363636 | 87 | 0.684385 | from django.urls import path
from . import views
from .views import (
SearchsProductView
)
app_name = 'shop'
urlpatterns = [
#path('', views.index, name='index'),
path('', views.product_list, name='product_list'),
path('shop/', views.product_list, name='product_list'),
path('addtocartform/', vi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |