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
cd6b1eaf10be5e0429bcdbb1b2ff218d05d45adb
6,304
py
Python
System_of_Beams/testing_collection/test_runner.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
11
2017-05-06T17:05:29.000Z
2020-11-12T09:26:47.000Z
System_of_Beams/testing_collection/test_runner.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
49
2017-04-20T11:26:11.000Z
2020-05-29T13:18:06.000Z
System_of_Beams/testing_collection/test_runner.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
4
2017-02-14T12:55:34.000Z
2022-01-12T15:07:07.000Z
from testing_collection import visualisation_tests as visu_tests from Classes.CurrentDocument import CurrentDoc def run_tests(curr_doc: CurrentDoc): """ 1.) write test case and add it to file test_cases.py 2.) Call it in this function (run_tests() will be called in 'System_of_Beams\main.py' 3.) make s...
44.70922
101
0.521415
from testing_collection import visualisation_tests as visu_tests from Classes.CurrentDocument import CurrentDoc def run_tests(curr_doc: CurrentDoc): """ 1.) write test case and add it to file test_cases.py 2.) Call it in this function (run_tests() will be called in 'System_of_Beams\main.py' 3.) make s...
0
0
0
0
0
0
0
0
0
2ee6ff7af3295482ca8a08e6514f2134c750464d
5,280
py
Python
retrievals/data/ecmwf/grib.py
leric2/pyretrievals
3cae0afc9951ce079a44aa093689867b17a11060
[ "MIT" ]
null
null
null
retrievals/data/ecmwf/grib.py
leric2/pyretrievals
3cae0afc9951ce079a44aa093689867b17a11060
[ "MIT" ]
null
null
null
retrievals/data/ecmwf/grib.py
leric2/pyretrievals
3cae0afc9951ce079a44aa093689867b17a11060
[ "MIT" ]
2
2020-05-13T10:35:21.000Z
2022-03-31T07:47:27.000Z
import numpy as np import xarray as xr def grb_msg_to_xr(message, has_levels=True): """ Convert a single grib message to xarray. :param message: :type message: pygrib message :param has_levels: If True, add a level coordinate. :rtype: xarray.DataArray """ lons = np.linspace(-float(mes...
30.520231
93
0.58447
import pygrib import numpy as np from collections import defaultdict from collections import namedtuple from collections import Iterable import xarray as xr def grb_msg_to_xr(message, has_levels=True): """ Convert a single grib message to xarray. :param message: :type message: pygrib message :par...
0
62
0
3,030
0
0
0
30
134
465c3233b80f7af04fe584f39fcb8e47b7171fe4
11,615
py
Python
tests/system/python/api/test_service.py
doug-dianomic/fledge
cab620d1f31e6dca8e31ca8e483adaad7ce94834
[ "Apache-2.0" ]
null
null
null
tests/system/python/api/test_service.py
doug-dianomic/fledge
cab620d1f31e6dca8e31ca8e483adaad7ce94834
[ "Apache-2.0" ]
null
null
null
tests/system/python/api/test_service.py
doug-dianomic/fledge
cab620d1f31e6dca8e31ca8e483adaad7ce94834
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge.readthedocs.io/ # FLEDGE_END """ Test add service using poll and async plugins for both python & C version REST API """ __author__ = "Ashish Jabble" __copyright__ = "Copyright (c) 2019 Dianomic Systems" __license__ = "Apache 2.0" __version__ = "${VERSION}" ...
39.372881
118
0.624709
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge.readthedocs.io/ # FLEDGE_END """ Test add service using poll and async plugins for both python & C version REST API """ import os import http.client import json import time from uuid import UUID from collections import Counter from urllib.parse import quote...
0
3,766
0
6,832
0
220
0
-20
269
71c5edd92cbebdc52ea8a994e7bdfb165cfbd92a
727
py
Python
metricbeat/module/couchbase/test_couchbase.py
phillip2019/beats
c825258c3dc62f05e5feefa9956befa7fb47fa68
[ "ECL-2.0", "Apache-2.0" ]
1
2021-06-24T21:20:14.000Z
2021-06-24T21:20:14.000Z
metricbeat/module/couchbase/test_couchbase.py
michaelolo24/beats
cf46a2a12fbe879562ab56ee1f9c33d6bb4ac40d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
metricbeat/module/couchbase/test_couchbase.py
michaelolo24/beats
cf46a2a12fbe879562ab56ee1f9c33d6bb4ac40d
[ "ECL-2.0", "Apache-2.0" ]
2
2020-10-26T15:34:06.000Z
2021-12-10T08:51:58.000Z
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../../tests/system'))
25.068966
83
0.657497
import os import sys import unittest from parameterized import parameterized sys.path.append(os.path.join(os.path.dirname(__file__), '../../tests/system')) import metricbeat class Test(metricbeat.BaseTest): COMPOSE_SERVICES = ['couchbase'] FIELDS = ['couchbase'] @parameterized.expand([ ("bucket...
0
327
0
201
0
0
0
8
89
d039b9142821aa0cafb9f36af8ed2e45442dee5f
1,834
py
Python
odScrape.py
willkim28/openDota
90f8543be2aa6392d3016003827d825fca6dc92b
[ "MIT" ]
null
null
null
odScrape.py
willkim28/openDota
90f8543be2aa6392d3016003827d825fca6dc92b
[ "MIT" ]
null
null
null
odScrape.py
willkim28/openDota
90f8543be2aa6392d3016003827d825fca6dc92b
[ "MIT" ]
null
null
null
import requests import time import json url = 'https://api.opendota.com/api/' gang = { 'will': { 'name': 'Will', 'pid': '67798385' }, 'pat': { 'name': 'Pat', 'pid': '52147853' }, 'james': { 'name': 'James', 'pid': '84941438' ...
22.641975
87
0.52181
import requests import time import json url = 'https://api.opendota.com/api/' gang = { 'will': { 'name': 'Will', 'pid': '67798385' }, 'pat': { 'name': 'Pat', 'pid': '52147853' }, 'james': { 'name': 'James', 'pid': '84941438' ...
0
0
0
0
0
0
0
0
0
22b7392e8aa851501042abde6b644a775d931b00
3,364
py
Python
robotarium_node/robotarium_node/utilities/coordinates.py
zmk5/ros2_robotarium
6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d
[ "MIT" ]
22
2020-08-16T21:40:17.000Z
2022-03-10T15:54:55.000Z
robotarium_node/robotarium_node/utilities/coordinates.py
zmk5/ros2_robotarium
6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d
[ "MIT" ]
null
null
null
robotarium_node/robotarium_node/utilities/coordinates.py
zmk5/ros2_robotarium
6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d
[ "MIT" ]
1
2020-08-26T09:06:12.000Z
2020-08-26T09:06:12.000Z
"""A series of conversion tools for Quaternions and Euler Angles. These functions are modified versions of the algorithms found here: https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles Written by: Zahi Kakish (zmk5) """ from typing import Tuple import numpy as np def quaternion_to_roll(...
28.268908
79
0.54786
"""A series of conversion tools for Quaternions and Euler Angles. These functions are modified versions of the algorithms found here: https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles Written by: Zahi Kakish (zmk5) """ from typing import Tuple import numpy as np def quaternion_to_roll(...
0
0
0
0
0
0
0
0
0
60162f2a3bc07b7804ae4d7b5cfdf462e1b196d6
12,649
py
Python
tests/UnitTestBase.py
raj-TIP/wlan-testing
470e85eb52a8ff6b7e9cacab8fcdf73ccc4b1733
[ "BSD-3-Clause" ]
null
null
null
tests/UnitTestBase.py
raj-TIP/wlan-testing
470e85eb52a8ff6b7e9cacab8fcdf73ccc4b1733
[ "BSD-3-Clause" ]
null
null
null
tests/UnitTestBase.py
raj-TIP/wlan-testing
470e85eb52a8ff6b7e9cacab8fcdf73ccc4b1733
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 import sys if sys.version_info[0] != 3: print("This script requires Python 3") exit(1) import sys for folder in 'py-json', 'py-scripts': if folder not in sys.path: sys.path.append(f'../lanforge/lanforge-scripts/{folder}') sys.path.append(f'../libs/lanforge') sys.path.append(f...
49.027132
120
0.627085
#!/usr/bin/python3 import sys if sys.version_info[0] != 3: print("This script requires Python 3") exit(1) import sys for folder in 'py-json', 'py-scripts': if folder not in sys.path: sys.path.append(f'../lanforge/lanforge-scripts/{folder}') sys.path.append(f'../libs/lanforge') sys.path.append(f...
0
0
0
10,107
0
0
0
124
1,105
9677e8b1e3d2314707fc9d6edfb084e573607f21
1,064
py
Python
exerciciosEntrega/exercicioEntrega07.py
igorprati/python_modulo01_entrega
ba35181159c8f7c0916eaea431c591666977f16a
[ "MIT" ]
null
null
null
exerciciosEntrega/exercicioEntrega07.py
igorprati/python_modulo01_entrega
ba35181159c8f7c0916eaea431c591666977f16a
[ "MIT" ]
null
null
null
exerciciosEntrega/exercicioEntrega07.py
igorprati/python_modulo01_entrega
ba35181159c8f7c0916eaea431c591666977f16a
[ "MIT" ]
null
null
null
#07 - Crie um programa onde o usurio possa digitar sete valores numricos e cadastre-os em uma lista nica que mantenha separados os valores pares e mpares. No final, mostre os valores pares e mpares em ordem crescente. numeros = list() # lista geral contendo todos os nmeros listaPar = list() # lista contendo apenas nm...
53.2
222
0.734023
#07 - Crie um programa onde o usuário possa digitar sete valores numéricos e cadastre-os em uma lista única que mantenha separados os valores pares e ímpares. No final, mostre os valores pares e ímpares em ordem crescente. numeros = list() # lista geral contendo todos os números listaPar = list() # lista contendo ape...
44
0
0
0
0
0
0
0
0
536a2bffd176dcd62a3d6b9ea6c56b220e727387
1,168
py
Python
requests_cache/backends/dynamodb.py
Ax6/requests-cache
6717a336430eb7e6fe17e75c5517f3076ca85b42
[ "BSD-2-Clause" ]
6
2018-09-12T07:03:55.000Z
2021-08-11T18:26:32.000Z
requests_cache/backends/dynamodb.py
Ax6/requests-cache
6717a336430eb7e6fe17e75c5517f3076ca85b42
[ "BSD-2-Clause" ]
1
2019-05-29T01:43:33.000Z
2019-05-29T01:43:33.000Z
requests_cache/backends/dynamodb.py
Ax6/requests-cache
6717a336430eb7e6fe17e75c5517f3076ca85b42
[ "BSD-2-Clause" ]
1
2020-04-05T14:10:56.000Z
2020-04-05T14:10:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ requests_cache.backends.dynamodb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``dynamodb`` cache backend """
37.677419
77
0.504281
#!/usr/bin/env python # -*- coding: utf-8 -*- """ requests_cache.backends.dynamodb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``dynamodb`` cache backend """ from .base import BaseCache from .storage.dynamodbdict import DynamoDbDict class DynamoDbCache(BaseCache): """ ``dynamodb`` cache backend. """ def _...
0
0
0
911
0
0
0
31
67
14fb213ab57c57350fada5692e917462a2570e9a
830
py
Python
setup.py
kislenko-artem/dataclasses-ujson
6113d8b3db0f45be0b9ade846e408e3b50979bb2
[ "Apache-2.0" ]
3
2018-07-02T05:38:13.000Z
2018-10-06T22:15:48.000Z
setup.py
kislenko-artem/dataclasses-ujson
6113d8b3db0f45be0b9ade846e408e3b50979bb2
[ "Apache-2.0" ]
null
null
null
setup.py
kislenko-artem/dataclasses-ujson
6113d8b3db0f45be0b9ade846e408e3b50979bb2
[ "Apache-2.0" ]
null
null
null
import pathlib from setuptools import setup, find_packages HERE = pathlib.Path(__file__).parent README = (HERE / "ReadMe.md").read_text() setup( name="dataclasses_ujson", version="0.0.14", packages=find_packages(exclude=("tests*","bench_marks.py")), author="Kislenko Artem ", author_email="artem@we...
27.666667
64
0.678313
import pathlib from setuptools import setup, find_packages HERE = pathlib.Path(__file__).parent README = (HERE / "ReadMe.md").read_text() setup( name="dataclasses_ujson", version="0.0.14", packages=find_packages(exclude=("tests*","bench_marks.py")), author="Kislenko Artem ", author_email="artem@we...
0
0
0
0
0
0
0
0
0
b6e1b5baa73bbe671f372c5fbb39114cf328bee3
2,820
py
Python
django_mail_viewer/backends/cache.py
jmichalicek/django-mail-viewer
ede04bc6a0809b8e62621f5646396893ad966d71
[ "MIT" ]
3
2017-07-19T23:35:31.000Z
2022-02-13T18:49:04.000Z
django_mail_viewer/backends/cache.py
jmichalicek/django-mail-viewer
ede04bc6a0809b8e62621f5646396893ad966d71
[ "MIT" ]
1
2019-10-05T14:51:39.000Z
2019-10-05T14:51:40.000Z
django_mail_viewer/backends/cache.py
jmichalicek/django-mail-viewer
ede04bc6a0809b8e62621f5646396893ad966d71
[ "MIT" ]
null
null
null
""" Backend for test environment. """ from .. import settings as mailviewer_settings
37.105263
89
0.65
""" Backend for test environment. """ from django.core import cache from django.core.mail.backends.base import BaseEmailBackend from .. import settings as mailviewer_settings class EmailBackend(BaseEmailBackend): """ An email backend to use during testing and local development with Django Mail Viewer. U...
0
0
0
2,618
0
0
0
46
67
230c5789d1fbe742142cfe2e077b786e10a70cf9
757
py
Python
puzzle9/main.py
apaku/aoc2020
b90b1ec519014b851c6160d5b0e14c2ca8f86b91
[ "BSD-3-Clause" ]
1
2020-12-03T19:51:19.000Z
2020-12-03T19:51:19.000Z
puzzle9/main.py
apaku/aoc2020
b90b1ec519014b851c6160d5b0e14c2ca8f86b91
[ "BSD-3-Clause" ]
null
null
null
puzzle9/main.py
apaku/aoc2020
b90b1ec519014b851c6160d5b0e14c2ca8f86b91
[ "BSD-3-Clause" ]
null
null
null
import sys from itertools import combinations data = [int(line.strip()) for line in sys.stdin.readlines()] preamble = int(sys.argv[1]) idx = preamble while idx < len(data): found = False for (a,b) in combinations(data[idx-preamble:idx], 2): if a + b == data[idx]: found = True ...
22.939394
76
0.570674
import sys from itertools import combinations data = [int(line.strip()) for line in sys.stdin.readlines()] preamble = int(sys.argv[1]) idx = preamble while idx < len(data): found = False for (a,b) in combinations(data[idx-preamble:idx], 2): if a + b == data[idx]: found = True ...
0
0
0
0
0
0
0
0
0
886b96d6b50ebb192157cd1dec991c1cf191d83a
1,130
py
Python
sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs6_consume_events_using_cloud_events_1.0_schema.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE:...
34.242424
88
0.683186
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE:...
0
0
0
0
0
0
0
-12
22
668ed1659ae67dc4bdcd72703d472161d2741ed0
1,817
py
Python
augment_image.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
augment_image.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
augment_image.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
from imgaug import augmenters as iaa import cv2 brightness = iaa.Add((-7, 7), per_channel=0.5) contrast = iaa.LinearContrast((0.8, 1.6), per_channel=0.5) perspective = iaa.PerspectiveTransform(scale=(0.025, 0.090)) gaussian_noise = iaa.AdditiveGaussianNoise(loc=0, scale=(0.03*255, 0.04*255), per_channel=0.5) cr...
8.735577
95
0.521739
import imgaug as ia from imgaug import augmenters as iaa import numpy as np import random import cv2 brightness = iaa.Add((-7, 7), per_channel=0.5) contrast = iaa.LinearContrast((0.8, 1.6), per_channel=0.5) perspective = iaa.PerspectiveTransform(scale=(0.025, 0.090)) gaussian_noise = iaa.AdditiveGaussianNoise...
0
0
0
0
0
452
0
-13
94
53f20f21d4816c8461ab14d8b28d336b630cfee5
54,739
py
Python
pyinjective/proto/injective/peggy/v1/msgs_pb2.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
10
2021-09-07T08:03:52.000Z
2022-03-08T08:39:30.000Z
pyinjective/proto/injective/peggy/v1/msgs_pb2.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
39
2021-08-19T20:09:35.000Z
2022-03-22T19:51:59.000Z
pyinjective/proto/injective/peggy/v1/msgs_pb2.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
5
2021-11-02T16:23:48.000Z
2022-01-20T22:30:05.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: injective/peggy/v1/msgs.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection fro...
43.861378
5,674
0.772502
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: injective/peggy/v1/msgs.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection fro...
0
0
0
0
0
0
0
0
0
1d8534395fdd5c7f55a83b8b80a845e28e72c98e
272
py
Python
Mundo 2_Estruturas de Controle/Desafio_64.py
VictorOliveira02/Desafios-Python3-Curso-em-Video
53ee8bd814b816f3a21936677ef3f155b582843f
[ "MIT" ]
null
null
null
Mundo 2_Estruturas de Controle/Desafio_64.py
VictorOliveira02/Desafios-Python3-Curso-em-Video
53ee8bd814b816f3a21936677ef3f155b582843f
[ "MIT" ]
null
null
null
Mundo 2_Estruturas de Controle/Desafio_64.py
VictorOliveira02/Desafios-Python3-Curso-em-Video
53ee8bd814b816f3a21936677ef3f155b582843f
[ "MIT" ]
null
null
null
n = conta = soma = 0 n = int(input('Digite um valor para soma (999 para SAIR): ')) while n != 999: soma = soma + n conta = conta + 1 n = int(input('Digite um valor para soma (999 para SAIR): ')) print(f'A SOMA DOS {conta} VALORES IGUAL {soma}.')
27.2
65
0.584559
n = conta = soma = 0 n = int(input('Digite um valor para soma (999 para SAIR): ')) while n != 999: soma = soma + n conta = conta + 1 n = int(input('Digite um valor para soma (999 para SAIR): ')) print(f'A SOMA DOS {conta} VALORES É IGUAL Á {soma}.')
4
0
0
0
0
0
0
0
0
4d41a74f377233e4cdcc594f3e6d19359490d7d0
1,429
py
Python
Section 3/imdb.py
PacktPublishing/-Natural-Language-Processing-in-Practice
c9d999bdb7ac499d3df4f25e3aa5f949d180ec22
[ "MIT" ]
15
2019-01-24T20:54:35.000Z
2022-03-31T07:28:28.000Z
Section 3/imdb.py
PacktPublishing/-Natural-Language-Processing-in-Practice
c9d999bdb7ac499d3df4f25e3aa5f949d180ec22
[ "MIT" ]
null
null
null
Section 3/imdb.py
PacktPublishing/-Natural-Language-Processing-in-Practice
c9d999bdb7ac499d3df4f25e3aa5f949d180ec22
[ "MIT" ]
13
2019-02-08T00:35:02.000Z
2022-03-11T13:31:39.000Z
from keras.datasets import imdb import keras from keras.models import Sequential from keras.layers.embeddings import Embedding from keras.layers import Flatten, Dense from keras.preprocessing import sequence from numpy import array (x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=5000) word_t...
34.02381
89
0.716585
from keras.datasets import imdb import keras from keras.models import Sequential from keras.layers.embeddings import Embedding from keras.layers import Flatten, Dense from keras.preprocessing import sequence from numpy import array (x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=5000) word_t...
0
0
0
0
0
0
0
0
0
4af8e420262bb1d6912fb82b24d8afd62bd757c1
657
py
Python
packages/scikit-image/examples/plot_threshold.py
zmoon/scipy-lecture-notes
75a89ddedeb48930dbdb6fe25a76e9ef0587ae21
[ "CC-BY-4.0" ]
2,538
2015-01-01T04:58:41.000Z
2022-03-31T21:06:05.000Z
packages/scikit-image/examples/plot_threshold.py
zmoon/scipy-lecture-notes
75a89ddedeb48930dbdb6fe25a76e9ef0587ae21
[ "CC-BY-4.0" ]
362
2015-01-18T14:16:23.000Z
2021-11-18T16:24:34.000Z
packages/scikit-image/examples/plot_threshold.py
zmoon/scipy-lecture-notes
75a89ddedeb48930dbdb6fe25a76e9ef0587ae21
[ "CC-BY-4.0" ]
1,127
2015-01-05T14:39:29.000Z
2022-03-25T08:38:39.000Z
""" Otsu thresholding ================== This example illustrates automatic Otsu thresholding. """ import matplotlib.pyplot as plt from skimage import data from skimage import filters from skimage import exposure camera = data.camera() val = filters.threshold_otsu(camera) hist, bins_center = exposure.histogram(came...
21.193548
62
0.727549
""" Otsu thresholding ================== This example illustrates automatic Otsu thresholding. """ import matplotlib.pyplot as plt from skimage import data from skimage import filters from skimage import exposure camera = data.camera() val = filters.threshold_otsu(camera) hist, bins_center = exposure.histogram(came...
0
0
0
0
0
0
0
0
0
4a399209469f54d6a0788f38c4cdc3ee7b55bff7
1,471
py
Python
BS/BS_082_170521/main.py
Aleksey-Voko/Word_forms_bases
f14173cef830e7a514dfaefba3bbbf0c02a3ac0f
[ "MIT" ]
null
null
null
BS/BS_082_170521/main.py
Aleksey-Voko/Word_forms_bases
f14173cef830e7a514dfaefba3bbbf0c02a3ac0f
[ "MIT" ]
null
null
null
BS/BS_082_170521/main.py
Aleksey-Voko/Word_forms_bases
f14173cef830e7a514dfaefba3bbbf0c02a3ac0f
[ "MIT" ]
null
null
null
if __name__ == '__main__': change_template_bg()
36.775
103
0.588715
from BS.utils import read_src_bs, save_bs_dicts_to_txt, read_src_socket_bs, save_socket_bs_dicts_to_txt def change_template_bs(): word_forms_bases = list(read_src_bs('src_dict/БС 15.05.21.txt')) for group in word_forms_bases: title_form = group.title_word_form if all([ title_fo...
92
0
0
0
0
1,219
0
82
68
8f59783e7c2993679127dfa529b5ae4433b0fd0d
456
py
Python
config/conv.py
aarzilli/yacco
8378d59579ed3644a8da6b3dd5ee85496e32f0c9
[ "BSD-3-Clause" ]
24
2018-05-09T12:43:15.000Z
2022-03-06T01:58:49.000Z
config/conv.py
aarzilli/yacco
8378d59579ed3644a8da6b3dd5ee85496e32f0c9
[ "BSD-3-Clause" ]
5
2019-04-21T20:06:04.000Z
2020-05-11T07:41:28.000Z
config/conv.py
aarzilli/yacco
8378d59579ed3644a8da6b3dd5ee85496e32f0c9
[ "BSD-3-Clause" ]
3
2019-04-23T09:06:54.000Z
2020-05-09T14:48:30.000Z
#!/usr/bin/env python convert("config/luxisr.ttf", "luxibytes") convert("config/luximr.ttf", "luximonobytes") convert("config/DejaVuSans.ttf", "dejabytes") convert("config/DejaVuSansMono.ttf", "dejamonobytes")
25.333333
53
0.640351
#!/usr/bin/env python def convert(path, name): v = open(path).read() out = open("config/" + name + ".go", "w") out.write("package config\n") out.write("var " + name + " = []byte{\n\t") for c in v: out.write(str(ord(c)) + ", ") out.write("}\n") out.close() convert("config/luxisr.ttf", "luxibytes") convert("c...
0
0
0
0
0
222
0
0
23
8b3383cc48592356ea045efba36bd7d2d0455bb9
3,744
py
Python
Algos/base.py
benzomo/PyPackages
880823315411f6bf812827f59dd3a4408052e9a6
[ "MIT" ]
null
null
null
Algos/base.py
benzomo/PyPackages
880823315411f6bf812827f59dd3a4408052e9a6
[ "MIT" ]
null
null
null
Algos/base.py
benzomo/PyPackages
880823315411f6bf812827f59dd3a4408052e9a6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 25 15:32:42 2018 @author: benmo """
35.320755
154
0.523504
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 25 15:32:42 2018 @author: benmo """ import pandas as pd, numpy as np from .functions import * def scale(df, columns=None, how='minmax'): if columns == None: columns=df.columns class Transform(): def __init__(self, ...
0
170
0
1,986
0
1,345
0
14
90
84756ffec0a18ca4293137fdbd786719cd66ced4
3,562
py
Python
Classification/training.py
Natural-Goldfish/CatDogClassification
5ae0fe8bc37c6ee8a1cd3bd75cc862c650822263
[ "CECILL-B" ]
null
null
null
Classification/training.py
Natural-Goldfish/CatDogClassification
5ae0fe8bc37c6ee8a1cd3bd75cc862c650822263
[ "CECILL-B" ]
null
null
null
Classification/training.py
Natural-Goldfish/CatDogClassification
5ae0fe8bc37c6ee8a1cd3bd75cc862c650822263
[ "CECILL-B" ]
null
null
null
_CUDA_FLAG = torch.cuda.is_available()
45.666667
121
0.667602
from src.dataset import CatDogDataset from src.utils import * from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter import os _CUDA_FLAG = torch.cuda.is_available() def train(args): train_dataset = CatDogDataset(mode = "train", img_path = args.img_path, annotation_path = args.a...
0
0
0
0
0
3,337
0
52
133
a4623bf3c0b9253d21821dea3146c26d3d23d37a
596
py
Python
apiv2-python/api/vars.py
databeast/apicore
2ac982e399d98510fc2bafed0aeb55eb0d2cf9c1
[ "BSD-3-Clause" ]
null
null
null
apiv2-python/api/vars.py
databeast/apicore
2ac982e399d98510fc2bafed0aeb55eb0d2cf9c1
[ "BSD-3-Clause" ]
null
null
null
apiv2-python/api/vars.py
databeast/apicore
2ac982e399d98510fc2bafed0aeb55eb0d2cf9c1
[ "BSD-3-Clause" ]
null
null
null
from contextvars import ContextVar current_user_role = ContextVar('role', default=None) list_of_roles = ContextVar('roles', default=None) current_user = ContextVar('users_ID', default=None) headers = ContextVar('headers', default={}) nrpayload = ContextVar('nrpayload', default=None) tid = ContextVar('tid', default=No...
39.733333
61
0.785235
from contextvars import ContextVar current_user_role = ContextVar('role', default=None) list_of_roles = ContextVar('roles', default=None) current_user = ContextVar('users_ID', default=None) headers = ContextVar('headers', default={}) nrpayload = ContextVar('nrpayload', default=None) tid = ContextVar('tid', default=No...
0
0
0
0
0
0
0
0
0
e348cfac18c80bd7b466cf308e654ac0c004c60b
5,977
py
Python
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
from random import shuffle import random import math import string import sys import os import string import pdb eng_punctuation = string.punctuation + '\xe2\x80\x9c' + '\xe2\x80\x9d' hindi_punctuation = ['\xe0\xa5\xa4'] #danda # words like don't are split into don ' t # This version doesn't do anything about punct...
31.962567
116
0.59913
from random import shuffle import random import math import string import sys import os import string import pdb eng_punctuation = string.punctuation + '\xe2\x80\x9c' + '\xe2\x80\x9d' hindi_punctuation = ['\xe0\xa5\xa4'] #danda # words like don't are split into don ' t def splitSentence(from_sent): split_sent =...
0
0
0
0
0
2,360
0
0
92
601f07a9d220323fc83bfb20cfcc81fe7983dd95
548
py
Python
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
# Solution A # Solution B
21.92
51
0.421533
# Solution A class Solution: def moveZeroes(self, nums): if not nums: return 0 i = 0 for j in range(len(nums)): if nums[j]: nums[i] = nums[j] i += 1 for j in range(i, len(nums)): nums[j] = 0 # Solution B class Solu...
0
0
0
476
0
0
0
0
44
f0c559f76ba2dfee10760eeb157eef237ae05544
2,967
py
Python
pypeman/endpoints.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
6
2016-04-19T15:26:11.000Z
2021-03-16T18:06:53.000Z
pypeman/endpoints.py
mhcomm/pypeman
6583fae28bcb47e3b8091c39a91854ae36172cbd
[ "Apache-2.0" ]
68
2016-05-12T16:10:11.000Z
2022-03-02T01:30:36.000Z
pypeman/endpoints.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
9
2015-12-23T08:23:03.000Z
2021-09-03T09:22:51.000Z
import logging logger = logging.getLogger(__name__) all_endpoints = [] def reset_pypeman_endpoints(): """ clears book keeping of all endpoints Can be useful for unit testing. """ all_endpoints.clear() from pypeman.helpers import lazyload # noqa: E402 wrap = lazyload.Wrapper(__name__) wr...
29.376238
99
0.560836
import asyncio import logging import socket logger = logging.getLogger(__name__) all_endpoints = [] def reset_pypeman_endpoints(): """ clears book keeping of all endpoints Can be useful for unit testing. """ all_endpoints.clear() class BaseEndpoint: def __init__(self): all_endpo...
0
1,439
14
991
0
0
0
-15
90
162b96b51249301f1c4ae7e666bd60e4bfd68af2
677
py
Python
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
import networkx as nx import matplotlib.pyplot as plt G_fb = nx.read_edgelist("facebook_combined.txt", create_using = nx.Graph(), nodetype=int) print(nx.info(G_fb)) # if need drawing ps = nx.spring_layout(G_fb) nx.draw(G_fb, ps, with_labels = False, node_size = 5) plt.show() # ps = nx.spring_layout(G_fb) # betCent =...
33.85
89
0.694239
import networkx as nx import matplotlib.pyplot as plt G_fb = nx.read_edgelist("facebook_combined.txt", create_using = nx.Graph(), nodetype=int) print(nx.info(G_fb)) # if need drawing ps = nx.spring_layout(G_fb) nx.draw(G_fb, ps, with_labels = False, node_size = 5) plt.show() # ps = nx.spring_layout(G_fb) # betCent =...
0
0
0
0
0
0
0
0
0
6482b7c2f93f1b8d9a3b2bfa04efecc920a5fabc
1,200
py
Python
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
null
null
null
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
1
2020-11-14T09:42:28.000Z
2020-11-14T09:42:28.000Z
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
null
null
null
from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg # Create the main application instance pg.setConfigOption('background', 'w') app = pg.mkQApp() view = pg.PlotWidget() view.resize(800, 600) view.setWindowTitle('Scatter plot using pyqtgraph with PyQT5') view.setAspectLocked(True) view.sh...
23.529412
82
0.6875
from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import random # Create the main application instance pg.setConfigOption('background', 'w') app = pg.mkQApp() view = pg.PlotWidget() view.resize(800, 600) view.setWindowTitle('Scatter plot using pyqtgraph with PyQT5') view.setAspectLocked...
0
0
0
0
0
164
0
-8
45
13bf024126f34b18d324f0ca9bb1bb8e2e18d82c
2,229
py
Python
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python __author__ = 'Tony Beltramelli - www.tonybeltramelli.com' import tensorflow as tf sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) import sys if __name__ == "__main__": argv = sys.argv[1:] if len(argv) < 2: print "Error: not enough argument supplied:" ...
34.292308
126
0.720054
#!/usr/bin/env python __author__ = 'Tony Beltramelli - www.tonybeltramelli.com' import tensorflow as tf sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) import sys from classes.dataset.Generator import * from classes.model.pix2code import * def run(input_path, output_path, is_memory_intensive=Fa...
0
0
0
0
0
1,351
0
33
68
557b7f3c6e40e0d49df35a36e2bb1426aaf857c8
2,209
py
Python
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Create function which removes the specified device policies from ChromeDeviceSettingsProto. This function is primarily intended to be used for the impleme...
31.112676
79
0.722952
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Create function which removes the specified device policies from ChromeDeviceSettingsProto. This function is primarily intended to be used for the impleme...
0
0
0
0
0
1,203
0
12
46
27a22c03eb1f5ac3a0f550ccf77ba60c76ff7601
1,418
py
Python
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
from logging import getLogger logger = getLogger(__name__)
24.033898
73
0.614951
import json from logging import getLogger import attr from sqlalchemy import Text, TypeDecorator, create_engine from sqlalchemy.orm import sessionmaker logger = getLogger(__name__) class JSONSerialized(TypeDecorator): impl = Text def process_bind_param(self, value, dialect): return json.dumps(value...
0
986
0
201
0
0
0
34
135
bec5a5fbc0c17c5944c8cd04be49c871c91a55a9
651
py
Python
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
2
2019-09-04T03:29:12.000Z
2021-03-02T07:22:08.000Z
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
null
null
null
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
3
2019-09-04T05:57:02.000Z
2019-09-15T21:21:47.000Z
# This modules contains definitions used in Exercise Files from typing import Any def print_with_title( output: Any, title: str = '', linebreaks_before: int = 2, linebreaks_after: int = 2, put_stars_after: bool = True, ) -> None: """ Print linebreak-padded output with a...
23.25
76
0.589862
# This modules contains definitions used in Exercise Files from typing import Any def print_with_title( output: Any, title: str = '', linebreaks_before: int = 2, linebreaks_after: int = 2, put_stars_after: bool = True, ) -> None: """ Print linebreak-padded output with a...
0
0
0
0
0
0
0
0
0
0778ebef3af258a1d259010e5612ff39de977bce
9,513
py
Python
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
'''MobileNetV3 in PyTorch. See the paper "Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation" for more details. ''' import torch.nn as nn import sys sys.path.append(".") from meta_utils.meta_quantized_module import MetaQuantConv def conv3x3(in_planes, out_plane...
36.588462
130
0.589089
'''MobileNetV3 in PyTorch. See the paper "Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation" for more details. ''' import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init import os import sys sys.path.append(".") from meta_ut...
0
0
0
7,712
0
603
0
34
294
0ee0394192b51c955a40df3785735b6429d88380
5,445
py
Python
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.8125
118
0.673462
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
4,436
0
0
0
0
69
498ed27d25aaf7bb70dce790b84d513d20aa617b
106
py
Python
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
2
2018-08-09T10:35:42.000Z
2020-12-04T06:38:09.000Z
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
2
2018-08-22T08:02:16.000Z
2019-12-05T08:23:31.000Z
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
null
null
null
""" This package is used to simulate RPi.GPIO library during development or if GPIO are not available. """
35.333333
98
0.764151
""" This package is used to simulate RPi.GPIO library during development or if GPIO are not available. """
0
0
0
0
0
0
0
0
0
3231a1157ec2cc99477ddef20110685bb4430f56
2,155
py
Python
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
5
2019-08-30T09:56:27.000Z
2021-02-22T11:08:34.000Z
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
null
null
null
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
6
2018-10-12T07:50:11.000Z
2020-10-18T05:39:49.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 18 15:34:25 2018 @author: philld """ import json specfile="../../docs/spec/src/info_openapi.json" #docsfile="../../docs/input/web_api.cm" docsfile="/home/philld/reps/dhis2-docs/src/commonmark/en/content/developer/web-api.md" ofile=open(specfile,...
25.05814
121
0.49884
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 18 15:34:25 2018 @author: philld """ import requests import json import re specfile="../../docs/spec/src/info_openapi.json" #docsfile="../../docs/input/web_api.cm" docsfile="/home/philld/reps/dhis2-docs/src/commonmark/en/content/developer/web-api...
0
0
0
0
0
1,455
0
-18
114
edc42480a50e42e688504cc06387909d1322efa2
1,471
py
Python
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
6
2019-02-12T17:49:41.000Z
2020-04-15T10:28:49.000Z
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
3
2020-07-01T13:45:44.000Z
2020-10-07T14:40:52.000Z
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
6
2019-02-21T11:20:19.000Z
2020-04-02T10:20:00.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas_rhino.geometry import RhinoCurve __all__ = [ 'RhinoCurve' ]
27.240741
107
0.601632
from __future__ import print_function from __future__ import absolute_import from __future__ import division import rhinoscriptsyntax as rs from compas_rhino.geometry import RhinoCurve __all__ = [ 'RhinoCurve' ] class RhinoCurve(RhinoCurve): def __init__(self): super(RhinoCurve, self).__init__() ...
0
0
0
1,228
0
0
0
9
46
7eaede2556eae82c47ba4345831762e978e83739
547
py
Python
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
28
2015-08-25T06:13:44.000Z
2022-02-17T03:39:18.000Z
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
11
2015-09-15T07:31:02.000Z
2021-02-09T10:30:13.000Z
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
8
2015-02-17T23:45:06.000Z
2021-09-05T09:51:51.000Z
from __future__ import unicode_literals
17.09375
59
0.66362
from __future__ import unicode_literals from requests import auth class BaseAuth(auth.AuthBase): def __init__(self, key): self.key = key @property def scheme(self): raise NotImplementedError @property def auth_header(self): return '{} {}'.format(self.scheme, self.key) ...
0
112
0
296
0
0
0
4
92
4f209a3661740bb773beeff9691143e7078681ef
343
py
Python
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
4
2018-06-13T23:50:13.000Z
2021-09-25T16:27:34.000Z
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
null
null
null
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
null
null
null
from pyrocko import moment_tensor as mtm magnitude = 5.4 exp = mtm.magnitude_to_moment(magnitude) # convert the mag to moment in [Nm] # init pyrocko moment tensor m = mtm.MomentTensor( mnn = 0.04*exp, mee = 0.6*exp, mdd = -0.63*exp, mne = 0.04*exp, mnd = 0.5*exp, med = 0.21*exp) print(m) #...
18.052632
77
0.638484
from pyrocko import moment_tensor as mtm magnitude = 5.4 exp = mtm.magnitude_to_moment(magnitude) # convert the mag to moment in [Nm] # init pyrocko moment tensor m = mtm.MomentTensor( mnn = 0.04*exp, mee = 0.6*exp, mdd = -0.63*exp, mne = 0.04*exp, mnd = 0.5*exp, med = 0.21*exp) print(m) #...
0
0
0
0
0
0
0
0
0
ba371eaf23d5032469dfe1818f54ece09f6d0052
1,384
py
Python
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
1
2020-08-03T18:09:46.000Z
2020-08-03T18:09:46.000Z
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
null
null
null
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Falcon app used for testing.""" # standard library import logging # third-party import falcon # first-party from falcon_provider_logger.middleware import LoggerMiddleware logger: object = logging.getLogger('custom') app_custom_logger = falcon.API(middleware=[LoggerMiddleware(logger=logge...
31.454545
76
0.642341
# -*- coding: utf-8 -*- """Falcon app used for testing.""" # standard library import logging from typing import Any # third-party import falcon # first-party from falcon_provider_logger.middleware import LoggerMiddleware class LoggerCustomLoggerResource: """Logger middleware testing resource.""" log = None...
0
0
0
940
0
0
0
1
45
2504132d12d78a2baab76691825092820fad4917
4,063
py
Python
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
2
2019-06-14T11:37:37.000Z
2020-04-16T08:30:43.000Z
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
5
2020-01-28T22:44:22.000Z
2022-02-10T00:10:07.000Z
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
1
2020-12-03T19:48:28.000Z
2020-12-03T19:48:28.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Poshan Didi! """ import logging import logging.handlers import beneficiary_bot import nurse_bot from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from simple_settings import settings from registration import registration_conversation # Enable...
38.695238
105
0.679793
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Poshan Didi! """ import logging import logging.handlers import beneficiary_bot import nurse_bot from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from simple_settings import settings from registration import registration_conversation # Enable...
0
0
0
0
0
0
0
0
0
445b411ea6aba700be77b4ec60ac04e0382d24d7
94,119
py
Python
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
null
null
null
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
2
2017-11-18T00:53:33.000Z
2017-11-18T00:53:40.000Z
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
null
null
null
''' Policy and intrinsic reward models. ''' import tensorflow as tf from curiosity.models import jerk_models import distutils.version use_tf1 = distutils.version.LooseVersion(tf.VERSION) >= distutils.version.LooseVersion('1.0.0') #TODO replace all these makeshift helpers def postprocess_depths(depths): ''' Ass...
45.446161
239
0.591772
''' Policy and intrinsic reward models. ''' import numpy as np import tensorflow as tf from curiosity.models.model_building_blocks import ConvNetwithBypasses from curiosity.models import explicit_future_prediction_base as fp_base from curiosity.models import jerk_models import distutils.version use_tf1 = distutils.ve...
0
0
0
47,407
0
37,240
0
96
1,219
f285b53393c80a26f933621bf1ae088ff4e1744b
20
py
Python
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
1
2019-06-22T23:27:48.000Z
2019-06-22T23:27:48.000Z
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
null
null
null
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
null
null
null
print("part1~")
20
20
0.75
print("part1包被导入了~")
15
0
0
0
0
0
0
0
0
4c31524748798164fb9eae86397590e6f331b78e
3,554
py
Python
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
56
2018-09-26T05:03:51.000Z
2022-02-16T12:27:46.000Z
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
25
2018-08-14T05:33:29.000Z
2022-02-13T00:50:21.000Z
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
5
2019-08-05T03:59:01.000Z
2022-01-07T06:44:12.000Z
from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
33.847619
119
0.619021
from dictdiffer import diff from sqlalchemy import Column, Integer, String from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class User(Base): __tablename__ = 'user' MAX_NAME_LENGTH = 100 MAX_SIGN_LENGTH = 200 MAX_URL_L...
0
1,763
0
1,560
0
0
0
58
89
c6dcf725bd23764de094f21a2a52e9e26e955427
1,982
py
Python
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
2
2020-02-06T17:30:41.000Z
2020-08-04T10:35:46.000Z
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
null
null
null
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
null
null
null
if __name__ == '__main__' : erode_all(True)
29.58209
88
0.639758
import os import shutil import json import time import cv2 import numpy as np import PIL def convert_image_to_numpy(image) : (im_width, im_height) = image.size image_np = np.fromstring(image.tobytes(), dtype='uint8', count=-1, sep='') array_shape = (im_height, im_width, int(image_np.shape[0] / (im_height...
0
0
0
0
0
1,726
0
-65
273
1f5f867f3aa5f7e0ba66ce34207df1dc5f2a5fb9
1,636
py
Python
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
import sys # print arg if __name__=='__main__': codes = [] for line in sys.stdin: codes.append(line.strip()) print(part_one(codes)) print(part_two(codes))
25.968254
90
0.562958
import sys import unittest import re from operator import itemgetter import argparse import traceback class TestStuff(unittest.TestCase): def data(self): return [("FBFBBFFRLR",44,5,357), ("BFFFBBFRRR", 70,7,567), ("FFFBBBFRRR",14,7,119), ...
0
0
0
406
0
743
0
-19
322
168126d2820d2157fdd1ef197a9231cf648a48f9
3,613
py
Python
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
19
2019-07-18T21:38:38.000Z
2020-10-24T09:23:37.000Z
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
1
2019-11-29T02:58:08.000Z
2019-12-01T06:11:16.000Z
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
2
2019-12-18T11:37:39.000Z
2020-02-04T16:23:20.000Z
# name list obtained from: https://www.ssa.gov/oact/babynames/decades/century.html # accessed on Nov 6th, 2018 if __name__ == '__main__': lex = PronounLexicon() all_words = lex.all_words() in_file_path = "data/CBTest/data/cbt_train.txt" all_lens = [] all_gaps = [] with open(in_file_path) as f:...
35.421569
104
0.549405
from collections import defaultdict # name list obtained from: https://www.ssa.gov/oact/babynames/decades/century.html # accessed on Nov 6th, 2018 class PronounLexicon(): def __init__(self, lexfile='pronouns.tsv'): self.lexicon = defaultdict(lambda : []) with open(lexfile) as fin: for ...
0
0
0
2,105
0
232
0
14
72
9b8cd41c9a88310c1ecf7675400e3a30e40f64f5
547
py
Python
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
# Generated by Django 3.2.2 on 2021-06-29 09:49
27.35
169
0.669104
# Generated by Django 3.2.2 on 2021-06-29 09:49 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('EasyView', '0007_viewpoint_clip_constants_status'), ] operations = [ migrations.AddField( model_na...
0
0
0
403
0
0
0
27
68
d31eb94754bb97b7c63aef350da8ea3fdf10c568
70
py
Python
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-15T21:30:36.000Z
2022-02-15T21:30:36.000Z
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
null
null
null
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-08T19:32:45.000Z
2022-02-08T19:32:45.000Z
# Autogenerated file.
23.333333
47
0.785714
# Autogenerated file. from .client import ButtonClient # type: ignore
0
0
0
0
0
0
0
11
37
3971d41dd74aa8b1d61ef664ed7ac809a3618325
1,153
py
Python
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
error_while_importing = None try: except Exception as e: error_while_importing = e __all__ = ('TestImportAll',)
32.027778
83
0.711188
import sys from django.test import TestCase error_while_importing = None try: from easymode import * from easymode.admin import * from easymode.admin.forms import * from easymode.admin.models import * from easymode.debug import * from easymode.i18n import * from easymode.i18n.admin import ...
0
0
0
317
0
0
0
183
535
4a957084737ee6e07aec48c0b2028bfbead767f9
16,779
py
Python
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
177
2017-08-18T10:22:21.000Z
2022-03-06T23:20:12.000Z
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
77
2017-08-18T00:40:15.000Z
2022-02-11T18:52:10.000Z
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
36
2017-08-23T02:34:14.000Z
2022-01-03T13:12:02.000Z
#!/usr/bin/env python3 """ Wal Steam ======================================== oooo oooo . `888 .8P' .o8 888 d8' .ooooo. .o888oo .oooo. 88888[ d88' `88b 888 `P )88b 888`88b. 888 888 888 .oP"888 888 `88b. 888 888 888 . d8( 888 o888o o888o `Y8bod8P' ...
33.491018
181
0.630312
#!/usr/bin/env python3 """ Wal Steam ======================================== oooo oooo . `888 .8P' .o8 888 d8' .ooooo. .o888oo .oooo. 88888[ d88' `88b 888 `P )88b 888`88b. 888 888 888 .oP"888 888 `88b. 888 888 888 . d8( 888 o888o o888o `Y8bod8P' ...
0
0
0
0
0
12,920
0
-21
967
2ccfa7cbd536230e887665371eaf8ff4ae36b4f9
200
py
Python
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
10
2021-10-04T01:21:51.000Z
2021-11-17T09:26:17.000Z
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
1
2021-10-04T01:38:15.000Z
2021-10-04T01:38:15.000Z
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
2
2021-11-20T14:41:56.000Z
2022-02-09T18:49:29.000Z
import requests def fetch(*, url, headers): """ Send a GET request and return response as Python object """ response = requests.get(url, headers=headers) return response.json()
18.181818
59
0.66
import requests def fetch(*, url, headers): """ Send a GET request and return response as Python object """ response = requests.get(url, headers=headers) return response.json()
0
0
0
0
0
0
0
0
0
3da24ba73dbb35056c554b2c9b424a1f2befb527
1,453
py
Python
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
32
2019-05-16T19:25:00.000Z
2021-12-07T20:12:13.000Z
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-01-07T03:08:33.000Z
2021-01-07T03:08:33.000Z
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
11
2019-07-23T17:37:48.000Z
2021-10-19T15:24:33.000Z
# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 Blue Cheetah Analog Design Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
29.653061
81
0.722643
# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 Blue Cheetah Analog Design Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
0
0
0
0
0
365
0
-6
69
8f70e1a6887b98e59c86a33ce0edc6d78eddf21a
523
py
Python
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
null
null
null
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
null
null
null
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
1
2020-10-01T03:30:42.000Z
2020-10-01T03:30:42.000Z
#!/usr/bin/env python3
21.791667
57
0.594646
#!/usr/bin/env python3 import argparse import re import sys import requests def getID(username): url = "https://www.instagram.com/{}" r = requests.get(url.format(username)) html = r.text if r.ok: return re.findall('"id":"(.*?)",', html)[0] else: return "invalid_username" def userDe...
0
0
0
0
0
401
0
-35
134
af41a834d1cccc2cce84e521eb37ee8cfb3a792d
2,123
py
Python
cloudformation/add_cloudflare_ips_to_sgs.py
juliecentofanti172/juliecentofanti.github.io
446ea8522b9f4a6709124ebb6e0f675acf7fe205
[ "CC0-1.0" ]
134
2018-05-23T14:00:29.000Z
2022-03-10T15:47:53.000Z
cloudformation/add_cloudflare_ips_to_sgs.py
ptrourke/concordia
56ff364dbf38cb8a763df489479821fe43b76d69
[ "CC0-1.0" ]
1,104
2018-05-22T20:18:22.000Z
2022-03-31T17:28:40.000Z
cloudformation/add_cloudflare_ips_to_sgs.py
ptrourke/concordia
56ff364dbf38cb8a763df489479821fe43b76d69
[ "CC0-1.0" ]
32
2018-05-22T20:22:38.000Z
2021-12-21T14:11:44.000Z
#!/usr/bin/env python3 """ Ensure that every security group tagged with AllowCloudFlareIngress has permissions for every public CloudFlare netblock """ import boto3 import requests EC2_CLIENT = boto3.client("ec2") CLOUDFLARE_IPV4 = requests.get("https://www.cloudflare.com/ips-v4").text.splitlines() CLOUDFLARE_IPV6 =...
30.328571
87
0.681583
#!/usr/bin/env python3 """ Ensure that every security group tagged with “AllowCloudFlareIngress” has permissions for every public CloudFlare netblock """ import sys import boto3 import requests from botocore.exceptions import ClientError EC2_CLIENT = boto3.client("ec2") CLOUDFLARE_IPV4 = requests.get("https://www.c...
6
0
0
0
323
1,126
0
11
91
8081ee348f5ac1ea91c76d0d12aed0bb2eb67a0b
7,391
py
Python
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
3
2020-10-08T09:37:03.000Z
2022-03-29T04:05:42.000Z
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
null
null
null
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
null
null
null
ID = "2020-10-04T21:27:16" VERSION = "0.13.4"
25.139456
63
0.492085
from piccolo.apps.migrations.auto import MigrationManager from piccolo.columns.base import OnDelete, OnUpdate from piccolo.columns.defaults.timestamp import TimestampNow from piccolo.table import Table class Ad(Table, tablename="ad"): pass class User(Table, tablename="piccolo_user"): pass ID = "2020-10-04...
0
0
7,017
52
0
0
0
114
157
470d82fe0f9ff4d06e37cfd357a2fd5d5db8cc6b
2,024
py
Python
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
2
2021-03-12T10:36:16.000Z
2021-04-03T09:45:54.000Z
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
null
null
null
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
1
2021-03-08T13:31:53.000Z
2021-03-08T13:31:53.000Z
# -*- coding: utf-8 -*-
23.811765
93
0.51581
# -*- coding: utf-8 -*- from math import ceil from .SolarMonth import SolarMonth class SolarSeason: """ 阳历季度 """ MONTH_COUNT = 3 def __init__(self, year, month): self.__year = year self.__month = month @staticmethod def fromDate(date): return SolarSeason(date.ye...
186
127
0
1,729
0
0
0
13
68
1ef5269a29ed14f340b7b35a1d453fbf4107d653
418
py
Python
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1
2019-04-21T18:57:57.000Z
2019-04-21T18:57:57.000Z
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
null
null
null
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-10-24 19:02
23.222222
72
0.617225
# Generated by Django 2.0.5 on 2018-10-24 19:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dedupper', '0003_auto_20181024_1653'), ] operations = [ migrations.AlterField( model_name='progress', name='completed...
0
0
0
304
0
0
0
19
46
6ba3dd8d2110f5406aabb2ce13d75dbd24ed27c4
943
py
Python
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
1
2017-04-14T11:53:47.000Z
2017-04-14T11:53:47.000Z
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
null
null
null
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
1
2019-11-06T00:15:48.000Z
2019-11-06T00:15:48.000Z
# -*- coding: utf-8 -*- line endings: unix -*- __author__ = 'quixadhal' import os import sys import time import sysutils import log_system import db_system logger = log_system.init_logging() sys.path.append(os.getcwd()) if __name__ == '__main__': logger.boot('System booting.') snapshot = sysutils.ResourceSn...
26.194444
98
0.706257
# -*- coding: utf-8 -*- line endings: unix -*- __author__ = 'quixadhal' import os import sys import time import sysutils import log_system import db_system logger = log_system.init_logging() sys.path.append(os.getcwd()) if __name__ == '__main__': logger.boot('System booting.') snapshot = sysutils.ResourceSn...
0
0
0
0
0
0
0
0
0
1594aebaf6d0841b2caf45d8aa4b867e7d74fc2d
616
py
Python
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
null
null
null
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
null
null
null
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
1
2018-10-08T17:08:48.000Z
2018-10-08T17:08:48.000Z
import pandas as pa #%% datset=pa.read_csv("datasets/One.csv") #datset_district=datset.drop_duplicates('District_Name')['District_Name'] datset_crop=datset.drop_duplicates('crop')['crop'] #%% for i in datset_crop: value=(datset.loc[(datset['crop'] == i)]) for j in headers: mean_1=(value[j]).mean() ...
29.333333
73
0.751623
import pandas as pa import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.model_selection import cross_val_score #%% datset=pa.read_cs...
0
0
0
0
0
0
0
143
136
983f1d8504e2d7ad92153087a3f6fde57e6d1a35
345
py
Python
python/load_data.py
dnbh/kpg
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
69
2018-01-08T19:56:55.000Z
2022-03-05T17:14:05.000Z
python/load_data.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
6
2018-04-14T21:09:51.000Z
2021-07-17T21:08:54.000Z
python/load_data.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
11
2018-03-21T19:28:35.000Z
2021-06-29T17:33:34.000Z
#!/usr/bin/env python if __name__ == "__main__": import sys data = load_data(sys.argv[1]) print("data: %s, %s" % (data, str(data.shape)))
23
59
0.542029
#!/usr/bin/env python import numpy as np def load_data(path): return np.array([line.strip().split('\t')[2:] for line in open(path) if line[0] != "#"], dtype=np.double) if __name__ == "__main__": import sys data = load_data(sys.argv[1]) print("data: %s, %s" % ...
0
0
0
0
0
150
0
-3
45
db472a55122303d1be9380f2fcee3bbadb791f64
56
py
Python
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
46
2020-03-27T20:12:32.000Z
2021-11-21T19:08:51.000Z
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
2
2020-04-06T10:43:04.000Z
2020-07-01T18:26:10.000Z
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
5
2020-04-17T14:09:53.000Z
2021-05-10T08:58:29.000Z
# flake8: noqa
18.666667
40
0.821429
# flake8: noqa from catalyst_rl.dl import AlchemyRunner
0
0
0
0
0
0
0
19
22
74525a6c7c9b583ed6d5b4b3b60fdfe64f60b9f1
766
py
Python
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
null
null
null
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
null
null
null
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
1
2020-01-18T15:55:04.000Z
2020-01-18T15:55:04.000Z
# -*- coding: utf-8 -*- """Python interface to GnuCash documents""" from . import metadata __version__ = metadata.version __author__ = metadata.authors[0] __license__ = metadata.license __copyright__ = metadata.copyright
26.413793
60
0.761097
# -*- coding: utf-8 -*- """Python interface to GnuCash documents""" from . import metadata __version__ = metadata.version __author__ = metadata.authors[0] __license__ = metadata.license __copyright__ = metadata.copyright from ._common import ( GncNoActiveSession, GnucashException, GncValidationError, GncImbal...
0
0
0
0
0
0
0
367
177
a7030cae2429a487b2f2fa49806ec37f38fc6875
107
py
Python
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 20 12:17:30 2021 @author: jorge """
13.375
35
0.598131
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 20 12:17:30 2021 @author: jorge """
0
0
0
0
0
0
0
0
0
07f74a95da853c13aa66d869a6ab1ec3af5c3c47
14,957
py
Python
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
40.424324
119
0.588487
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
0
0
0
13,399
0
749
0
-1
293
d7b9d85d7abdc6211c2282d0512cf4ac7d2aadf3
113
py
Python
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
n = int(input()) F = [0]*(n+1) F[0], F[1] = 0, 1 for i in range(2, n+1): F[i] = F[i-1] + F[i-2] print(F[n])
14.125
26
0.424779
n = int(input()) F = [0]*(n+1) F[0], F[1] = 0, 1 for i in range(2, n+1): F[i] = F[i-1] + F[i-2] print(F[n])
0
0
0
0
0
0
0
0
0
e6d489f5056d991fbe7591b3c1f265cf7f919903
5,917
py
Python
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
647
2020-03-16T16:47:50.000Z
2022-03-31T23:29:40.000Z
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
71
2020-03-17T10:58:14.000Z
2022-03-23T08:53:12.000Z
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
110
2020-03-16T17:39:45.000Z
2022-03-25T22:26:39.000Z
import torch.nn as nn
34.805882
88
0.653034
from typing import List, Optional import numpy as np import torch import torch.nn as nn from gluonts.core.component import validated from gluonts.dataset.field_names import FieldName from gluonts.torch.util import copy_parameters from gluonts.torch.model.predictor import PyTorchPredictor from gluonts.model.predictor ...
0
1,672
0
3,486
0
0
0
423
313
f5f389bfc7ade10eb551a3065beaed24b6f9f866
2,295
py
Python
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
44.134615
178
0.817865
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v4.proto.resources import income_range_view_pb2 as google_dot_ads_dot_googleads__v4_dot_proto_dot_resources_dot_income__range__view__pb2 from google.ads.google_ads.v4.proto.services import income_range_view_ser...
0
0
0
1,096
0
701
0
289
136
d4c77b1a26c287554651e6a15191ae129fda0e2d
528
py
Python
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
10
2015-12-18T16:41:33.000Z
2018-11-11T08:36:46.000Z
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
96
2015-07-14T22:45:56.000Z
2017-07-25T19:59:48.000Z
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
9
2015-07-28T14:38:43.000Z
2019-01-04T17:38:42.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
25.142857
137
0.666667
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import wagtail.images.models class Migration(migrations.Migration): dependencies = [ ('images', '0003_auto_20160405_1542'), ] operations = [ migrations.AlterField( model_...
0
0
0
369
0
0
0
26
68
1ee85e632b42753a0f412f31534072b3a6255c3d
1,851
py
Python
make_phr2sg_id.py
Kyubyong/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
79
2019-05-21T06:41:46.000Z
2021-08-06T13:07:38.000Z
make_phr2sg_id.py
abhijitdalavi/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
2
2019-05-28T19:28:24.000Z
2020-04-07T01:17:45.000Z
make_phr2sg_id.py
abhijitdalavi/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
16
2019-05-27T06:10:38.000Z
2020-10-21T06:19:21.000Z
''' Make two dictionaries: phr2sg_id and sg_id2phr phr2sg_id["nice work']==6152 phr2sg_id["nicely done']==6152 phr2sg_id["nice going']==6152 sg_id2phr[6152]=="Well done." ''' import json, os import operator import pickle from hparams import hp from tqdm import tqdm if __name__ == "__main__": print("Determine t...
29.380952
83
0.579687
''' Make two dictionaries: phr2sg_id and sg_id2phr phr2sg_id["nice work']==6152 phr2sg_id["nicely done']==6152 phr2sg_id["nice going']==6152 sg_id2phr[6152]=="Well done." ''' import json, os import operator import pickle from hparams import hp import re from tqdm import tqdm def refine(text): text = text.lower...
0
0
0
0
0
78
0
-12
45
9ce2a8640535b80e39865e972b8191dfea0819ec
3,922
py
Python
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
null
null
null
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
2
2019-12-24T00:03:49.000Z
2019-12-24T00:03:50.000Z
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
null
null
null
"""Tareas de Celery.""" # Django from django.conf import settings from django.utils import timezone # Utilities import jwt from datetime import timedelta # Celery # Models def gen_verification_token(user): """Crea un token JWT que el usuario pueda usar para verificar su cuenta""" # El self se utili...
46.690476
114
0.703723
"""Tareas de Celery.""" # Django from django.conf import settings from django.template.loader import render_to_string from django.utils import timezone from django.core.mail import EmailMultiAlternatives # Utilities import jwt from datetime import timedelta # Celery from celery.decorators import task, periodic_task ...
2
2,751
0
0
0
0
0
116
156
0360fb911ea98bc93a9c5ce44d7d498eacc0e89d
727
py
Python
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Balanced Brackets # # Write a function that accepts a string consisting entiring of brackets # (`[](){}`) and returns whether it is balanced. Every "opening" bracket must # be followed by a closing bracket of the same type. There can also be nested # brackets, which...
22.030303
78
0.500688
#!/usr/bin/env python # -*- coding: utf-8 -*- # Balanced Brackets # # Write a function that accepts a string consisting entiring of brackets # (`[](){}`) and returns whether it is balanced. Every "opening" bracket must # be followed by a closing bracket of the same type. There can also be nested # brackets, which...
0
0
0
0
0
201
0
0
23
5d186bbf0c94ad97c379b5beb8f402cd5fe1c4a8
9,689
py
Python
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
import django if django.VERSION >= (1, 7): for lookup_name in ('exact', 'gt', 'gte', 'lt', 'lte'): class_name = 'EncryptedLookup_%s' % lookup_name lookup_class = type(class_name, (EncryptedLookup,), {'lookup_name': lookup_name}) BaseEncryptedField.register_lookup(lookup_class)
39.386179
119
0.655898
from django import forms from django.conf import settings from django.core import validators from django.db import models from django.utils import six, timezone from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ import django from .base import aes_pad_key, armor, dearm...
0
0
0
8,759
0
0
0
153
460
f0c4eea2eb341f55afdd3f15c4cd9f1759fbd1e6
131
py
Python
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.examplePlugin, name='examplePlugin'), ]
18.714286
58
0.70229
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.examplePlugin, name='examplePlugin'), ]
0
0
0
0
0
0
0
0
0
4105abcfda06aac463d907f00d48142f9f8cdc20
1,544
py
Python
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
6
2020-02-17T13:44:43.000Z
2020-06-25T15:35:05.000Z
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
# -*- coding: utf-8 -*- """ Test resemblance of HM and RS trees Created on Sun Jun 14 00:33:52 2015 @author: hoseung """ # Load HM from astropy.io import fits from astropy.table import Table import tree wdir = '/home/hoseung/Work/data/AGN2/' data = fits.getdata(wdir + "halo/TMtree.fits", 1) hmt = Table(data) #%% i...
26.169492
91
0.645078
# -*- coding: utf-8 -*- """ Test resemblance of HM and RS trees Created on Sun Jun 14 00:33:52 2015 @author: hoseung """ # Load HM from astropy.io import fits from astropy.table import Table import tree wdir = '/home/hoseung/Work/data/AGN2/' data = fits.getdata(wdir + "halo/TMtree.fits", 1) hmt = Table(data) #%% i...
0
0
0
0
0
0
0
0
0
3b29ed288583c49b6b5414b265a987a5d61de758
54,054
py
Python
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
13
2020-11-07T22:03:35.000Z
2022-01-12T22:08:53.000Z
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
null
null
null
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
4
2020-11-23T16:24:03.000Z
2022-03-25T01:25:21.000Z
from warnings import warn try: except: warn('Ensure that all required packages are installed.') exit()
32.194163
116
0.566064
from builtins import setattr, getattr from fractions import Fraction import math from multiprocessing import Process, Manager from warnings import warn, showwarning try: from sympy import * import numpy as np from scipy.stats import norm, beta, gamma, expon from scipy.linalg import pascal from scip...
0
0
0
52,788
0
0
0
491
656
3b43290f57f5361d72dccd25ab08a3672574209a
518
py
Python
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
1
2021-02-05T03:17:43.000Z
2021-02-05T03:17:43.000Z
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
null
null
null
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
2
2020-10-20T12:36:35.000Z
2021-02-05T03:37:30.000Z
import numpy as np from module.lightCNN_model_in_numpy import LightCNN9_in_numpy def get_net(path): ''' be used to get class net :param para: :return: ''' print('Loading network...') cfg = np.load(path, allow_pickle=True) cfg = cfg.item() net = LightCNN9_in_numpy(cfg) return ne...
20.72
61
0.65444
import os import numpy as np import cv2 from module.lightCNN_model_in_numpy import LightCNN9_in_numpy def get_net(path): ''' be used to get class net :param para: :return: ''' print('Loading network...') cfg = np.load(path, allow_pickle=True) cfg = cfg.item() net = LightCNN9_in_num...
0
0
0
0
0
111
0
-23
67
f0b51b9f7d466f08118ff51d5a5c47810f375d48
13,354
py
Python
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
1
2022-01-28T00:56:23.000Z
2022-01-28T00:56:23.000Z
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
null
null
null
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
null
null
null
''' Code of testing ''' import logging import os import sys import torch import torch.nn as nn import matplotlib import matplotlib.pyplot as plt from model import Resnet101_fl, InceptionV3_fl, Densenet161_fl, Resnext101_32x8d_fl, MobilenetV2_fl, Vgg16_bn_fl, Efficientnet_fl #torch.distributed.init_process_group(back...
43.640523
384
0.626704
''' Code of testing ''' import argparse import logging import os import sys import csv import time import torch import numpy as np import pandas as pd import torch.nn as nn from tqdm import tqdm from pycm import * import matplotlib import matplotlib.pyplot as plt from dataset import BasicDataset_OUT from torch.utils.d...
0
0
0
0
0
7,993
0
-2
244
b90f7db21c8d8c225c6f1cad8ec1625177bb1306
128
py
Python
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
from googlesearch import search query = "fastapi" for i in search(query, tld="co.in", num=10, stop=10, pause=2): print(i)
21.333333
62
0.679688
from googlesearch import search query = "fastapi" for i in search(query, tld="co.in", num=10, stop=10, pause=2): print(i)
0
0
0
0
0
0
0
0
0
1b70ce2758a4f45779a3bc09fae2ec3f214f03e2
1,403
py
Python
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
6
2020-06-17T21:56:28.000Z
2021-12-17T18:15:51.000Z
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
3
2019-05-24T00:03:45.000Z
2020-06-11T07:23:36.000Z
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
1
2020-06-17T21:57:57.000Z
2020-06-17T21:57:57.000Z
# Created on 5/21/20 # Author: Ari Liloia and Michael Wehar
45.258065
95
0.595866
# Created on 5/21/20 # Author: Ari Liloia and Michael Wehar def rectExists(m, n, matrix): # This set will store pairs of column indexes columnPairs = set() # Traverse through the matrix row by row for i in range(m): currentRow = [] # Traverse through current row's elements to find all 1...
0
0
0
0
0
1,320
0
0
23
70b6edf1d7ed5c850c6fa6c6f71b89b1b6eca662
1,026
py
Python
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
null
null
null
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
1
2021-02-05T07:58:20.000Z
2021-02-05T07:58:20.000Z
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
2
2021-01-25T14:50:14.000Z
2021-05-24T22:07:12.000Z
# -*- coding: utf-8 -*- """ Created on Sun Jan 17 04:01:48 2021 @author: Adham """
25.65
54
0.568226
# -*- coding: utf-8 -*- """ Created on Sun Jan 17 04:01:48 2021 @author: Adham """ from .Model import model import numpy as np import pickle def hot_one(labels, num_classes): num_of_examples = labels.shape[0] hot_one = np.zeros((num_classes, num_of_examples)) for i in range(num_of_examples): hot_...
0
0
0
0
0
815
0
-8
136
7a1e62a32c2100b9e0e9ce8499a978935b09eb5e
1,034
py
Python
src/model.py
vilelabruno/MarcowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
2
2020-03-09T14:39:50.000Z
2020-03-10T12:48:25.000Z
src/model.py
vilelabruno/MarkowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
null
null
null
src/model.py
vilelabruno/MarkowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
null
null
null
if __name__ == "main": main()
34.466667
75
0.569632
from pulp import * def main(): x = LpVariable('x') w_vars = [] problem = LpProblem('portfolio_theory', LpMaximize) for i in range(v.shape[0]): w_i = LpVariable('w_' + str(i), 0, 1) w_vars.append(w_i) for vector in vv_set.set: diff_list = [] for index, _ in enumerate(...
0
0
0
0
0
957
0
-3
46
63b3b97ccf4be9b5fc60a99d9e914cc8ddfdc44a
3,016
py
Python
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.ensemble import RandomForestRegressor trainInput = pd.read_excel("FPL_Season_Data_Only_Inputs_Shuffled2.xlsx") trainInput = trainInput.drop(trainInput.columns[0], axis=1) trainOutput = pd.read_excel("FPL_Season_Data_Only_Outputs_Shuffled2.xlsx") trainOutput = trainOutput.pop("Poi...
33.142857
124
0.726459
import pandas as pd import math from sklearn.ensemble import RandomForestRegressor trainInput = pd.read_excel("FPL_Season_Data_Only_Inputs_Shuffled2.xlsx") trainInput = trainInput.drop(trainInput.columns[0], axis=1) trainOutput = pd.read_excel("FPL_Season_Data_Only_Outputs_Shuffled2.xlsx") trainOutput = trainOu...
0
0
0
0
0
0
0
-10
23
338d5c5eac8fc90fd690b66c2251645f25f8ea2a
2,269
py
Python
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
if __name__ =='__main__': pass #load_adfa_Attack_files("./ADFA-LD/Attack_Data_Master/")
25.494382
81
0.577347
import re import os from numpy.lib.function_base import insert from utils import * def load_one_flle(filename): x = [] with open(filename) as f: line = f.readline() x = line.strip('\n').split() return x def load_adfa_training_files(rootdir): x = [] y = [] list = os.listdir(roo...
0
0
0
0
0
1,901
0
-5
271
b68228d5f4415656679f5941afc1efdf19942bde
3,455
py
Python
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
3
2016-07-29T02:53:26.000Z
2017-04-24T01:17:12.000Z
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
2
2016-07-29T02:58:37.000Z
2016-07-29T12:36:53.000Z
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
null
null
null
import sublime import os import platform if platform.system() == 'Darwin': os_name = 'osx' elif platform.system() == 'Windows': os_name = 'windows' else: os_name = 'linux' # /usr/local/lib/node_modules/lebab/bin/index.js BIN_PATH = os.path.join( sublime.packages_path(), os.path.dirname(os.path.r...
31.697248
92
0.586397
import sublime, sublime_plugin import json import os import platform import subprocess if platform.system() == 'Darwin': os_name = 'osx' elif platform.system() == 'Windows': os_name = 'windows' else: os_name = 'linux' # /usr/local/lib/node_modules/lebab/bin/index.js BIN_PATH = os.path.join( sublime....
0
0
0
2,084
0
912
0
2
90
cbe337a29dd71a50920d6cfe3e1874dc9b6aa136
2,063
py
Python
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
43
2019-10-03T12:30:38.000Z
2020-11-11T10:43:51.000Z
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
16
2020-03-20T15:27:06.000Z
2020-10-07T21:04:07.000Z
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
4
2020-04-26T00:06:39.000Z
2020-11-11T11:44:22.000Z
import io import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) # Package meta-data. NAME = 'chantilly' DESCRIPTION = 'Deployment tool for online machine learning models' LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown' URL = 'https://github.com/creme-ml/chantilly' EMA...
29.056338
76
0.624818
import io import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) # Package meta-data. NAME = 'chantilly' DESCRIPTION = 'Deployment tool for online machine learning models' LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown' URL = 'https://github.com/creme-ml/chantilly' EMA...
0
0
0
0
0
0
0
0
0
d06fd2bcde44153c0b0a860dc6c5189095e2d061
1,738
py
Python
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
2
2019-04-20T00:28:47.000Z
2020-01-31T11:12:43.000Z
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
14
2019-04-22T17:05:11.000Z
2020-11-03T20:49:35.000Z
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
1
2020-05-12T17:34:06.000Z
2020-05-12T17:34:06.000Z
import warnings from marshmallow.warnings import ChangedInMarshmallow3Warning warnings.simplefilter( action='ignore', category=ChangedInMarshmallow3Warning)
35.469388
79
0.643268
import warnings from marshmallow.warnings import ChangedInMarshmallow3Warning from argschema import ArgSchema from argschema.fields import ( InputDir, InputFile, Float, Int, OutputFile, Str, Boolean) warnings.simplefilter( action='ignore', category=ChangedInMarshmallow3Warning) class G...
0
0
0
1,403
0
0
0
94
67
f311ad910ad7272315fb76662295b913c6b7bbed
435
py
Python
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__))
20.714286
82
0.701149
import os basedir = os.path.abspath(os.path.dirname(__file__)) class config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite') DEBUG = True OAUTH_CRENDENTIALS = { 'facebook':{ 'id': os.environ.get('FACEBOOK_I...
0
19
0
327
0
0
0
0
23
f899e276be46e4a405d0eec3da36b75e4e966d04
3,695
py
Python
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2020, Nokia' __email__ = 'marcin.usielski@nokia.com'
38.489583
108
0.685792
# -*- coding: utf-8 -*- __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2020, Nokia' __email__ = 'marcin.usielski@nokia.com' import time from moler.events.unix.ping_no_response import PingNoResponse from moler.util.moler_test import MolerTest import datetime def test_event_ping_no_response(buffer_con...
0
0
0
396
0
2,975
0
46
135
d3f75757c743ea36ba1c319f15db9a5bfa198f72
2,918
py
Python
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
250
2019-05-07T12:56:44.000Z
2022-03-10T15:52:06.000Z
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
410
2019-06-06T20:52:32.000Z
2022-01-18T14:21:48.000Z
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
50
2019-05-10T21:12:24.000Z
2022-01-21T06:39:47.000Z
""" Test that the 'gui' displays long lines/names correctly without overruns. """
41.098592
104
0.679232
""" Test that the 'gui' displays long lines/names correctly without overruns. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test.lldbpexpect import PExpectTest class GuiViewLargeCommandTest(PExpectTest): mydir = TestBase.compute_mydir(__file__) ...
0
2,471
0
200
0
0
0
53
112
1e6a136f2dc13323d6a0e69530cf58722831ce88
5,126
py
Python
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
null
null
null
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
28
2017-06-01T15:46:33.000Z
2021-07-01T18:28:36.000Z
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
6
2017-09-30T13:26:08.000Z
2022-02-13T10:01:18.000Z
""" A collection of common mathematical functions written for high performance with the help of numpy and numba. """ import numpy as np def get_angle(a, b, c): """ Compute the angle given 3 points xyz: array Cartesian coordinates a-c: int atom index for the three points defining...
22.384279
98
0.555989
""" A collection of common mathematical functions written for high performance with the help of numpy and numba. """ import numpy as np from math import sin as msin from math import cos as mcos from numba import jit @jit def dist(p, q): """ Compute distance between two 3D vectors p: array Cartesi...
0
2,569
0
0
0
0
0
14
250
8529c865f5483ed29537d0df2a81c1f23dd2e2c2
2,919
py
Python
examples/pymc/robertson_pymc.py
johnbachman/bayessb
0c4c4d57218edea2786616077600f07ed821337e
[ "BSD-2-Clause" ]
1
2015-04-02T21:04:39.000Z
2015-04-02T21:04:39.000Z
examples/pymc/robertson_pymc.py
LoLab-VU/bayessb
0a21da7383e78ab1d9666f4faa9a57893aa31397
[ "BSD-2-Clause" ]
null
null
null
examples/pymc/robertson_pymc.py
LoLab-VU/bayessb
0a21da7383e78ab1d9666f4faa9a57893aa31397
[ "BSD-2-Clause" ]
null
null
null
from pymc import MvNormal, Lognormal, MCMC import pymc import numpy as np from pysb.examples.robertson import model from pysb.integrate import odesolve, Solver from matplotlib import pyplot as plt # Generate the synthetic data seed = 2 random = np.random.RandomState(seed) sigma = 0.1; ntimes = 20; tspan = np.linspace(...
36.4875
83
0.67112
from pymc import deterministic, stochastic, MvNormal, Normal, Lognormal, Uniform, \ MCMC import pymc import numpy as np from pysb.examples.robertson import model from pysb.integrate import odesolve, Solver from matplotlib import pyplot as plt # Generate the synthetic data seed = 2 random = np.random.R...
0
203
0
0
0
0
0
63
22
5a2c7ea488a79c7bc3ca61ffc7923ed29c059cad
181
py
Python
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
''' 3. Faa um Programa que pea dois nmeros e imprima a soma. ''' num1 = int(input('Insira o primeiro nmero: ')) num2 = int(input('Insira o segundo nmero: ')) print(num1+num2)
22.625
59
0.685083
''' 3. Faça um Programa que peça dois números e imprima a soma. ''' num1 = int(input('Insira o primeiro número: ')) num2 = int(input('Insira o segundo número: ')) print(num1+num2)
10
0
0
0
0
0
0
0
0
a287fa8fd1aa9340094407b9ff28c613564df1de
8,205
py
Python
utils.py
kristinakupf/revisiting-self-supervised
1eac8a76c1b002d74b4b2983739d2e0280f5a09c
[ "Apache-2.0" ]
360
2019-01-25T17:59:18.000Z
2022-02-23T22:21:51.000Z
utils.py
kristinakupf/revisiting-self-supervised
1eac8a76c1b002d74b4b2983739d2e0280f5a09c
[ "Apache-2.0" ]
7
2019-02-05T15:09:31.000Z
2021-11-13T21:08:08.000Z
utils.py
rickyHong/Puzzle-tensorflow-latest-repl
86315b94bb8652eff37c5cd27459eae414d9143e
[ "Apache-2.0" ]
44
2019-01-28T02:05:31.000Z
2021-09-19T09:34:27.000Z
#!/usr/bin/python # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
30.276753
80
0.686776
#!/usr/bin/python # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
0
0
0
0
350
0
0
48
ea960da13a754b1b5f178921b94293782175191a
2,046
py
Python
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
""" Datos de entrada edad del paciente = edad = int sexo del paciente = sexo_paciente = int Datos de salida Resultado positivo o negativo acerca de si el paciente tiene anemia = resultado = str """ # Entradas edad_paciente=int(input("Inserte la edad del paciente en su equivalente de aos a meses ")) sexo_paciente=st...
39.346154
153
0.747312
""" Datos de entrada edad del paciente = edad = int sexo del paciente = sexo_paciente = int Datos de salida Resultado positivo o negativo acerca de si el paciente tiene anemia = resultado = str """ # Entradas edad_paciente=int(input("Inserte la edad del paciente en su equivalente de años a meses ")) sexo_paciente=s...
14
0
0
0
0
0
0
0
0
1aab9f57469dfa09590632b595dd434c94b550b5
4,350
py
Python
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
from collections import namedtuple import logging logger = logging.getLogger(__name__) _Line=namedtuple('_Line', 'name last_change nodes') lines: list[_Line] = [_Line(name='asd', last_change=1413534, nodes=[])]
30.208333
81
0.674253
from collections import namedtuple from repositories.lines import LineORM import cv2 import logging from function_factory import FunctionFactory from api import models import time logger = logging.getLogger(__name__) _Line=namedtuple('_Line', 'name last_change nodes') lines: list[_Line] = [_Line(name='asd', last_chan...
0
0
0
0
0
3,570
0
20
547
7decaa503e64ac854bcd7f073e2475e1fe4b741a
159
py
Python
config/config2D/scene_config/scene_jit2D.py
Jack12xl/a-toy-fluid-engine
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
21
2020-09-17T10:51:55.000Z
2022-03-15T20:27:00.000Z
config/config2D/scene_config/scene_jit2D.py
Jack12xl/a-toy-fluid-engine
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
8
2020-09-18T08:52:34.000Z
2021-02-07T09:27:49.000Z
config/config2D/scene_config/scene_jit2D.py
Jack12xl/myFluid
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
1
2020-09-20T11:10:35.000Z
2020-09-20T11:10:35.000Z
import taichi as ti import numpy as np m_fluid_color = ti.Vector(list(np.random.rand(3) * 0.7 + 0.3)) m_dye_decay = 0.99 m_f_gravity = ti.Vector([0.0, -9.8])
22.714286
62
0.691824
import taichi as ti import numpy as np m_fluid_color = ti.Vector(list(np.random.rand(3) * 0.7 + 0.3)) m_dye_decay = 0.99 m_f_gravity = ti.Vector([0.0, -9.8])
0
0
0
0
0
0
0
0
0
f2402356296748d055dd98cf85fde7497edb18e5
51,002
py
Python
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
# coding=utf-8 """A district is the voter population of a constituency or geographical area."""
44.85664
81
0.598977
# coding=utf-8 """A district is the voter population of a constituency or geographical area.""" import itertools as itls import math as m import random as rd from .utils import generate_voter_groups, sort_dict_desc, make_table from .candidate import Candidate from .party import Party from .voter_group import VoterGro...
0
0
0
50,550
0
0
0
84
269
e5ad78c5dfb9a7cf808d457ea96e8cdd1767fd83
7,073
py
Python
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
155
2016-09-11T00:43:07.000Z
2018-05-02T06:36:43.000Z
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
19
2016-09-12T14:39:17.000Z
2018-04-24T00:47:01.000Z
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
85
2016-09-10T20:01:48.000Z
2018-05-16T15:01:28.000Z
import requests import threading from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) lock = threading.Lock() if __name__ == '__main__': main()
46.228758
139
0.405203
from queue import Queue from urllib.parse import urlparse from threading import Thread import requests import threading import re import os from requests import get from requests import post from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureReques...
1,161
317
0
5,858
0
68
0
4
200
c11715dba5441ac66af6f1c555d1d86364de8536
939
py
Python
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
32
2016-05-09T19:37:08.000Z
2022-01-13T01:00:52.000Z
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import os from tenant_schemas_celery.app import CeleryApp from django.conf import settings # set the default Django settings module for the 'celery' program. if os.path.isfile(os.path.join(os.path.abspath('.'), 'sgk', 'settings', 'local.py')): os.environ.setdefault('DJANGO_S...
32.37931
85
0.741214
from __future__ import absolute_import import os from tenant_schemas_celery.app import CeleryApp from django.conf import settings from celery.schedules import crontab # set the default Django settings module for the 'celery' program. if os.path.isfile(os.path.join(os.path.abspath('.'), 'sgk', 'settings', 'local.py'))...
0
0
0
0
0
0
0
15
22