hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f772857408f0f985696a6f143f50cc25ce534fe1
10,928
py
Python
modules/nltk_contrib/tiger/query/factory.py
h4ck3rm1k3/NLP-project
aeba6302f60d27a8b9e65ad28d2d74e1276c7cd6
[ "MIT" ]
123
2015-01-06T10:46:18.000Z
2022-02-01T10:05:16.000Z
nltk_contrib/tiger/query/factory.py
silky/nltk_contrib
c152bde901f05915e90b07a615b232adb123bed8
[ "Apache-2.0" ]
12
2015-01-13T06:27:18.000Z
2020-07-30T23:00:41.000Z
nltk_contrib/tiger/query/factory.py
silky/nltk_contrib
c152bde901f05915e90b07a615b232adb123bed8
[ "Apache-2.0" ]
114
2015-01-13T04:47:49.000Z
2021-11-13T08:16:02.000Z
# -*- coding: utf-8 -*- # Copyright © 2007-2008 Stockholm TreeAligner Project # Author: Torsten Marek <shlomme@gmx.net> # Licensed under the GNU GPLv2 """This module contains classes to create a result builder from a query AST. """ from collections import defaultdict from itertools import count from nltk_contrib.tige...
42.521401
102
0.665264
"""This module contains classes to create a result builder from a query AST. """ from collections import defaultdict from itertools import count from nltk_contrib.tiger.graph import NodeType from nltk_contrib.tiger.query import ast_visitor from nltk_contrib.tiger.query.ast_utils import create_varref, NodeDescriptionN...
false
true
f77287bfee3eab03bb158bba3be66cab227b6f51
1,075
py
Python
tests/formatters/chrome_preferences.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
1
2020-12-04T10:26:34.000Z
2020-12-04T10:26:34.000Z
tests/formatters/chrome_preferences.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
tests/formatters/chrome_preferences.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Google Chrome Preferences file event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import chrome_preferences from tests.formatters import test_lib class ChromeContentSettingsExceptionsFormatter( test_...
26.875
70
0.75907
from __future__ import unicode_literals import unittest from plaso.formatters import chrome_preferences from tests.formatters import test_lib class ChromeContentSettingsExceptionsFormatter( test_lib.EventFormatterTestCase): def testInitialization(self): event_formatter = ( chrome_preferences.Ch...
true
true
f7728839287fbd8d543da7297ff34a13078a7236
1,449
py
Python
lookupcsv/derived_tables/FHS/get_T1_MRI.py
vkola-lab/multi-task
6a61db4223e1812744f13028747b07e2f840cc0b
[ "MIT" ]
null
null
null
lookupcsv/derived_tables/FHS/get_T1_MRI.py
vkola-lab/multi-task
6a61db4223e1812744f13028747b07e2f840cc0b
[ "MIT" ]
null
null
null
lookupcsv/derived_tables/FHS/get_T1_MRI.py
vkola-lab/multi-task
6a61db4223e1812744f13028747b07e2f840cc0b
[ "MIT" ]
null
null
null
from glob import glob import pydicom from pydicom import dcmread import os import numpy as np import nibabel as nib def dicom_to_nifti(folder): dicoms = None return def read_a_dicom(dicom_file): ds = dcmread(dicom_file) def get_array(dcm_file): ds = dcmread(dcm_file) location = float(ds[0x0020...
24.982759
78
0.590062
from glob import glob import pydicom from pydicom import dcmread import os import numpy as np import nibabel as nib def dicom_to_nifti(folder): dicoms = None return def read_a_dicom(dicom_file): ds = dcmread(dicom_file) def get_array(dcm_file): ds = dcmread(dcm_file) location = float(ds[0x0020...
true
true
f77289645a03d81dc4b8592e90211dbe979ae294
1,085
py
Python
src/MusicTheory/scale/ScaleKey.py
ytyaru/Python.MusicTheory.Scale.201709231350
61a19a2976babfb55202f4b76f412d0aeb3c22ad
[ "CC0-1.0" ]
null
null
null
src/MusicTheory/scale/ScaleKey.py
ytyaru/Python.MusicTheory.Scale.201709231350
61a19a2976babfb55202f4b76f412d0aeb3c22ad
[ "CC0-1.0" ]
null
null
null
src/MusicTheory/scale/ScaleKey.py
ytyaru/Python.MusicTheory.Scale.201709231350
61a19a2976babfb55202f4b76f412d0aeb3c22ad
[ "CC0-1.0" ]
null
null
null
#from MusicTheory.scale.Scale import Scale import MusicTheory.scale.Scale from MusicTheory.scale.ScaleIntervals import ScaleIntervals #from MusicTheory.pitch.PitchClass import PitchClass #from MusicTheory.pitch.OctaveClass import OctaveClass #from Framework.ConstMeta import ConstMeta from MusicTheory.pitch.PitchClass i...
37.413793
134
0.75023
import MusicTheory.scale.Scale from MusicTheory.scale.ScaleIntervals import ScaleIntervals from MusicTheory.pitch.PitchClass import PitchClass from MusicTheory.pitch.Key import Key class ScaleKey: def __init__(self, name='C', scale=None): self.__pitchClass = -1 self.__name = None if not isi...
true
true
f7728be048c83e52d0dbddab8e6f97c8582fbd4d
13,869
py
Python
src/oci/data_connectivity/models/target.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/models/target.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/models/target.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.759398
245
0.64554
from .create_connectivity_validation_details import CreateConnectivityValidationDetails from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class Target(CreateConnectivityValidationDetails)...
true
true
f7728c6111101c898f3894cd74e495340e0f871b
25,803
py
Python
funcs/plot.py
getzlab/SMM_clustering_2020
0a00e11fbde38a1da82167e1c924234a79cba4a5
[ "BSD-3-Clause" ]
1
2022-02-25T06:14:11.000Z
2022-02-25T06:14:11.000Z
funcs/plot.py
getzlab/SMM_clustering_2020
0a00e11fbde38a1da82167e1c924234a79cba4a5
[ "BSD-3-Clause" ]
null
null
null
funcs/plot.py
getzlab/SMM_clustering_2020
0a00e11fbde38a1da82167e1c924234a79cba4a5
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt import seaborn as sns import numpy as np import os from typing import Union import pandas as pd import signatureanalyzer as sa # Cluster Color map COLORMAP={ 0:'#0073C2FF', 1:'#EFC000FF', 2:'#868686FF', 3:'#CD534CFF', 4:'#7AA6DCFF', 5:'#003C67FF', } COLORMAP2={ ...
31.934406
122
0.595435
import matplotlib.pyplot as plt import seaborn as sns import numpy as np import os from typing import Union import pandas as pd import signatureanalyzer as sa COLORMAP={ 0:'#0073C2FF', 1:'#EFC000FF', 2:'#868686FF', 3:'#CD534CFF', 4:'#7AA6DCFF', 5:'#003C67FF', } COLORMAP2={ "C1":'#0073C2FF'...
true
true
f7728c6410ef88a69446ab346356d4a705df79a2
896
py
Python
osf/migrations/0121_remove_waffle_flags.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf/migrations/0121_remove_waffle_flags.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf/migrations/0121_remove_waffle_flags.py
Johnetordoff/osf.io
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-23 13:16 from __future__ import unicode_literals from waffle.models import Flag from django.db import migrations EMBER_WAFFLE_PAGES = [ 'dashboard', 'home', ] def format_ember_waffle_flag_name(page): return 'ember_{}_page'.format(page) def...
24.888889
92
0.731027
from __future__ import unicode_literals from waffle.models import Flag from django.db import migrations EMBER_WAFFLE_PAGES = [ 'dashboard', 'home', ] def format_ember_waffle_flag_name(page): return 'ember_{}_page'.format(page) def add_ember_waffle_flags(state, schema): for page in EMBER_WAFFLE_PAGES...
true
true
f7728c8845eb8f94adfc18c6821cef885fdeac33
51,283
py
Python
test/dialect/test_mssql.py
obeattie/sqlalchemy
376007fed7746d494dcb0166b22e512bfece02cd
[ "MIT" ]
2
2016-05-09T09:17:35.000Z
2016-08-03T16:30:16.000Z
test/dialect/test_mssql.py
clones/sqlalchemy
c9f08aa78a48ba53dd221d3c5de54e5956ecf806
[ "MIT" ]
null
null
null
test/dialect/test_mssql.py
clones/sqlalchemy
c9f08aa78a48ba53dd221d3c5de54e5956ecf806
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 from sqlalchemy.test.testing import eq_ import datetime, os, re from sqlalchemy import * from sqlalchemy import types, exc, schema from sqlalchemy.orm import * from sqlalchemy.sql import table, column from sqlalchemy.databases import mssql from sqlalchemy.dialects.mssql import pyodbc from sqlalche...
41.524696
316
0.577345
from sqlalchemy.test.testing import eq_ import datetime, os, re from sqlalchemy import * from sqlalchemy import types, exc, schema from sqlalchemy.orm import * from sqlalchemy.sql import table, column from sqlalchemy.databases import mssql from sqlalchemy.dialects.mssql import pyodbc from sqlalchemy.engine import url f...
false
true
f7728cd710b7af62ee91f9d84ce119ac06911f6d
2,621
py
Python
src/main.py
Union-Investment/ida-api
61bb980fb6fa1bb1fcca63ce15643e36c54fe342
[ "Apache-2.0" ]
1
2021-12-03T13:21:24.000Z
2021-12-03T13:21:24.000Z
src/main.py
Union-Investment/ida-api
61bb980fb6fa1bb1fcca63ce15643e36c54fe342
[ "Apache-2.0" ]
1
2021-11-28T14:33:58.000Z
2021-11-30T09:29:57.000Z
src/main.py
Union-Investment/ida-api
61bb980fb6fa1bb1fcca63ce15643e36c54fe342
[ "Apache-2.0" ]
1
2021-11-28T14:30:11.000Z
2021-11-28T14:30:11.000Z
import uvicorn from fastapi import FastAPI, HTTPException, File, UploadFile from typing import Optional, List from csv import reader ### gloabls port = 8000 app = FastAPI() indices = [] @app.get("/getdata/{date}") async def read_item(date: str, index: str = "DAX", show_all_indices: Optional[bool] = False): result...
27.020619
124
0.676078
import uvicorn from fastapi import FastAPI, HTTPException, File, UploadFile from typing import Optional, List from csv import reader port = 8000 app = FastAPI() indices = [] @app.get("/getdata/{date}") async def read_item(date: str, index: str = "DAX", show_all_indices: Optional[bool] = False): result = {"date": ...
true
true
f7728cda087c61e4f5b7acfb122a78f696161f9c
1,301
py
Python
lesson1/lesson1_task6.py
nekdfl/GB-python-developer
ca3f34bac2a92a930779f89357941bfa9634b3d4
[ "MIT" ]
null
null
null
lesson1/lesson1_task6.py
nekdfl/GB-python-developer
ca3f34bac2a92a930779f89357941bfa9634b3d4
[ "MIT" ]
null
null
null
lesson1/lesson1_task6.py
nekdfl/GB-python-developer
ca3f34bac2a92a930779f89357941bfa9634b3d4
[ "MIT" ]
null
null
null
# Спортсмен занимается ежедневными пробежками. В первый день его результат составил a километров. # Каждый день спортсмен увеличивал результат на 10 % относительно предыдущего. Требуется определить номер дня, # на который результат спортсмена составит не менее b километров. Программа должна принимать значения # парамет...
34.236842
110
0.730976
def pretty_distance(number): distance = f"{number:.2f}".rstrip("0").rstrip("0").rstrip(".") return distance distance_first_day = int(input("Введите сколько спортсмен пробежал в первый день км: ")) distance_target = int(input("Введите цель тренировок км: ")) current_distance = distance_first_day day = 1 wh...
true
true
f7728d044346cce5cf6f86a6e2d03d2ca2188ad8
739
py
Python
react_game/employeelistBackend/models.py
Darren212176/react_app
36f94ee8b22eec8094c44d9f3740c857dee13510
[ "MIT" ]
null
null
null
react_game/employeelistBackend/models.py
Darren212176/react_app
36f94ee8b22eec8094c44d9f3740c857dee13510
[ "MIT" ]
null
null
null
react_game/employeelistBackend/models.py
Darren212176/react_app
36f94ee8b22eec8094c44d9f3740c857dee13510
[ "MIT" ]
1
2021-12-14T02:13:51.000Z
2021-12-14T02:13:51.000Z
from django.db import models from django.conf import settings # Create your models here. class Employee(models.Model): DEPARTMENT_CHOICES = ( ('hr', 'Human Resources'), ('finance', 'Finance'), ('engineering', 'Engineering'), ('marketing', 'Marketing'), ('sales', 'Sales'), ...
35.190476
114
0.656292
from django.db import models from django.conf import settings class Employee(models.Model): DEPARTMENT_CHOICES = ( ('hr', 'Human Resources'), ('finance', 'Finance'), ('engineering', 'Engineering'), ('marketing', 'Marketing'), ('sales', 'Sales'), ) created_by = model...
true
true
f7728d263d5494dbfbd106200dc6b7fc39b45cd7
6,169
py
Python
chatbot/models/hier_model.py
TeeKay53/Dialogue-systems-for-language-learning
28e226a579b8f22bebf5ec133985d7d86aef6606
[ "Apache-2.0" ]
1
2019-03-09T01:28:43.000Z
2019-03-09T01:28:43.000Z
chatbot/models/hier_model.py
TeeKay53/Dialogue-systems-for-language-learning
28e226a579b8f22bebf5ec133985d7d86aef6606
[ "Apache-2.0" ]
null
null
null
chatbot/models/hier_model.py
TeeKay53/Dialogue-systems-for-language-learning
28e226a579b8f22bebf5ec133985d7d86aef6606
[ "Apache-2.0" ]
5
2018-02-20T13:44:10.000Z
2019-11-02T13:26:39.000Z
""" A dialogue system meant to be used for language learning. This is based on Google Neural Machine Tranlation model https://github.com/tensorflow/nmt which is based on Thang Luong's thesis on Neural Machine Translation: https://github.com/lmthang/thesis And on the paper Building End-To-End Dialogue Systems Using Ge...
43.443662
109
0.64046
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from chatbot.models.base_model import BaseModel import utils.misc_utils as utils from chatbot.models import model_helper utils.check_tensorflow_version(version="1.3....
true
true
f7728d3c2e9c4b4f610b2057d69f574a7f4f2d92
9,334
py
Python
var/spack/repos/builtin/packages/geant4/package.py
etpalmer63/spack
9ac207c901c46d005a8cce1460fa110192af6cb5
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/geant4/package.py
etpalmer63/spack
9ac207c901c46d005a8cce1460fa110192af6cb5
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/geant4/package.py
etpalmer63/spack
9ac207c901c46d005a8cce1460fa110192af6cb5
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Geant4(CMakePackage): """Geant4 is a toolkit for the simulation of the passage of particle...
44.875
112
0.629848
from spack import * class Geant4(CMakePackage): homepage = "http://geant4.cern.ch/" url = "https://gitlab.cern.ch/geant4/geant4/-/archive/v10.7.1/geant4-v10.7.1.tar.gz" tags = ['hep'] maintainers = ['drbenmorgan'] version('11.0.0', sha256='04d11d4d9041507e7f86f48eb45c36430f2b6544a74c0ccaff632...
true
true
f7728e93b4a7bd3bacd6fd350719d802ff487855
12,167
py
Python
models/inception.py
Drkun/ZSTCI
ec9c031e7649a61ed23316d23d6bd5d5702467c0
[ "Apache-2.0" ]
11
2021-01-02T07:00:39.000Z
2021-10-08T02:11:56.000Z
models/inception.py
xdxuyang/ZSTCI
93543ee843dac680c33e34de5d61ba048ef1f6d3
[ "Apache-2.0" ]
1
2021-02-24T19:36:34.000Z
2021-02-25T03:47:41.000Z
models/inception.py
xdxuyang/ZSTCI
93543ee843dac680c33e34de5d61ba048ef1f6d3
[ "Apache-2.0" ]
1
2020-12-06T12:20:59.000Z
2020-12-06T12:20:59.000Z
import torch import torch.nn as nn import torch.nn.functional as F __all__ = ['Inception3', 'inception_v3'] def inception_v3(**kwargs): r"""Inception v3 model architecture from `"Rethinking the Inception Architecture for Computer Vision" <http://arxiv.org/abs/1512.00567>`_. Args: pretrained (boo...
36.21131
109
0.621764
import torch import torch.nn as nn import torch.nn.functional as F __all__ = ['Inception3', 'inception_v3'] def inception_v3(**kwargs): return Inception3(**kwargs) class Inception3(nn.Module): def __init__(self, Embed_dim=512, num_classes=100, dropout=0.5, aux_logits=False, transform_input=False): ...
true
true
f7728f245f6643550200ae56f152b0dcaf86976e
14,468
py
Python
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Utilities for transforming and validating data types Given that many of the data transformations involve copying the data, they should ideally happen in a lazy manner to avoid memory issues. Created on Tue Nov 3 21:14:25 2015 @author: Suhas Somnath, Chris Smith """ from __future__ impor...
35.99005
143
0.661736
from __future__ import division, absolute_import, unicode_literals, print_function import sys from warnings import warn import h5py import numpy as np import dask.array as da __all__ = ['flatten_complex_to_real', 'get_compound_sub_dtypes', 'flatten_compound_to_real', 'check_dtype', 'stack_real_to_complex',...
true
true
f7728faad5a6ce1f229f80be1ed12ef708d8c51e
716
py
Python
tests/smoketests/quart/api.py
hboshnak/json-logging-python
5769f5181e6f83067e2ebe5f56d84b98cace5707
[ "Apache-2.0" ]
117
2017-12-18T15:43:17.000Z
2020-08-07T11:31:04.000Z
tests/smoketests/quart/api.py
hboshnak/json-logging-python
5769f5181e6f83067e2ebe5f56d84b98cace5707
[ "Apache-2.0" ]
51
2018-06-21T23:53:23.000Z
2020-08-10T18:02:40.000Z
tests/smoketests/quart/api.py
hboshnak/json-logging-python
5769f5181e6f83067e2ebe5f56d84b98cace5707
[ "Apache-2.0" ]
27
2017-12-25T06:29:34.000Z
2020-08-07T07:52:02.000Z
import asyncio, logging, sys, json_logging, quart app = quart.Quart(__name__) json_logging.init_quart(enable_json=True) json_logging.init_request_instrument(app) # init the logger as usual logger = logging.getLogger("test logger") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler(sys.stdout)) @a...
32.545455
106
0.744413
import asyncio, logging, sys, json_logging, quart app = quart.Quart(__name__) json_logging.init_quart(enable_json=True) json_logging.init_request_instrument(app) logger = logging.getLogger("test logger") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler(sys.stdout)) @app.route('/') async def hom...
true
true
f77291307766094458ae75768cd503072ad95c64
899
py
Python
migrations/versions/5edcaaadde99_add.py
13460991260/shop
1763d64883f30d6dac39a6b9287b89694cfbbafe
[ "MIT" ]
null
null
null
migrations/versions/5edcaaadde99_add.py
13460991260/shop
1763d64883f30d6dac39a6b9287b89694cfbbafe
[ "MIT" ]
null
null
null
migrations/versions/5edcaaadde99_add.py
13460991260/shop
1763d64883f30d6dac39a6b9287b89694cfbbafe
[ "MIT" ]
null
null
null
"""add Revision ID: 5edcaaadde99 Revises: a1d970c1214f Create Date: 2019-03-18 09:41:06.484761 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5edcaaadde99' down_revision = 'a1d970c1214f' branch_labels = None depends_on = None def upgrade(): # ### comman...
27.242424
87
0.686318
from alembic import op import sqlalchemy as sa revision = '5edcaaadde99' down_revision = 'a1d970c1214f' branch_labels = None depends_on = None def upgrade(): op.add_column('user', sa.Column('gender', sa.String(length=30), nullable=True)) op.add_column('user', sa.Column('language', sa.String(length=30), ...
true
true
f77291b0399445fce6afd179eb6f6b23073fe9c7
141
py
Python
BiliReminder/Apps/Subscribe/models.py
HoBeedzc/BiliReminder
bf9f2bde7e41cb3c0816b39159d5a916b01609fa
[ "MIT" ]
2
2021-02-22T15:01:36.000Z
2021-12-17T03:15:02.000Z
BiliReminder/Apps/Subscribe/models.py
HoBeedzc/BiliReminder
bf9f2bde7e41cb3c0816b39159d5a916b01609fa
[ "MIT" ]
null
null
null
BiliReminder/Apps/Subscribe/models.py
HoBeedzc/BiliReminder
bf9f2bde7e41cb3c0816b39159d5a916b01609fa
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class UpLoader(models.Model): uid = models.CharField(max_length=10) pass
14.1
41
0.723404
from django.db import models class UpLoader(models.Model): uid = models.CharField(max_length=10) pass
true
true
f772926cd5fb3a81306d6691127f724d7392bf52
335
py
Python
rados_deploy/internal/remoto/modules/printer.py
MariskaIJpelaar/rados-deploy
4ffb467211c2b05d17d76c2423c72c0ee4d4ec99
[ "MIT" ]
null
null
null
rados_deploy/internal/remoto/modules/printer.py
MariskaIJpelaar/rados-deploy
4ffb467211c2b05d17d76c2423c72c0ee4d4ec99
[ "MIT" ]
1
2022-02-08T10:07:18.000Z
2022-02-08T10:07:18.000Z
rados_deploy/internal/remoto/modules/printer.py
MariskaIJpelaar/rados-deploy
4ffb467211c2b05d17d76c2423c72c0ee4d4ec99
[ "MIT" ]
2
2021-10-05T12:24:53.000Z
2021-12-22T09:41:07.000Z
import builtins import socket import sys def print(*args, **kwargs): '''Print method overriding default, prints to stderr.''' kwargs['flush'] = True kwargs['file'] = sys.stderr return builtins.print('[{}] {}'.format(socket.gethostname(), args[0]), *(args[1:]), **kwargs) if any(args) else builtins....
33.5
140
0.653731
import builtins import socket import sys def print(*args, **kwargs): kwargs['flush'] = True kwargs['file'] = sys.stderr return builtins.print('[{}] {}'.format(socket.gethostname(), args[0]), *(args[1:]), **kwargs) if any(args) else builtins.print(**kwargs)
true
true
f77293fd136dbc0a25153c2353786f6e082666e1
41,450
py
Python
tensorflow/python/ops/parsing_ops.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
2
2019-10-09T08:06:48.000Z
2021-01-07T03:16:09.000Z
tensorflow/python/ops/parsing_ops.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2017-02-06T08:12:22.000Z
2017-02-06T08:12:22.000Z
tensorflow/python/ops/parsing_ops.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2020-07-20T18:02:33.000Z
2020-07-20T18:02:33.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.742195
119
0.680651
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import re from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework imp...
true
true
f772941842bf9a1535256eed17328761cdbf964f
1,523
py
Python
cloudbaseinit/tests/utils/test_serialization.py
andia10240/cloudbase-init
3c290194c139990f2a0e5747aa2f6c9554d26659
[ "Apache-2.0" ]
160
2015-01-09T14:45:59.000Z
2022-03-15T09:15:12.000Z
cloudbaseinit/tests/utils/test_serialization.py
andia10240/cloudbase-init
3c290194c139990f2a0e5747aa2f6c9554d26659
[ "Apache-2.0" ]
95
2015-01-25T15:22:05.000Z
2022-03-16T10:40:27.000Z
cloudbaseinit/tests/utils/test_serialization.py
andia10240/cloudbase-init
3c290194c139990f2a0e5747aa2f6c9554d26659
[ "Apache-2.0" ]
86
2015-01-19T17:19:35.000Z
2022-03-24T09:21:55.000Z
# Copyright 2014 Cloudbase Solutions Srl # # 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 l...
32.404255
78
0.64872
import unittest import ddt from cloudbaseinit.utils import serialization YAML_PARSER_ERROR_STRING = b""" a: b - c: d """ @ddt.ddt class SerializationUtilsTests(unittest.TestCase): @ddt.data((b'', (None, True)), (b'{}', ({}, True)), (YAML_PARSER_ERROR_STRING, (None, False)), ...
true
true
f772943ef00c4308e6d60a516c15e766f6ff8dc6
2,003
py
Python
InvenTree/InvenTree/status_codes.py
linucks/InvenTree
fa789036e0ae7d56ced3c9e1f2d2ff596983a365
[ "MIT" ]
null
null
null
InvenTree/InvenTree/status_codes.py
linucks/InvenTree
fa789036e0ae7d56ced3c9e1f2d2ff596983a365
[ "MIT" ]
null
null
null
InvenTree/InvenTree/status_codes.py
linucks/InvenTree
fa789036e0ae7d56ced3c9e1f2d2ff596983a365
[ "MIT" ]
null
null
null
from django.utils.translation import ugettext as _ class StatusCode: @classmethod def items(cls): return cls.options.items() @classmethod def label(cls, value): """ Return the status code label associated with the provided value """ return cls.options.get(value, value) clas...
21.771739
79
0.574638
from django.utils.translation import ugettext as _ class StatusCode: @classmethod def items(cls): return cls.options.items() @classmethod def label(cls, value): return cls.options.get(value, value) class OrderStatus(StatusCode): PENDING = 10 PLACED = 20 COMPLETE ...
true
true
f772955e55c401a30d9bb40e46cb0e96433f74d3
8,268
py
Python
tests/components/modbus/test_cover.py
lkempf/core
8d7744a74f6f28657941dc095fb5a197e726ffff
[ "Apache-2.0" ]
1
2021-04-20T09:51:31.000Z
2021-04-20T09:51:31.000Z
tests/components/modbus/test_cover.py
lkempf/core
8d7744a74f6f28657941dc095fb5a197e726ffff
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
tests/components/modbus/test_cover.py
lkempf/core
8d7744a74f6f28657941dc095fb5a197e726ffff
[ "Apache-2.0" ]
2
2021-01-26T07:41:33.000Z
2021-01-26T07:45:11.000Z
"""The tests for the Modbus cover component.""" from pymodbus.exceptions import ModbusException import pytest from homeassistant.components.cover import DOMAIN as COVER_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_REGISTER_HOLDING, CONF_INPUT_TYPE, CONF_LAZY_ERR...
26.670968
83
0.547896
from pymodbus.exceptions import ModbusException import pytest from homeassistant.components.cover import DOMAIN as COVER_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_REGISTER_HOLDING, CONF_INPUT_TYPE, CONF_LAZY_ERROR, CONF_STATE_CLOSED, CONF_STATE_CLOSIN...
true
true
f772956d2d71da585d786308a47307800d2dd54a
8,467
py
Python
docs/conf.py
retsimx/pymyair
11d55f273ac0db7bc57200ba1308612cfb26d07e
[ "MIT" ]
21
2017-07-28T14:37:19.000Z
2022-03-03T12:19:15.000Z
docs/conf.py
retsimx/pymyair
11d55f273ac0db7bc57200ba1308612cfb26d07e
[ "MIT" ]
320
2017-06-30T03:04:04.000Z
2022-03-28T08:26:20.000Z
docs/conf.py
retsimx/pymyair
11d55f273ac0db7bc57200ba1308612cfb26d07e
[ "MIT" ]
10
2017-05-20T23:47:29.000Z
2022-02-07T23:21:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pymyair documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # aut...
30.677536
76
0.715838
import sys import os cwd = os.getcwd() project_root = os.path.dirname(cwd) sys.path.insert(0, project_root) import pymyair extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'API for Advantage Air MyAir' copyrigh...
true
true
f77296df7aefe343e7e109bbe9fd980ff1cca3ac
3,380
py
Python
app/migrations/0001_initial.py
Sonray/The-share-IP3
3783ea73736e8c7a1e3962eb82d0d2a77e92e293
[ "MIT" ]
null
null
null
app/migrations/0001_initial.py
Sonray/The-share-IP3
3783ea73736e8c7a1e3962eb82d0d2a77e92e293
[ "MIT" ]
null
null
null
app/migrations/0001_initial.py
Sonray/The-share-IP3
3783ea73736e8c7a1e3962eb82d0d2a77e92e293
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-29 08:54 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AU...
57.288136
286
0.595266
from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
f77297b633562041cf44fe66d7d00f9951df9550
451
py
Python
data/scripts/templates/object/building/poi/shared_naboo_ruins_medium_3.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/building/poi/shared_naboo_ruins_medium_3.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/building/poi/shared_naboo_ruins_medium_3.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_naboo_ruins_medium_3.iff" result.attribute_template_id =...
26.529412
72
0.72949
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_naboo_ruins_medium_3.iff" result.attribute_template_id = -1 result.stfName("poi_n","base_poi_building") return result
true
true
f772984bf99f3583465cd9f5fca5be6e80640855
1,866
py
Python
tools/mo/openvino/tools/mo/front/onnx/lstm_ext.py
ytorzuk-altran/openvino
68d460a3bb578a738ba0e4d0e1f2e321afa73ab0
[ "Apache-2.0" ]
1
2021-02-01T06:35:55.000Z
2021-02-01T06:35:55.000Z
tools/mo/openvino/tools/mo/front/onnx/lstm_ext.py
ytorzuk-altran/openvino
68d460a3bb578a738ba0e4d0e1f2e321afa73ab0
[ "Apache-2.0" ]
55
2020-12-07T08:29:13.000Z
2022-03-30T12:18:26.000Z
tools/mo/openvino/tools/mo/front/onnx/lstm_ext.py
ytorzuk-altran/openvino
68d460a3bb578a738ba0e4d0e1f2e321afa73ab0
[ "Apache-2.0" ]
1
2021-02-15T01:13:57.000Z
2021-02-15T01:13:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.ops.LSTM import LSTM from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.onnx.extractors.utils import onnx_attr class LSTMFrontExtractor(FrontExtractorO...
38.875
116
0.586817
import numpy as np from openvino.tools.mo.ops.LSTM import LSTM from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.onnx.extractors.utils import onnx_attr class LSTMFrontExtractor(FrontExtractorOp): op = 'LSTM' enabled = True @classmethod def extract(cls, node...
true
true
f77298a3aa0b0d057bf72c54e058fa4ea69e4149
114
py
Python
lambdas/service/vendor/resources/environ.json.template.py
DataBiosphere/azul
abcaa7c6a04f1f5b8fd74e449e254eff6c433913
[ "Apache-2.0" ]
17
2018-07-20T02:53:35.000Z
2022-01-11T12:27:31.000Z
lambdas/indexer/vendor/resources/environ.json.template.py
DataBiosphere/azul
abcaa7c6a04f1f5b8fd74e449e254eff6c433913
[ "Apache-2.0" ]
3,887
2018-06-29T15:23:02.000Z
2022-03-31T23:29:37.000Z
lambdas/indexer/vendor/resources/environ.json.template.py
DataBiosphere/azul
abcaa7c6a04f1f5b8fd74e449e254eff6c433913
[ "Apache-2.0" ]
21
2018-07-06T03:17:33.000Z
2022-02-18T04:10:02.000Z
from azul import ( config, ) from azul.template import ( emit, ) emit(config.lambda_env_for_outsourcing)
12.666667
39
0.719298
from azul import ( config, ) from azul.template import ( emit, ) emit(config.lambda_env_for_outsourcing)
true
true
f772990236bacd506dbb2dbb5d150162e3614fcf
1,612
py
Python
mineral/algorithms/tuners/entropy_tuner.py
brandontrabucco/jetpack
aa60488788b2e6fe1d09727943be043158a7af09
[ "MIT" ]
5
2019-07-14T07:34:32.000Z
2019-08-16T17:41:13.000Z
mineral/algorithms/tuners/entropy_tuner.py
brandontrabucco/mineral
aa60488788b2e6fe1d09727943be043158a7af09
[ "MIT" ]
7
2019-08-16T21:48:26.000Z
2022-02-09T23:30:47.000Z
mineral/algorithms/tuners/entropy_tuner.py
brandontrabucco/jetpack
aa60488788b2e6fe1d09727943be043158a7af09
[ "MIT" ]
null
null
null
"""Author: Brandon Trabucco, Copyright 2019""" import tensorflow as tf from mineral.algorithms.tuners.tuner import Tuner class EntropyTuner(Tuner): def __init__( self, policy, **kwargs ): Tuner.__init__(self, **kwargs) self.policy = policy def update_algorithm( ...
29.851852
81
0.539082
import tensorflow as tf from mineral.algorithms.tuners.tuner import Tuner class EntropyTuner(Tuner): def __init__( self, policy, **kwargs ): Tuner.__init__(self, **kwargs) self.policy = policy def update_algorithm( self, observations, act...
true
true
f772999b6dc3ea28ce89ed551fcd8fddab62e389
1,784
py
Python
zvt/domain/meta/fund_meta.py
doncat99/FinanceAnalysis
689aed45bab9e691566b308d2778170a0b3950ec
[ "MIT" ]
6
2020-10-03T01:22:12.000Z
2021-09-09T09:25:25.000Z
zvt/domain/meta/fund_meta.py
doncat99/FinanceAnalysis
689aed45bab9e691566b308d2778170a0b3950ec
[ "MIT" ]
null
null
null
zvt/domain/meta/fund_meta.py
doncat99/FinanceAnalysis
689aed45bab9e691566b308d2778170a0b3950ec
[ "MIT" ]
4
2020-10-30T07:33:16.000Z
2021-09-09T09:25:27.000Z
# -*- coding: utf-8 -*- from sqlalchemy import Column, String, Integer from sqlalchemy.ext.declarative import declarative_base from zvt.api.data_type import Region, Provider from zvt.contract import Portfolio, PortfolioStockHistory from zvt.contract.register import register_entity, register_schema FundMetaBase = decl...
27.446154
118
0.664238
from sqlalchemy import Column, String, Integer from sqlalchemy.ext.declarative import declarative_base from zvt.api.data_type import Region, Provider from zvt.contract import Portfolio, PortfolioStockHistory from zvt.contract.register import register_entity, register_schema FundMetaBase = declarative_base() @regist...
true
true
f7729a102ff587dae55e80d7c8e3c2f3bf06a551
4,484
py
Python
biasdb/split.py
hassanmohsin/chemprop
b6d84f064f682d6ff7fa42e1f231d7467a87105e
[ "MIT" ]
1
2020-03-10T23:19:50.000Z
2020-03-10T23:19:50.000Z
biasdb/split.py
hassanmohsin/chemprop
b6d84f064f682d6ff7fa42e1f231d7467a87105e
[ "MIT" ]
null
null
null
biasdb/split.py
hassanmohsin/chemprop
b6d84f064f682d6ff7fa42e1f231d7467a87105e
[ "MIT" ]
2
2020-03-03T20:59:30.000Z
2020-04-04T17:33:34.000Z
import numpy as np from copy import deepcopy def stratify(data, classes, ratios, one_hot=False): """Stratifying procedure. data is a list of lists: a list of labels, for each sample. Each sample's labels should be ints, if they are one-hot encoded, use one_hot=True classes is the list of cl...
38
105
0.601249
import numpy as np from copy import deepcopy def stratify(data, classes, ratios, one_hot=False): if one_hot: temp = [[] for _ in range(len(data))] indexes, values = np.where(np.array(data).astype(int) == 1) for k, v in zip(indexes, values): temp[k].append(v) data =...
true
true
f7729a11365625b428ecd48e94ff73123f6e4061
563
py
Python
case/tfP.py
xierensong/learnPython
33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455
[ "MIT" ]
null
null
null
case/tfP.py
xierensong/learnPython
33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455
[ "MIT" ]
null
null
null
case/tfP.py
xierensong/learnPython
33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455
[ "MIT" ]
1
2018-10-11T08:20:44.000Z
2018-10-11T08:20:44.000Z
import tensorflow as tf mnist = tf.keras.datasets.mnist (x_train, y_train),(x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), tf.keras.layers.Dense(512, activation=tf.nn.relu), tf.keras.layers.Dropout(0.2), tf....
31.277778
55
0.706927
import tensorflow as tf mnist = tf.keras.datasets.mnist (x_train, y_train),(x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), tf.keras.layers.Dense(512, activation=tf.nn.relu), tf.keras.layers.Dropout(0.2), tf....
true
true
f7729ba098686315ce2015f48dea36995c8b1bd0
3,091
py
Python
utils/cloud/cloud_client/models/auth_status_dto.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
15
2020-05-27T09:35:32.000Z
2022-03-29T18:35:36.000Z
utils/cloud/cloud_client/models/auth_status_dto.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
1
2020-02-03T18:25:08.000Z
2020-02-03T18:25:08.000Z
utils/cloud/cloud_client/models/auth_status_dto.py
alexfdo/asr_eval
d1573cc3113ce9df1ae64c3b91b5f495e2cff9a3
[ "MIT" ]
2
2020-07-01T18:47:58.000Z
2021-03-28T18:43:04.000Z
# coding: utf-8 """ SessionService documentation No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F...
26.878261
119
0.564219
import pprint import re import six class AuthStatusDto(object): swagger_types = { 'is_active': 'bool' } attribute_map = { 'is_active': 'is_active' } def __init__(self, is_active=None): self._is_active = None self.discriminator = None if is_active ...
true
true
f7729be2b7b190482850d62c49c758aaaa3bd521
114
py
Python
source/spacy_ner/__init__.py
wwalterr/finance
412bd2f161f7d11c0c832313a9a09068fc002a4b
[ "MIT" ]
null
null
null
source/spacy_ner/__init__.py
wwalterr/finance
412bd2f161f7d11c0c832313a9a09068fc002a4b
[ "MIT" ]
null
null
null
source/spacy_ner/__init__.py
wwalterr/finance
412bd2f161f7d11c0c832313a9a09068fc002a4b
[ "MIT" ]
null
null
null
from .ner import spacy_ner from .ner_validation import ner_validation __all__ = ['spacy_ner', 'ner_validation']
19
42
0.789474
from .ner import spacy_ner from .ner_validation import ner_validation __all__ = ['spacy_ner', 'ner_validation']
true
true
f7729ced0e0e8c63484afca09051c0ba765fc5a4
1,710
py
Python
coinmetrics/bitsql/applications/dbcontrol.py
coinmetrics-io/python-tools
bc00534abb4074da55c2c9d49e4dbc3c2d2020c3
[ "MIT" ]
33
2018-06-16T19:12:32.000Z
2021-04-29T16:30:21.000Z
coinmetrics/bitsql/applications/dbcontrol.py
coinmetrics-io/python-tools
bc00534abb4074da55c2c9d49e4dbc3c2d2020c3
[ "MIT" ]
null
null
null
coinmetrics/bitsql/applications/dbcontrol.py
coinmetrics-io/python-tools
bc00534abb4074da55c2c9d49e4dbc3c2d2020c3
[ "MIT" ]
10
2018-07-19T14:06:32.000Z
2020-08-18T08:03:53.000Z
import argparse import logging from coinmetrics.bitsql import runExport, dbObjectsFactory, postgresFactory from coinmetrics.bitsql.constants import SUPPORTED_ASSETS from coinmetrics.utils.arguments import postgres_connection_argument argParser = argparse.ArgumentParser() argParser.add_argument("asset", type=str, choi...
46.216216
136
0.759064
import argparse import logging from coinmetrics.bitsql import runExport, dbObjectsFactory, postgresFactory from coinmetrics.bitsql.constants import SUPPORTED_ASSETS from coinmetrics.utils.arguments import postgres_connection_argument argParser = argparse.ArgumentParser() argParser.add_argument("asset", type=str, choi...
true
true
f7729d0fa995d5a14e58deed082da5f6626ca125
4,619
py
Python
opsgenie_swagger/models/get_maintenance_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/get_maintenance_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/get_maintenance_response.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
1
2020-11-07T11:27:13.000Z
2020-11-07T11:27:13.000Z
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from opsgenie_swagger.models.base_response import BaseResponse ...
27.170588
96
0.577398
import pprint import re import six from opsgenie_swagger.models.base_response import BaseResponse from opsgenie_swagger.models.maintenance import Maintenance class GetMaintenanceResponse(object): swagger_types = { 'request_id': 'str', 'took': 'float', 'data': 'Maintenance' } ...
true
true
f7729d10d159ea7eed448aef005a32cf8b542517
1,847
py
Python
jeev/utils/periodic.py
jhgg/jeev
d6c971f42388b5f0a4a50a6449ca778fa372fe4a
[ "MIT", "Unlicense" ]
18
2015-09-25T20:16:18.000Z
2021-08-29T20:39:48.000Z
dissonance/utils/periodic.py
jhgg/dissonance
48059e6d7f80472611f202fa7349bf7f92f5ad48
[ "Unlicense", "MIT" ]
8
2015-06-04T04:44:48.000Z
2021-12-13T19:35:49.000Z
jeev/utils/periodic.py
jhgg/jeev
d6c971f42388b5f0a4a50a6449ca778fa372fe4a
[ "MIT", "Unlicense" ]
4
2016-04-01T20:59:10.000Z
2017-01-14T14:14:44.000Z
from gevent import sleep, Greenlet, spawn_raw class Periodic(object): def __init__(self, interval, f, *args, **kwargs): self.interval = interval self.f = f self.args = args self.kwargs = kwargs self._greenlet = None def _run(self): while True: spawn...
30.783333
119
0.611803
from gevent import sleep, Greenlet, spawn_raw class Periodic(object): def __init__(self, interval, f, *args, **kwargs): self.interval = interval self.f = f self.args = args self.kwargs = kwargs self._greenlet = None def _run(self): while True: spawn...
true
true
f7729e57e14161162143a79604321a292a066aba
173
py
Python
capanno_utils/helpers/validate_wdl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
null
null
null
capanno_utils/helpers/validate_wdl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2019-12-16T17:06:44.000Z
2019-12-16T17:06:44.000Z
capanno_utils/helpers/validate_wdl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2020-06-15T18:29:18.000Z
2020-06-15T18:29:18.000Z
from WDL import load def validate_wdl_doc(wdl_path): load(str(wdl_path)) # load works correctly for validation where parse_document and CLI.check do not. return
21.625
105
0.757225
from WDL import load def validate_wdl_doc(wdl_path): load(str(wdl_path)) return
true
true
f7729e92867aa002cd7cb471df8c78fa2e7a556a
6,468
py
Python
lib/evaluators.py
adeline-cs/GTR
889b0cda8a3c2b061371c4a63ea871821ddcd3d7
[ "Apache-2.0" ]
58
2021-12-28T11:54:07.000Z
2022-03-31T21:15:41.000Z
lib/evaluators.py
adeline-cs/GTR
889b0cda8a3c2b061371c4a63ea871821ddcd3d7
[ "Apache-2.0" ]
3
2022-01-06T04:00:21.000Z
2022-03-28T09:41:07.000Z
lib/evaluators.py
adeline-cs/GTR
889b0cda8a3c2b061371c4a63ea871821ddcd3d7
[ "Apache-2.0" ]
8
2022-03-06T03:31:30.000Z
2022-03-31T06:35:48.000Z
from __future__ import print_function, absolute_import import time from time import gmtime, strftime from datetime import datetime from collections import OrderedDict import torch import numpy as np from random import randint from PIL import Image import sys from . import metric from metric import Accuracy, EditDistanc...
44.606897
118
0.562616
from __future__ import print_function, absolute_import import time from time import gmtime, strftime from datetime import datetime from collections import OrderedDict import torch import numpy as np from random import randint from PIL import Image import sys from . import metric from metric import Accuracy, EditDistanc...
true
true
f7729f4441eace75a965886bd5953cfce241f799
1,095
py
Python
app/src/models/answers_model.py
DIS-SIN/Survista
853a6e921dce2ca94521eaa8a202a571d9ea8940
[ "CC0-1.0" ]
3
2019-02-21T20:11:11.000Z
2019-07-14T19:48:25.000Z
app/src/models/answers_model.py
DIS-SIN/Survista
853a6e921dce2ca94521eaa8a202a571d9ea8940
[ "CC0-1.0" ]
8
2019-03-21T18:04:41.000Z
2019-03-21T23:56:51.000Z
app/src/models/answers_model.py
DIS-SIN/Survista
853a6e921dce2ca94521eaa8a202a571d9ea8940
[ "CC0-1.0" ]
1
2019-01-23T07:13:24.000Z
2019-01-23T07:13:24.000Z
from neomodel.contrib import SemiStructuredNode from neomodel import (UniqueIdProperty, StringProperty, DateTimeProperty, FloatProperty, BooleanProperty ) from datetime import datetime import pytz from .utils.se...
31.285714
55
0.6
from neomodel.contrib import SemiStructuredNode from neomodel import (UniqueIdProperty, StringProperty, DateTimeProperty, FloatProperty, BooleanProperty ) from datetime import datetime import pytz from .utils.se...
true
true
f7729f5bfb3f0755cca4a5eb8e5b924ee4de85af
2,879
py
Python
simple_planning_experiments.py
vishalbelsare/rl_abstraction
cfe628abbee2614ff873713dceb466b293aa7329
[ "MIT" ]
25
2017-11-16T21:59:58.000Z
2022-03-23T09:18:26.000Z
simple_planning_experiments.py
vishalbelsare/rl_abstraction
cfe628abbee2614ff873713dceb466b293aa7329
[ "MIT" ]
1
2020-12-10T05:20:01.000Z
2020-12-18T01:30:23.000Z
simple_planning_experiments.py
vishalbelsare/rl_abstraction
cfe628abbee2614ff873713dceb466b293aa7329
[ "MIT" ]
7
2017-11-16T22:00:05.000Z
2022-03-10T03:35:59.000Z
#!/usr/bin/env python # Python imports. import os import time # Other imports. from utils import make_mdp from simple_rl.planning import ValueIteration from utils.AbstractValueIterationClass import AbstractValueIteration from state_abs import indicator_funcs as ind_funcs from abstraction_experiments import get_sa d...
30.305263
97
0.609239
import os import time from utils import make_mdp from simple_rl.planning import ValueIteration from utils.AbstractValueIterationClass import AbstractValueIteration from state_abs import indicator_funcs as ind_funcs from abstraction_experiments import get_sa def clear_files(dir_name): ''' Args: dir_n...
false
true
f7729fb079eea878deeeae850aef69c370070969
1,638
py
Python
examples/http.py
inplat/aioapp_http
04d5ae2057bd93ae4774be4175b490d13d1dadf6
[ "Apache-2.0" ]
null
null
null
examples/http.py
inplat/aioapp_http
04d5ae2057bd93ae4774be4175b490d13d1dadf6
[ "Apache-2.0" ]
1
2018-07-30T15:41:47.000Z
2018-07-30T15:41:47.000Z
examples/http.py
inplat/aioapp_http
04d5ae2057bd93ae4774be4175b490d13d1dadf6
[ "Apache-2.0" ]
null
null
null
import os import logging import asyncio from aiohttp import web, web_request from aioapp.app import Application from aioapp import config from aioapp.tracer import Span from aioapp_http import Server, Handler class Config(config.Config): host: str port: int _vars = { 'host': { 'type': ...
24.818182
74
0.558608
import os import logging import asyncio from aiohttp import web, web_request from aioapp.app import Application from aioapp import config from aioapp.tracer import Span from aioapp_http import Server, Handler class Config(config.Config): host: str port: int _vars = { 'host': { 'type': ...
true
true
f772a02586663d0f262ba53cd2702e01db1be034
1,229
py
Python
scrape_players.py
N-lson/osu-top-modstats
8dd8756c04626d7404a136cc22aa0f5978884741
[ "MIT" ]
null
null
null
scrape_players.py
N-lson/osu-top-modstats
8dd8756c04626d7404a136cc22aa0f5978884741
[ "MIT" ]
null
null
null
scrape_players.py
N-lson/osu-top-modstats
8dd8756c04626d7404a136cc22aa0f5978884741
[ "MIT" ]
null
null
null
from time import sleep import csv import re import sys import requests from bs4 import BeautifulSoup def scrape(num_players): url = "https://osu.ppy.sh/p/pp/" players = {} # Handle invalid input if num_players%50 != 0: print("num_players must be divisible by 50") return None max...
26.148936
80
0.589097
from time import sleep import csv import re import sys import requests from bs4 import BeautifulSoup def scrape(num_players): url = "https://osu.ppy.sh/p/pp/" players = {} if num_players%50 != 0: print("num_players must be divisible by 50") return None max_page = num_players//50...
true
true
f772a0c5626186bfb6ad8e402fe9895076a39ce4
177
py
Python
main/admin.py
Dekatron322/iotexchartapp
98c8cfc7ae803d0552c4b701db7ccd0130a3e66d
[ "Apache-2.0" ]
null
null
null
main/admin.py
Dekatron322/iotexchartapp
98c8cfc7ae803d0552c4b701db7ccd0130a3e66d
[ "Apache-2.0" ]
null
null
null
main/admin.py
Dekatron322/iotexchartapp
98c8cfc7ae803d0552c4b701db7ccd0130a3e66d
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Unvetted) admin.site.register(Banner) admin.site.register(IotexChart)
17.7
32
0.79661
from django.contrib import admin from .models import * admin.site.register(Unvetted) admin.site.register(Banner) admin.site.register(IotexChart)
true
true
f772a11afa017d944359f7cb3fe70c2d4a7fbb31
2,507
py
Python
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
31.734177
101
0.755884
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
false
true
f772a16c0159e1b492d7b3e7baed6223cdb630b3
1,289
py
Python
api.py
curtislb/ReviewTranslation
b2d14d349b6016d275fa22532eae6b67af243a55
[ "Apache-2.0" ]
null
null
null
api.py
curtislb/ReviewTranslation
b2d14d349b6016d275fa22532eae6b67af243a55
[ "Apache-2.0" ]
null
null
null
api.py
curtislb/ReviewTranslation
b2d14d349b6016d275fa22532eae6b67af243a55
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: API for Language Models # # Copyright (C) 2001-2014 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # should this be a subclass of ConditionalProbDistI? class ModelI(object): """ A processing interface...
32.225
83
0.671839
class ModelI(object): def __init__(self): raise NotImplementedError() def prob(self, word, context): raise NotImplementedError() def logprob(self, word, context): raise NotImplementedError() def choose_random_word(self, context): raise NotImplementedError() de...
true
true
f772a17ac94f66af3656efc08b479c4bddddc72c
971
py
Python
rlcard/models/__init__.py
randombenj/rlcard
0948035d26e1b619c068360326f12451f5d28f8b
[ "MIT" ]
1,735
2019-09-05T12:49:43.000Z
2022-03-30T12:02:07.000Z
rlcard/models/__init__.py
randombenj/rlcard
0948035d26e1b619c068360326f12451f5d28f8b
[ "MIT" ]
197
2019-09-14T05:59:02.000Z
2022-03-03T19:21:19.000Z
rlcard/models/__init__.py
randombenj/rlcard
0948035d26e1b619c068360326f12451f5d28f8b
[ "MIT" ]
476
2019-09-13T15:25:32.000Z
2022-03-29T01:41:29.000Z
''' Register rule-based models or pre-trianed models ''' from rlcard.models.registration import register, load register( model_id = 'leduc-holdem-cfr', entry_point='rlcard.models.pretrained_models:LeducHoldemCFRModel') register( model_id = 'leduc-holdem-rule-v1', entry_point='rlcard.models.leducholdem...
30.34375
79
0.77137
from rlcard.models.registration import register, load register( model_id = 'leduc-holdem-cfr', entry_point='rlcard.models.pretrained_models:LeducHoldemCFRModel') register( model_id = 'leduc-holdem-rule-v1', entry_point='rlcard.models.leducholdem_rule_models:LeducHoldemRuleModelV1') register( mode...
true
true
f772a1c2e164906c412e73df3f5325541dc97c79
17,129
py
Python
tensorboard/plugins/core/core_plugin_test.py
kevint324/tensorboard
cbc5b1f2d74236d89baa9d4810c166e4cee973a9
[ "Apache-2.0" ]
null
null
null
tensorboard/plugins/core/core_plugin_test.py
kevint324/tensorboard
cbc5b1f2d74236d89baa9d4810c166e4cee973a9
[ "Apache-2.0" ]
null
null
null
tensorboard/plugins/core/core_plugin_test.py
kevint324/tensorboard
cbc5b1f2d74236d89baa9d4810c166e4cee973a9
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.753394
88
0.628058
import collections.abc import contextlib import io import json import os from unittest import mock import zipfile import tensorflow as tf from werkzeug import test as werkzeug_test from werkzeug import wrappers from tensorboard.backend import application from tensorboard.backend.event_processing import data_provide...
true
true
f772a2381149b0df5afaf9a5919e5b2f8c24a592
1,881
py
Python
tmp.py
fatestigma/gaia-visualization
ddddddbb6de43d82b2f1382ba356727528bdb2ef
[ "MIT" ]
null
null
null
tmp.py
fatestigma/gaia-visualization
ddddddbb6de43d82b2f1382ba356727528bdb2ef
[ "MIT" ]
null
null
null
tmp.py
fatestigma/gaia-visualization
ddddddbb6de43d82b2f1382ba356727528bdb2ef
[ "MIT" ]
null
null
null
from model import sparql, namespaces, AIDA from rdflib.namespace import split_uri from collections import defaultdict import pickle data = defaultdict(dict) query = """ SELECT ?cluster (COUNT(?member) AS ?size) WHERE { ?membership aida:cluster ?cluster ; aida:clusterMember ?member . } GROUP BY ?clust...
26.492958
61
0.655502
from model import sparql, namespaces, AIDA from rdflib.namespace import split_uri from collections import defaultdict import pickle data = defaultdict(dict) query = """ SELECT ?cluster (COUNT(?member) AS ?size) WHERE { ?membership aida:cluster ?cluster ; aida:clusterMember ?member . } GROUP BY ?clust...
true
true
f772a34d22ecf3ee1f11bb19a050d17b71a33cbb
422
py
Python
mysite/post/migrations/0004_auto_20210125_1731.py
98ZhaoJeffrey/Glorious-Future
4dd86a838062fac4bc0c1e10cbb008c241b4c835
[ "MIT" ]
1
2021-03-09T01:11:37.000Z
2021-03-09T01:11:37.000Z
mysite/post/migrations/0004_auto_20210125_1731.py
98ZhaoJeffrey/Glorious-Future
4dd86a838062fac4bc0c1e10cbb008c241b4c835
[ "MIT" ]
null
null
null
mysite/post/migrations/0004_auto_20210125_1731.py
98ZhaoJeffrey/Glorious-Future
4dd86a838062fac4bc0c1e10cbb008c241b4c835
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-01-25 22:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0003_auto_20210125_1713'), ] operations = [ migrations.AlterField( model_name='post', name='photo', ...
22.210526
92
0.606635
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0003_auto_20210125_1713'), ] operations = [ migrations.AlterField( model_name='post', name='photo', field=models.ImageField(blank=True, default=...
true
true
f772a43b0e0636b8ed1fa0b158056fff23ddabad
2,933
py
Python
designate/backend/impl_infoblox/config.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
designate/backend/impl_infoblox/config.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
designate/backend/impl_infoblox/config.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Infoblox Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
33.712644
78
0.673031
from oslo_config import cfg from oslo_log import log LOG = log.getLogger(__name__) cfg.CONF.register_group(cfg.OptGroup( name='backend:infoblox', title="Configuration for Infoblox Backend" )) OPTS = [ cfg.StrOpt( 'wapi_url', deprecated_for_removal=True, deprecated_reason="All backen...
true
true
f772a525932250f3f4d09f2d04e0d870e0ae95e1
1,280
py
Python
factorial.py
thundercats-py/python_training
f7b7b7745d9c649880265930519fd839d4a1939e
[ "Unlicense" ]
null
null
null
factorial.py
thundercats-py/python_training
f7b7b7745d9c649880265930519fd839d4a1939e
[ "Unlicense" ]
null
null
null
factorial.py
thundercats-py/python_training
f7b7b7745d9c649880265930519fd839d4a1939e
[ "Unlicense" ]
1
2020-04-03T23:23:05.000Z
2020-04-03T23:23:05.000Z
""" This is the "example" module. The example module supplies one function, factorial(). For example, >>> factorial(5) 120 """ def factorial(n): """Return the factorial of n, an exact integer >= 0. >>> [factorial(n) for n in range(6)] [1, 1, 2, 6, 24, 120] >>> factorial(30) 26525285981219105863...
23.703704
72
0.602344
def factorial(n): import math if not n >= 0: raise ValueError("n must be >= 0") if math.floor(n) != n: raise ValueError("n must be exact integer") if n+1 == n: raise OverflowError("n too large") result = 1 factor = 2 while factor <= n: result *= factor ...
true
true
f772a630b8c8aec9c0d604ce3a9b257e9539f677
136
py
Python
stress/stress.py
iamshreeram/maei
79d28fd27378c8816fd8f5eb6db8b432164d5d7d
[ "MIT" ]
null
null
null
stress/stress.py
iamshreeram/maei
79d28fd27378c8816fd8f5eb6db8b432164d5d7d
[ "MIT" ]
null
null
null
stress/stress.py
iamshreeram/maei
79d28fd27378c8816fd8f5eb6db8b432164d5d7d
[ "MIT" ]
null
null
null
__author__ = 'iamshreeram' # Title : main app # Objective : Stress the REST Service # Created by: Shreeram # Created on: 7/20/2018
19.428571
37
0.698529
__author__ = 'iamshreeram'
true
true
f772a67e200bdeda156939bead6893328b40e74b
7,073
py
Python
Packs/SecBI/Integrations/SecBI/SecBI.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/SecBI/Integrations/SecBI/SecBI.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/SecBI/Integrations/SecBI/SecBI.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests from typing import Dict, Tuple # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS/PARAMS ''' SECBI_API_ROOT = '/api/v1' SECBI_API_ENDPOINT_STATUS = SE...
35.722222
127
0.654036
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests from typing import Dict, Tuple requests.packages.urllib3.disable_warnings() SECBI_API_ROOT = '/api/v1' SECBI_API_ENDPOINT_STATUS = SECBI_API_ROOT + '/status' SECBI_API_ENDPOINT_INCIDENT = SECBI_API_RO...
true
true
f772a7f34a232723d87c2a59fdbf2bd837d10121
4,310
py
Python
SPFlatten.py
jmanteau/SPFlatten
57b53e04e818964716db3296654ad2a0ab4e89ef
[ "Apache-2.0" ]
null
null
null
SPFlatten.py
jmanteau/SPFlatten
57b53e04e818964716db3296654ad2a0ab4e89ef
[ "Apache-2.0" ]
null
null
null
SPFlatten.py
jmanteau/SPFlatten
57b53e04e818964716db3296654ad2a0ab4e89ef
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import re, dns.resolver #----------------------------------------------------- # SPFlattener - Because who needs limits?? # Requires: dnspython # Usage: edit the "root_domain" variable below and run #----------------------------------------------------- # To-do: # Confirm that SPF doesn't fol...
31.925926
68
0.607193
import re, dns.resolver root_domain = "google.com" spf_ip_list = [] spf_nonflat_mechanisms = [] def main(): global all_mechanism all_mechanism = "" flatten_spf(root_domain) dedupe_spf_ip_list = list(set(spf_ip_list)) flat_spf = "v=spfv1" for ip in dedupe_spf_ip_list: if re.match(r'.*:.*...
false
true
f772a95c803f1d476c527b22c5f88ea63cad14a7
1,456
py
Python
my_code.py
Athenian-ComputerScience-Fall2020/average-x-21lsparks
04af6550cabf457679039dc832484e565045bd16
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-ComputerScience-Fall2020/average-x-21lsparks
04af6550cabf457679039dc832484e565045bd16
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-ComputerScience-Fall2020/average-x-21lsparks
04af6550cabf457679039dc832484e565045bd16
[ "Apache-2.0" ]
null
null
null
# Collaborators (including web sites where you got help: (enter none if you didn't need help) #tutor def avg(user_list): # Insert code here average = sum(user_list)/len(user_list) return average if __name__ == '__main__': num_list=[] print("Input a number to be averaged. When finished inputing nu...
39.351351
108
0.673077
#tutor def avg(user_list): # Insert code here average = sum(user_list)/len(user_list) return average if __name__ == '__main__': num_list=[] print("Input a number to be averaged. When finished inputing numbers, type 'done'") while True: tba = (input("Number: ")) if tba.isnumeri...
true
true
f772a96058bf26b81ad8b96c9fce085e809509cb
4,256
py
Python
modules/ckanext-ytp_request/ckanext/ytp_request/logic/action/update.py
vrk-kpa/opendata-ckan
8936e2d9e700b9e5534fe2a51eedc2d1ede8c10b
[ "MIT" ]
null
null
null
modules/ckanext-ytp_request/ckanext/ytp_request/logic/action/update.py
vrk-kpa/opendata-ckan
8936e2d9e700b9e5534fe2a51eedc2d1ede8c10b
[ "MIT" ]
10
2021-12-02T10:33:42.000Z
2022-03-31T11:00:54.000Z
modules/ckanext-ytp_request/ckanext/ytp_request/logic/action/update.py
vrk-kpa/opendata-ckan
8936e2d9e700b9e5534fe2a51eedc2d1ede8c10b
[ "MIT" ]
null
null
null
from ckan import model, logic from ckanext.ytp_request.model import MemberRequest from ckan.common import c from ckanext.ytp_request.helper import get_default_locale from ckanext.ytp_request.mail import mail_process_status import logging import datetime log = logging.getLogger(__name__) def member_request_reject(co...
40.150943
125
0.708177
from ckan import model, logic from ckanext.ytp_request.model import MemberRequest from ckan.common import c from ckanext.ytp_request.helper import get_default_locale from ckanext.ytp_request.mail import mail_process_status import logging import datetime log = logging.getLogger(__name__) def member_request_reject(co...
true
true
f772a9d798c0b85e52a140c329c87fb8b67dffd8
901
py
Python
ArticleMultistream.py
genelkim/hanja-kanji-index
dc3fa588305197c5a9aa6a99427eb84334a9889d
[ "MIT" ]
1
2021-11-13T06:42:38.000Z
2021-11-13T06:42:38.000Z
ArticleMultistream.py
genelkim/hanja-kanji-index
dc3fa588305197c5a9aa6a99427eb84334a9889d
[ "MIT" ]
null
null
null
ArticleMultistream.py
genelkim/hanja-kanji-index
dc3fa588305197c5a9aa6a99427eb84334a9889d
[ "MIT" ]
null
null
null
""" Class to interface with the article multistream bzip2 file. """ import bz2 import xml.etree.ElementTree as ET class ArticleMultistream: def __init__(self, multistream_file): self.__rawstream = open(multistream_file, 'rb') def get_block(self, block_offset): dc = bz2.BZ2Decompressor() self.__rawst...
28.15625
59
0.704772
import bz2 import xml.etree.ElementTree as ET class ArticleMultistream: def __init__(self, multistream_file): self.__rawstream = open(multistream_file, 'rb') def get_block(self, block_offset): dc = bz2.BZ2Decompressor() self.__rawstream.seek(block_offset) rawstr = self.__rawstream.read() ret...
true
true
f772aa865defcf322e1334272be96544e83285f6
1,317
py
Python
Structures/FiniteFieldsWrapper.py
Galieve/algebra_computacional
2e60100de9d605cf65e90e677458264d9a923e2b
[ "MIT" ]
1
2020-12-28T16:40:16.000Z
2020-12-28T16:40:16.000Z
Structures/FiniteFieldsWrapper.py
Galieve/algebra_computacional
2e60100de9d605cf65e90e677458264d9a923e2b
[ "MIT" ]
null
null
null
Structures/FiniteFieldsWrapper.py
Galieve/algebra_computacional
2e60100de9d605cf65e90e677458264d9a923e2b
[ "MIT" ]
null
null
null
import sage.rings.finite_rings.finite_field_constructor from Structures.Field import Field class FiniteFieldsWrapper(Field): _galoisField = None _p = None _k = None def __init__(self, p, k, var): super(FiniteFieldsWrapper, self).__init__() self._p = p self._k = k s...
23.105263
99
0.599848
import sage.rings.finite_rings.finite_field_constructor from Structures.Field import Field class FiniteFieldsWrapper(Field): _galoisField = None _p = None _k = None def __init__(self, p, k, var): super(FiniteFieldsWrapper, self).__init__() self._p = p self._k = k s...
true
true
f772aab2b141f53ec901b826cfbee3659e221e41
7,185
py
Python
blender/2.79/scripts/modules/bpy_extras/image_utils.py
uzairakbar/bpy2.79
3a3e0004ac6783c4e4b89d939e4432de99026a85
[ "MIT" ]
2
2019-11-27T09:05:42.000Z
2020-02-20T01:25:23.000Z
blender/2.79/scripts/modules/bpy_extras/image_utils.py
uzairakbar/bpy2.79
3a3e0004ac6783c4e4b89d939e4432de99026a85
[ "MIT" ]
null
null
null
blender/2.79/scripts/modules/bpy_extras/image_utils.py
uzairakbar/bpy2.79
3a3e0004ac6783c4e4b89d939e4432de99026a85
[ "MIT" ]
4
2020-02-19T20:02:26.000Z
2022-02-11T18:47:56.000Z
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
34.543269
79
0.593876
__all__ = ( "load_image", ) def load_image(imagepath, dirname="", place_holder=False, recursive=False, ncase_cmp=True, convert_callback=None, verbose=False, relpath=None, check_existing=Fa...
true
true
f772abf630cef92e1b525241944d3bda902c01e4
322
py
Python
diagrams/gcp/general.py
brandonjbjelland/diagrams
14349f38a045856f31f1d0df319fc107c787b047
[ "MIT" ]
null
null
null
diagrams/gcp/general.py
brandonjbjelland/diagrams
14349f38a045856f31f1d0df319fc107c787b047
[ "MIT" ]
null
null
null
diagrams/gcp/general.py
brandonjbjelland/diagrams
14349f38a045856f31f1d0df319fc107c787b047
[ "MIT" ]
null
null
null
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _GCP class _General(_GCP): _type = "general" _icon_dir = "resources/gcp/general" class GoogleCloudPlatform(_General): _icon = "google-cloud-platform.png" class GenericService(_General): _icon = "generic-service.png...
18.941176
68
0.723602
from . import _GCP class _General(_GCP): _type = "general" _icon_dir = "resources/gcp/general" class GoogleCloudPlatform(_General): _icon = "google-cloud-platform.png" class GenericService(_General): _icon = "generic-service.png"
true
true
f772ac49f15b561758dcb4501ce91dce658c3a66
2,879
py
Python
Xerus/GSASII/imports/G2phase_xyz.py
pedrobcst/Xerus
09df088e0207176df0d20715e1c9778d09d28250
[ "MIT" ]
18
2021-12-10T03:05:49.000Z
2022-03-25T15:48:35.000Z
Xerus/GSASII/imports/G2phase_xyz.py
pedrobcst/Xerus
09df088e0207176df0d20715e1c9778d09d28250
[ "MIT" ]
14
2022-02-24T11:09:26.000Z
2022-03-30T07:42:17.000Z
Xerus/GSASII/imports/G2phase_xyz.py
pedrobcst/Xerus
09df088e0207176df0d20715e1c9778d09d28250
[ "MIT" ]
1
2022-02-25T16:26:54.000Z
2022-02-25T16:26:54.000Z
# -*- coding: utf-8 -*- ########### SVN repository information ################### # $Date: $ # $Author: $ # $Revision: $ # $URL: $ # $Id: $ ########### SVN repository information ################### # ''' *Module G2phase_xyz: read coordinates from an xyz file* ------------------------------------------------------- A...
33.091954
84
0.554706
from __future__ import division, print_function import sys import os.path import math import random as ran import numpy as np import GSASIIobj as G2obj import GSASIIspc as G2spc import GSASIIlattice as G2lat import GSASIIpath GSASIIpath.SetVersionNumber("$Revision: $") class XYZ_ReaderClass(G2obj.ImportPhase): de...
true
true
f772acbc97793ccfd8ee2ec8a10bbb95454fe281
3,250
py
Python
src/leetcode_1792_maximum_average_pass_ratio.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
2
2020-12-08T13:59:10.000Z
2021-05-01T05:07:39.000Z
src/leetcode_1792_maximum_average_pass_ratio.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
null
null
null
src/leetcode_1792_maximum_average_pass_ratio.py
yurirocha15/coding_practice
952506932c47414da689454853ee745637413160
[ "MIT" ]
1
2021-05-02T17:42:02.000Z
2021-05-02T17:42:02.000Z
# @l2g 1792 python3 # [1792] Maximum Average Pass Ratio # Difficulty: Medium # https://leetcode.com/problems/maximum-average-pass-ratio # # There is a school that has classes of students and each class will be having a final exam. # You are given a 2D integer array classes,where classes[i] = [passi,totali]. # You know ...
31.553398
153
0.667692
import heapq from typing import List, Tuple class Solution: def maxAverageRatio(self, classes: List[List[int]], extraStudents: int) -> float: pq: List[Tuple[float, List[int]]] = [ (c[0] / c[1] - (c[0] + 1) / (c[1] + 1), c) for c in classes ] heapq.heapify(pq) for _ ...
true
true
f772ad17ce361356312351649e67fe84a15fb3a8
14,997
py
Python
cirq/google/api/v2/calibration_pb2.py
exAClior/Cirq
0701327bc66c988428f302dd1e4bed1eef1535a6
[ "Apache-2.0" ]
1
2020-11-23T14:42:03.000Z
2020-11-23T14:42:03.000Z
cirq/google/api/v2/calibration_pb2.py
rohitvuppala/Cirq
0ff2894e053e4ce3bb1b54e9b9de1cc4345d10b3
[ "Apache-2.0" ]
4
2021-01-11T10:35:37.000Z
2021-01-28T19:17:02.000Z
cirq/google/api/v2/calibration_pb2.py
rohitvuppala/Cirq
0ff2894e053e4ce3bb1b54e9b9de1cc4345d10b3
[ "Apache-2.0" ]
1
2021-12-30T21:50:00.000Z
2021-12-30T21:50:00.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: cirq/google/api/v2/calibration.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _mes...
43.343931
1,480
0.774822
from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from ...
true
true
f772ade13e60fc8f854de88198005b52cae6f423
622
py
Python
config/settings/sub_settings/cloud/local.py
devspoon/devspoon-django-default-structure
dd48fc0476dee2c89c68d29fca7d6084380de1c7
[ "MIT" ]
null
null
null
config/settings/sub_settings/cloud/local.py
devspoon/devspoon-django-default-structure
dd48fc0476dee2c89c68d29fca7d6084380de1c7
[ "MIT" ]
null
null
null
config/settings/sub_settings/cloud/local.py
devspoon/devspoon-django-default-structure
dd48fc0476dee2c89c68d29fca7d6084380de1c7
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from config.settings.base import BASE_DIR # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_URL = "/static/" STATIC_DIR = os.path.join(BASE_DIR, "static") STATIC...
23.037037
76
0.71865
import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from config.settings.base import BASE_DIR STATIC_URL = "/static/" STATIC_DIR = os.path.join(BASE_DIR, "static") STATICFILES_DIRS = [ STATIC_DIR, ] MEDIA_URL = "/media/" MEDIA_ROOT = os.path.join(BASE_DIR, "media...
true
true
f772ae7f13109563076c18009ec2db10eaed5a6a
1,093
py
Python
TicketHelper/Mail.py
forblackking/TicketHelper
4dd03eac72be6e7ff1916b75ec6df0cf889b6d01
[ "MIT" ]
null
null
null
TicketHelper/Mail.py
forblackking/TicketHelper
4dd03eac72be6e7ff1916b75ec6df0cf889b6d01
[ "MIT" ]
null
null
null
TicketHelper/Mail.py
forblackking/TicketHelper
4dd03eac72be6e7ff1916b75ec6df0cf889b6d01
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: gbk -* # @auther:Hieda no Chiaki <forblackking@gmail.com> import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart class SendMail: def __init__(self): pass def send(self): username = "forblackking@gmail.com" ...
22.770833
53
0.535224
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart class SendMail: def __init__(self): pass def send(self): username = "forblackking@gmail.com" password = "**************" to = ['forblackking@qq.com'] m...
true
true
f772af5c9422ee33b9fb52adbbf94d18befdfe35
5,862
py
Python
ModelArchi/GANModel/SNdcgan.py
veya2ztn/mltool
4ed151152845ebe3de128e1f53c478581c1492e4
[ "IJG" ]
null
null
null
ModelArchi/GANModel/SNdcgan.py
veya2ztn/mltool
4ed151152845ebe3de128e1f53c478581c1492e4
[ "IJG" ]
null
null
null
ModelArchi/GANModel/SNdcgan.py
veya2ztn/mltool
4ed151152845ebe3de128e1f53c478581c1492e4
[ "IJG" ]
null
null
null
import torch import torch.nn as nn from torch.autograd import Variable from torch import autograd import time as t import os from itertools import chain from torchvision import utils from .spectral_normalization import SpectralNorm class WassersteinLoss(torch.nn.Module): def forward(self, x , target): loss...
38.565789
134
0.62146
import torch import torch.nn as nn from torch.autograd import Variable from torch import autograd import time as t import os from itertools import chain from torchvision import utils from .spectral_normalization import SpectralNorm class WassersteinLoss(torch.nn.Module): def forward(self, x , target): loss...
true
true
f772afbc78469b954743e7115fa45b5af1cbd8d3
907
py
Python
experiments/e2.py
greenbech/multi-instrument-onsets-and-frames
f37e3ce56e581ea999c1cec7b8188870333d67c2
[ "MIT" ]
null
null
null
experiments/e2.py
greenbech/multi-instrument-onsets-and-frames
f37e3ce56e581ea999c1cec7b8188870333d67c2
[ "MIT" ]
null
null
null
experiments/e2.py
greenbech/multi-instrument-onsets-and-frames
f37e3ce56e581ea999c1cec7b8188870333d67c2
[ "MIT" ]
null
null
null
from train import ex def main(): batch_size = 8 sequence_length = 327680 model_complexity = 48 ex.run( config_updates={ "split": "redux", "audio": "stems/bass.flac", "instrument": "electric-bass", "max_harmony": 2, "skip_pitch_bend_t...
28.34375
86
0.555678
from train import ex def main(): batch_size = 8 sequence_length = 327680 model_complexity = 48 ex.run( config_updates={ "split": "redux", "audio": "stems/bass.flac", "instrument": "electric-bass", "max_harmony": 2, "skip_pitch_bend_t...
true
true
f772afc05deb07b6cef699c2c24394c3fb32027a
76,621
py
Python
theano/sparse/opt.py
michaelosthege/aesara
55c88832ba71f87c9612d573ede74a4c042ef570
[ "BSD-3-Clause" ]
1
2020-12-30T19:12:52.000Z
2020-12-30T19:12:52.000Z
theano/sparse/opt.py
michaelosthege/aesara
55c88832ba71f87c9612d573ede74a4c042ef570
[ "BSD-3-Clause" ]
null
null
null
theano/sparse/opt.py
michaelosthege/aesara
55c88832ba71f87c9612d573ede74a4c042ef570
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import scipy import theano from theano import gof, scalar, tensor from theano.configdefaults import config from theano.gof.op import COp from theano.misc.safe_asarray import _asarray from theano.sparse import basic as sparse from theano.sparse.basic import ( CSC, CSR, csm_data, csm_g...
36.837019
149
0.567103
import numpy as np import scipy import theano from theano import gof, scalar, tensor from theano.configdefaults import config from theano.gof.op import COp from theano.misc.safe_asarray import _asarray from theano.sparse import basic as sparse from theano.sparse.basic import ( CSC, CSR, csm_data, csm_g...
true
true
f772b09e105bf97f632da4122f8c15f6a88aa34e
4,108
py
Python
tests/test_parsing.py
Dobatymo/quepy
d56a5ae1310ef7c3e6e292a03a84ef922f192788
[ "BSD-3-Clause" ]
null
null
null
tests/test_parsing.py
Dobatymo/quepy
d56a5ae1310ef7c3e6e292a03a84ef922f192788
[ "BSD-3-Clause" ]
null
null
null
tests/test_parsing.py
Dobatymo/quepy
d56a5ae1310ef7c3e6e292a03a84ef922f192788
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Machinalis S.R.L. # This file is part of quepy and is distributed under the Modified BSD License. # You should have received a copy of license in the LICENSE file. # # Authors: Rafael Carrascosa <rcarrascosa@machinalis.com> # Gonzalo Garcia Berrotara...
31.358779
79
0.627556
from __future__ import absolute_import, unicode_literals import unittest from quepy.parsing import QuestionTemplate, Particle, Lemma from quepy.tagger import Word class Mockrule(object): rulename = "Mock" class TestQuestionTemplate(unittest.TestCase): def setUp(self): self.mockrule = Mockrule ...
true
true
f772b0f6ab1f8bb15a58773fae8c996fb0317e04
1,639
py
Python
utils/audio_files_to_wav16.py
entn-at/asv-cm-reinforce
8cfe89b51de861d508dc86b11d0d029b364f016b
[ "MIT" ]
14
2020-02-06T15:18:21.000Z
2022-02-10T03:40:25.000Z
utils/audio_files_to_wav16.py
entn-at/asv-cm-reinforce
8cfe89b51de861d508dc86b11d0d029b364f016b
[ "MIT" ]
1
2021-03-31T03:21:40.000Z
2021-03-31T11:55:29.000Z
utils/audio_files_to_wav16.py
entn-at/asv-cm-reinforce
8cfe89b51de861d508dc86b11d0d029b364f016b
[ "MIT" ]
4
2020-02-11T08:15:44.000Z
2021-03-29T10:30:39.000Z
# Go through a directory, gather all files with # specific postfix and attempt converting them into # .wav files with 16-bit, 16khz sampling rate. import argparse import os import subprocess from tqdm import tqdm parser = argparse.ArgumentParser("Gather audio files from directory and turn them into .wav files") parse...
34.87234
130
0.685784
import argparse import os import subprocess from tqdm import tqdm parser = argparse.ArgumentParser("Gather audio files from directory and turn them into .wav files") parser.add_argument("directory", help="Directory to scan through") parser.add_argument("output", help="Directory where converted samples should be place...
true
true
f772b126aed1cb252194b1bb1b3f6e8ffbca2bd3
20,367
py
Python
src/eventgrid/azext_eventgrid/custom.py
schaabs/azure-cli-extensions
f3deec5bee34aec80a78625b255fb25a2be20aca
[ "MIT" ]
null
null
null
src/eventgrid/azext_eventgrid/custom.py
schaabs/azure-cli-extensions
f3deec5bee34aec80a78625b255fb25a2be20aca
[ "MIT" ]
null
null
null
src/eventgrid/azext_eventgrid/custom.py
schaabs/azure-cli-extensions
f3deec5bee34aec80a78625b255fb25a2be20aca
[ "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. # --------------------------------------------------------------------...
38.283835
127
0.697943
from six.moves.urllib.parse import quote import re from knack.log import get_logger from knack.util import CLIError from msrestazure.tools import parse_resource_id from azure.cli.core.commands.client_factory import get_subscription_id from azext_eventgrid.mgmt.eventgrid.models import ( EventSubscription, Eve...
true
true
f772b16b623b8c276e24e478c2bab581e0191648
2,672
py
Python
oliva.py
augeas/NeverMindTheMolluscs
829185ad1d9239368d5b6f3572fc07b7825deb49
[ "Apache-2.0" ]
null
null
null
oliva.py
augeas/NeverMindTheMolluscs
829185ad1d9239368d5b6f3572fc07b7825deb49
[ "Apache-2.0" ]
null
null
null
oliva.py
augeas/NeverMindTheMolluscs
829185ad1d9239368d5b6f3572fc07b7825deb49
[ "Apache-2.0" ]
null
null
null
import numpy as np class Oliva(object): def __init__(self,width=640, skip=12, act_diff=0.015, act_decay=0.1, act_prod=0.1, sat=0.25, in_diff=0.0, in_decay=0.014, in_mm=0.1, h_decay=0.1, hormone=0.5): self.width = width self.cells = np.zeros((2,2,self.width)) ...
30.712644
174
0.512725
import numpy as np class Oliva(object): def __init__(self,width=640, skip=12, act_diff=0.015, act_decay=0.1, act_prod=0.1, sat=0.25, in_diff=0.0, in_decay=0.014, in_mm=0.1, h_decay=0.1, hormone=0.5): self.width = width self.cells = np.zeros((2,2,self.width)) ...
true
true
f772b1d99202888f9f9907122dcabac6ef1e96d7
576
py
Python
2015/04/fc_2015_04_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
2015/04/fc_2015_04_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
1
2015-04-27T01:43:45.000Z
2015-04-27T01:43:45.000Z
2015/04/fc_2015_04_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # imports go here # # Free Coding session for 2015-04-18 # Written by Matt Warren # class Foo(object): nice_level = "HI THERE" def __init__(self, name): self.name = name def p(self): return self.nice_level def q(self): return Foo.nice_level def foo(...
16.457143
60
0.590278
class Foo(object): nice_level = "HI THERE" def __init__(self, name): self.name = name def p(self): return self.nice_level def q(self): return Foo.nice_level def foo(): f = Foo("matt") print(f.p()) print(f.q()) print(dir(f)) print(dir(Foo)) print([...
true
true
f772b278b9d69fd3f24fb9125d1579e253ceefa7
99
py
Python
edge-modules/extensions/customvision/avaextension/wsgi.py
MSKeith/keith-azure-video-analyzer-ignite-development
1950a63ffeff47ef690c6b8e32fd805c8fea5612
[ "MIT" ]
null
null
null
edge-modules/extensions/customvision/avaextension/wsgi.py
MSKeith/keith-azure-video-analyzer-ignite-development
1950a63ffeff47ef690c6b8e32fd805c8fea5612
[ "MIT" ]
null
null
null
edge-modules/extensions/customvision/avaextension/wsgi.py
MSKeith/keith-azure-video-analyzer-ignite-development
1950a63ffeff47ef690c6b8e32fd805c8fea5612
[ "MIT" ]
null
null
null
from app import app as application def create(): application.run(host='127.0.0.1', port=8888)
19.8
48
0.707071
from app import app as application def create(): application.run(host='127.0.0.1', port=8888)
true
true
f772b28f26929ff34ffe3dedac7d303210ce302d
3,967
py
Python
src/gaudireader.py
andresginera/gaudiviewx
173f7410a3748a6925dfce6ae1e7a69eeec2c4f1
[ "Apache-2.0" ]
null
null
null
src/gaudireader.py
andresginera/gaudiviewx
173f7410a3748a6925dfce6ae1e7a69eeec2c4f1
[ "Apache-2.0" ]
null
null
null
src/gaudireader.py
andresginera/gaudiviewx
173f7410a3748a6925dfce6ae1e7a69eeec2c4f1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############## # GaudiViewX: UCSF ChimeraX extension to # explore and analyze GaudiMM solutions # https://github.com/insilichem/gaudiviewx # Copyright 2019 Andrés Giner Antón, Jaime Rodriguez-Guerra # and Jean-Didier Marechal # Licensed under the Apache Lice...
32.252033
103
0.590623
import tempfile import zipfile import yaml import os from chimerax.core import models, io from chimerax.core.commands import run, concise_model_spec class GaudiModel(object): def __init__(self, controller, path, session, *args, **kwargs): self.path = path self.controller = controller ...
true
true
f772b2b33d574f7c47ee713fcbf80c0466a490a0
3,953
py
Python
pubsub/nox.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
1
2018-06-29T17:53:28.000Z
2018-06-29T17:53:28.000Z
pubsub/nox.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
null
null
null
pubsub/nox.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 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 agreed to in writing, s...
28.438849
77
0.655452
from __future__ import absolute_import import os import nox LOCAL_DEPS = ( os.path.join('..', 'api_core'), os.path.join('..', 'core'), ) @nox.session def default(session): session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS) session.install('-e', '.') session.run( 'py...
true
true
f772b2eb68b2c5d2b6b9172ff589751e351c8ade
900
py
Python
thirdparty/gstreamer/1.0/x86_64/lib/gst-validate-launcher/python/launcher/__init__.py
ljmf00/autopsy
34a980b7fc7ea47287e7101f5bba6cb1b518bc7b
[ "Apache-2.0" ]
1,473
2015-01-02T06:13:10.000Z
2022-03-30T09:45:34.000Z
thirdparty/gstreamer/1.0/x86_64/lib/gst-validate-launcher/python/launcher/__init__.py
ljmf00/autopsy
34a980b7fc7ea47287e7101f5bba6cb1b518bc7b
[ "Apache-2.0" ]
1,068
2015-02-04T14:33:38.000Z
2022-03-31T03:49:28.000Z
thirdparty/gstreamer/1.0/x86_64/lib/gst-validate-launcher/python/launcher/__init__.py
ljmf00/autopsy
34a980b7fc7ea47287e7101f5bba6cb1b518bc7b
[ "Apache-2.0" ]
510
2015-01-09T19:46:08.000Z
2022-03-23T13:25:34.000Z
#!/usr/bin/env python3 # # Copyright (c) 2014,Thibault Saunier <thibault.saunier@collabora.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (...
40.909091
70
0.77
from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
true
true
f772b3895eb558384d7856e97648a3980bbd61c2
803
py
Python
quality_change.py
IamAbhilashPathak/CNERG
b9e3e52ad72773f79c53a2c6134767cc4a66f542
[ "MIT" ]
null
null
null
quality_change.py
IamAbhilashPathak/CNERG
b9e3e52ad72773f79c53a2c6134767cc4a66f542
[ "MIT" ]
null
null
null
quality_change.py
IamAbhilashPathak/CNERG
b9e3e52ad72773f79c53a2c6134767cc4a66f542
[ "MIT" ]
1
2018-08-25T06:42:41.000Z
2018-08-25T06:42:41.000Z
import sys import os if len(sys.argv) < 3: print >> sys.stderr, "Use %s <video id> <mode quic|http>" exit(2) vid = sys.argv[1] mode = sys.argv[2] output_filename = os.path.join(os.path.expanduser('~'), vid, "%s_%s_quality_change.txt"%(vid, mode)) input_filename = os.path.join(os.path.expanduser('~'), vid, "%...
25.09375
100
0.505604
import sys import os if len(sys.argv) < 3: print >> sys.stderr, "Use %s <video id> <mode quic|http>" exit(2) vid = sys.argv[1] mode = sys.argv[2] output_filename = os.path.join(os.path.expanduser('~'), vid, "%s_%s_quality_change.txt"%(vid, mode)) input_filename = os.path.join(os.path.expanduser('~'), vid, "%...
true
true
f772b48c281bb1e041cf583976f17e074a24729c
2,119
py
Python
pipeinspector/tests/test_widgets.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
2
2017-01-19T17:22:49.000Z
2020-04-18T14:00:38.000Z
pipeinspector/tests/test_widgets.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
null
null
null
pipeinspector/tests/test_widgets.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
null
null
null
# coding=utf-8 # Filename: test_widgets.py """ ... """ from __future__ import division, absolute_import, print_function from km3pipe.testing import * from pipeinspector.widgets import BlobWidget __author__ = "Tamas Gal" __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration." __credits__ = [] __lic...
35.915254
73
0.558754
from __future__ import division, absolute_import, print_function from km3pipe.testing import * from pipeinspector.widgets import BlobWidget __author__ = "Tamas Gal" __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration." __credits__ = [] __license__ = "MIT" __maintainer__ = "Tamas Gal" __email__ = ...
true
true
f772b4b511c2c839790a088ff50ee2969f914a78
3,023
py
Python
tuxeatpi/actionner/actionner.py
titilambert/tuxeatpi
1a32ee51bb5130a57d69d5c319ac8a8460ebe60e
[ "Apache-2.0" ]
2
2016-08-08T02:12:07.000Z
2016-08-18T18:49:36.000Z
tuxeatpi/actionner/actionner.py
titilambert/tuxeatpi
1a32ee51bb5130a57d69d5c319ac8a8460ebe60e
[ "Apache-2.0" ]
11
2016-07-31T19:54:19.000Z
2020-04-13T11:09:55.000Z
tuxeatpi/actionner/actionner.py
TuxEatPi/tuxeatpi
1a32ee51bb5130a57d69d5c319ac8a8460ebe60e
[ "Apache-2.0" ]
null
null
null
"""Voice component""" import importlib from queue import Empty from multiprocessing import Process class Actionner(Process): """Define voices component For now voice use Nuance communications services """ def __init__(self, tuxdroid): Process.__init__(self) # Set logger self....
35.988095
83
0.565663
import importlib from queue import Empty from multiprocessing import Process class Actionner(Process): def __init__(self, tuxdroid): Process.__init__(self) self.logger = tuxdroid.logger.getChild("Actionner") self.logger.debug("Initialization") self.tuxdroid = tuxdr...
true
true
f772b4e1fba6f9f84c47b819f730340e23eca840
2,188
py
Python
tests/unit/states/test_quota.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
tests/unit/states/test_quota.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
tests/unit/states/test_quota.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
# -*- coding: utf-8 -*- """ :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Libs import salt.states.quota as quota # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin fr...
34.730159
81
0.585009
from __future__ import absolute_import, print_function, unicode_literals import salt.states.quota as quota from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase class QuotaTestCase(TestCase, LoaderModuleMockMixin): def set...
true
true
f772b529f8ed61cd40cafd5292704a03350d1490
12,166
py
Python
lasmulticontrol4/agent_3/dataprocessingnode_3.py
Pytrik1/FormationSim4
f1f4947cad14a74fb7524a86d2f91f3510c08c08
[ "MIT" ]
null
null
null
lasmulticontrol4/agent_3/dataprocessingnode_3.py
Pytrik1/FormationSim4
f1f4947cad14a74fb7524a86d2f91f3510c08c08
[ "MIT" ]
null
null
null
lasmulticontrol4/agent_3/dataprocessingnode_3.py
Pytrik1/FormationSim4
f1f4947cad14a74fb7524a86d2f91f3510c08c08
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import division from math import * import rospy import numpy as np from rospy_tutorials.msg import Floats from rospy.numpy_msg import numpy_msg from sensor_msgs.msg import LaserScan print "running" class determine_z_values: ''' Determines the inter-agent distance values...
38.622222
130
0.450025
from __future__ import division from math import * import rospy import numpy as np from rospy_tutorials.msg import Floats from rospy.numpy_msg import numpy_msg from sensor_msgs.msg import LaserScan print "running" class determine_z_values: ''' Determines the inter-agent distance values and publishes it to z...
false
true
f772b618c1eed9c3e88701caf8d2502f38754973
13,229
py
Python
avida/avida-core/support/utils/AvidaUtils/PlatformTool.py
FergusonAJ/plastic-evolvability-avida
441a91f1cafa2a0883f8f3ce09c8894efa963e7c
[ "MIT" ]
2
2021-09-16T14:47:43.000Z
2021-10-31T04:55:16.000Z
avida/avida-core/support/utils/AvidaUtils/PlatformTool.py
FergusonAJ/plastic-evolvability-avida
441a91f1cafa2a0883f8f3ce09c8894efa963e7c
[ "MIT" ]
null
null
null
avida/avida-core/support/utils/AvidaUtils/PlatformTool.py
FergusonAJ/plastic-evolvability-avida
441a91f1cafa2a0883f8f3ce09c8894efa963e7c
[ "MIT" ]
2
2020-08-19T20:01:14.000Z
2020-12-21T21:24:12.000Z
############################################################################## ## Copyright (C) 1999-2006 Michigan State University ## ## Based on work Copyright (C) 1993-2003 California Institute of Technology ## ## ## ## R...
32.74505
144
0.661123
import SCons import os import sys CLVar = SCons.Util.CLVar def _posix_defaults(env): env.Replace( PLATFORM_CPPPATH = CLVar('/usr/include /usr/local/include /opt/local/include' '$CPPPATH'), PLATFORM_LIBPATH = CLVar('/usr/lib /usr/local/lib /opt/local/lib' '$LIBPATH'), _PLATFORM_DEBUG_BUILD_FLAGS = ...
true
true
f772b65d4d1a8add4b643a21392d68d839860fc9
5,234
py
Python
BikeShare/bikeShareData/parseCSV.py
MElody9120/UESTC-FinalRepo
f7271e76090d92866a4c9346da19e4b7464f5f0b
[ "MIT" ]
null
null
null
BikeShare/bikeShareData/parseCSV.py
MElody9120/UESTC-FinalRepo
f7271e76090d92866a4c9346da19e4b7464f5f0b
[ "MIT" ]
null
null
null
BikeShare/bikeShareData/parseCSV.py
MElody9120/UESTC-FinalRepo
f7271e76090d92866a4c9346da19e4b7464f5f0b
[ "MIT" ]
null
null
null
# Author Melody # Data 2021-06-03 16:27:40 import pandas as pd import geopy.distance # Pytest is an automated testing module on Python,Use Pytest to test the legitimacy on Bikeshare Data # import pytest as pt # Coords is a data structures to save How Bikeshare Date,Coord just like a List def getStartEndCoords(): ...
44.735043
120
0.628964
import pandas as pd import geopy.distance def getStartEndCoords(): filename = "2019.7-2020.3-Bikeshare-Los_Angeles.csv" df = pd.read_csv(filename, sep=",", index_col='Ending Station ID', low_memory=False) allStations = [3005, 3006, 3007, 3008, 3009, 3010, 3011, 3014, 3016, 3018, 3019, 3020...
true
true
f772b68268103689a30cd24f192e5b9cd248928d
8,492
py
Python
examples/minitwit/minitwit.py
sundippatel/flask
eea93424142ede248d9febee6be11b37faf9fbb1
[ "BSD-3-Clause" ]
25
2015-01-31T15:18:10.000Z
2021-11-14T20:09:43.000Z
examples/minitwit/minitwit.py
barrybonds/flask
da1c1f0d7f8e2df19eb320b176021511b7d05b76
[ "BSD-3-Clause" ]
1
2015-08-26T16:25:48.000Z
2015-08-26T16:25:48.000Z
examples/minitwit/minitwit.py
barrybonds/flask
da1c1f0d7f8e2df19eb320b176021511b7d05b76
[ "BSD-3-Clause" ]
4
2015-03-06T01:14:03.000Z
2020-12-23T00:27:56.000Z
# -*- coding: utf-8 -*- """ MiniTwit ~~~~~~~~ A microblogging application written with Flask and sqlite3. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import time from sqlite3 import dbapi2 as sqlite3 from hashlib import md5 from datetime import datetim...
33.042802
76
0.62082
import time from sqlite3 import dbapi2 as sqlite3 from hashlib import md5 from datetime import datetime from flask import Flask, request, session, url_for, redirect, \ render_template, abort, g, flash, _app_ctx_stack from werkzeug import check_password_hash, generate_password_hash DATABASE = '/tmp/minitwit.db' ...
true
true
f772b718296b86845dbcd887bb63a3bf9a4e1c55
1,182
py
Python
tests/kibana/test_integration.py
felixbarny/apm-integration-testing
b0cef3414173aa3e5ec8100d1e2ec2b0d810f504
[ "Apache-2.0" ]
null
null
null
tests/kibana/test_integration.py
felixbarny/apm-integration-testing
b0cef3414173aa3e5ec8100d1e2ec2b0d810f504
[ "Apache-2.0" ]
1
2021-01-14T08:13:28.000Z
2021-07-19T12:06:21.000Z
tests/kibana/test_integration.py
felixbarny/apm-integration-testing
b0cef3414173aa3e5ec8100d1e2ec2b0d810f504
[ "Apache-2.0" ]
1
2021-07-02T00:04:24.000Z
2021-07-02T00:04:24.000Z
import urllib.parse from selenium.webdriver import Chrome, ChromeOptions from selenium.webdriver.common.by import By from webium import BasePage, Find from webium.driver import close_driver, get_driver import pytest import webium.settings class HeadlessChrome(Chrome): def __init__(self): chrome_options ...
27.488372
99
0.733503
import urllib.parse from selenium.webdriver import Chrome, ChromeOptions from selenium.webdriver.common.by import By from webium import BasePage, Find from webium.driver import close_driver, get_driver import pytest import webium.settings class HeadlessChrome(Chrome): def __init__(self): chrome_options ...
true
true
f772b72326c1eaa3d382e8706743aca9fe5ecedc
24
py
Python
cyclus_input_gen/__init__.py
jbae11/cyclus_input_gen
05485033f93227804697f39da61b515249cf9118
[ "BSD-3-Clause" ]
1
2019-03-11T12:40:07.000Z
2019-03-11T12:40:07.000Z
cyclus_input_gen/__init__.py
jbae11/cyclus_input_gen
05485033f93227804697f39da61b515249cf9118
[ "BSD-3-Clause" ]
3
2018-10-25T18:31:38.000Z
2019-07-02T16:04:09.000Z
cyclus_input_gen/__init__.py
jbae11/cyclus_input_gen
05485033f93227804697f39da61b515249cf9118
[ "BSD-3-Clause" ]
3
2018-12-13T17:21:40.000Z
2020-04-29T18:22:48.000Z
import cyclus_input_gen
12
23
0.916667
import cyclus_input_gen
true
true
f772b75d3b42f137f17648314aebed7897afc0af
3,796
py
Python
venv/lib/python3.6/site-packages/gunicorn/workers/geventlet.py
tchengatcincoai/cryptocoin-prices-compare
f295fecc7213a877bf717af0eb98414e9137b554
[ "MIT" ]
6
2020-07-08T22:12:38.000Z
2022-02-09T22:43:37.000Z
venv/lib/python3.6/site-packages/gunicorn/workers/geventlet.py
tchengatcincoai/cryptocoin-prices-compare
f295fecc7213a877bf717af0eb98414e9137b554
[ "MIT" ]
7
2020-06-05T18:33:09.000Z
2021-09-20T23:07:52.000Z
venv/lib/python3.6/site-packages/gunicorn/workers/geventlet.py
tchengatcincoai/cryptocoin-prices-compare
f295fecc7213a877bf717af0eb98414e9137b554
[ "MIT" ]
7
2018-10-08T15:11:35.000Z
2018-10-20T12:10:14.000Z
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from functools import partial import errno import sys try: import eventlet except ImportError: raise RuntimeError("You need eventlet installed to use this worker.") # validate the ev...
27.911765
75
0.618019
from functools import partial import errno import sys try: import eventlet except ImportError: raise RuntimeError("You need eventlet installed to use this worker.") if eventlet.version_info < (0, 9, 7): raise RuntimeError("You need eventlet >= 0.9.7") from eventlet import hubs, greenthread from eventle...
false
true
f772b7757da84b18648efd4fa24f6336caf63ee0
24,977
py
Python
main2.py
fab-jul/arxiv_prep
b0186531a6e675d840f36a7ce7fd3cb7dfda0b23
[ "MIT" ]
2
2018-10-24T18:31:31.000Z
2018-11-30T09:53:23.000Z
main2.py
fab-jul/arxiv_prep
b0186531a6e675d840f36a7ce7fd3cb7dfda0b23
[ "MIT" ]
null
null
null
main2.py
fab-jul/arxiv_prep
b0186531a6e675d840f36a7ce7fd3cb7dfda0b23
[ "MIT" ]
null
null
null
""" How this works: - Go through file line by line - if it's a (re)newcommand: save, move on - resolve all (re)newcommands - get a list of all images that are referenced - get a list of all .tex or .sty files that are referenced -> parse these - check for special stuff: bibtex/bibtexstyle Note: i...
41.490033
119
0.609241
import argparse import glob import os import re import shutil import sys from collections import namedtuple from contextlib import contextmanager import subprocess from fjcommon.assertions import assert_exc class IncludeCommand(object): def __init__(self, regex, path_group, possible_extensions=None, needs_parse...
true
true
f772b7ebc4bac9ab39f1d19349648c729df9b452
14,100
py
Python
lib/models/frame_modules/frame_pool.py
CFM-MSG/Code_LEORN
fabea1e1ded973a4db692e51e2df442bde55f626
[ "MIT" ]
1
2022-01-31T03:23:37.000Z
2022-01-31T03:23:37.000Z
lib/models/frame_modules/frame_pool.py
CFM-MSG/Code_LEORN
fabea1e1ded973a4db692e51e2df442bde55f626
[ "MIT" ]
null
null
null
lib/models/frame_modules/frame_pool.py
CFM-MSG/Code_LEORN
fabea1e1ded973a4db692e51e2df442bde55f626
[ "MIT" ]
null
null
null
import torch from torch import nn class FrameAvgPool(nn.Module): def __init__(self, cfg): super(FrameAvgPool, self).__init__() input_size = cfg.INPUT_SIZE # 4096 hidden_size = cfg.HIDDEN_SIZE # 512 kernel_size = cfg.KERNEL_SIZE # 16 stride = cfg.STRIDE self.vis_...
40.869565
118
0.619787
import torch from torch import nn class FrameAvgPool(nn.Module): def __init__(self, cfg): super(FrameAvgPool, self).__init__() input_size = cfg.INPUT_SIZE hidden_size = cfg.HIDDEN_SIZE kernel_size = cfg.KERNEL_SIZE stride = cfg.STRIDE self.vis_conv = nn.Conv1d(i...
true
true
f772b83d9d2eb5eb84660750c52cc5c3accbe04e
2,252
py
Python
ai_flow/test/test_settings.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
ai_flow/test/test_settings.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
ai_flow/test/test_settings.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# # Copyright 2022 The AI Flow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
36.322581
104
0.703819
import os import unittest import ai_flow.settings from ai_flow.settings import get_configuration, get_aiflow_home, get_configuration_file_path class TestSettings(unittest.TestCase): def setUp(self) -> None: self.prev_AIFLOW_HOME = ai_flow.settings.AIFLOW_HOME def tearDown(self) -> None: ai...
true
true
f772b87e0fe012c92fb9baa915857d0c131d43ce
3,500
py
Python
linkedlist/add_two_numbers.py
AnshulPatni/Algorithms
c8bcfb86d50f68041921e5140f01821ac12d9521
[ "MIT" ]
null
null
null
linkedlist/add_two_numbers.py
AnshulPatni/Algorithms
c8bcfb86d50f68041921e5140f01821ac12d9521
[ "MIT" ]
null
null
null
linkedlist/add_two_numbers.py
AnshulPatni/Algorithms
c8bcfb86d50f68041921e5140f01821ac12d9521
[ "MIT" ]
null
null
null
""" You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. In...
26.923077
66
0.568857
import unittest class Node: def __init__(self, x): self.val = x self.next = None def add_two_numbers(left: Node, right: Node )-> Node: head = Node(0) current = head sum = 0 while left or right: print("adding: ", left.val, right.val) sum //= 10 if left: ...
true
true
f772b972a31011a4a366f45658c4a9f28309d20c
2,262
py
Python
api/migrations/0001_initial.py
Siecje/agora-api
d49a95d711005d3a9f31ffd1d697bc9ebc6d96f0
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
Siecje/agora-api
d49a95d711005d3a9f31ffd1d697bc9ebc6d96f0
[ "MIT" ]
2
2015-05-15T16:41:02.000Z
2022-03-08T21:13:57.000Z
api/migrations/0001_initial.py
Siecje/agora-api
d49a95d711005d3a9f31ffd1d697bc9ebc6d96f0
[ "MIT" ]
1
2015-05-29T18:41:53.000Z
2015-05-29T18:41:53.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.auth.models import uuid class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] operations = [ migrations.CreateMo...
30.986301
112
0.509726
from __future__ import unicode_literals from django.db import models, migrations import django.contrib.auth.models import uuid class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] operations = [ migrations.CreateModel( name='C...
true
true
f772b9be42231e582c884386b768e4a05aa3cd39
5,860
py
Python
parcelhubPOS/customers.py
ngcw/parcelhubpos
25404f9e944fd48fc8b19504d3e19e3beaa3e801
[ "MIT" ]
null
null
null
parcelhubPOS/customers.py
ngcw/parcelhubpos
25404f9e944fd48fc8b19504d3e19e3beaa3e801
[ "MIT" ]
null
null
null
parcelhubPOS/customers.py
ngcw/parcelhubpos
25404f9e944fd48fc8b19504d3e19e3beaa3e801
[ "MIT" ]
null
null
null
from django_tables2 import RequestConfig from django.shortcuts import render from django.forms import modelformset_factory from django.views.decorators.csrf import csrf_protect from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from .tables import CustomerTable, Custo...
42.773723
122
0.63413
from django_tables2 import RequestConfig from django.shortcuts import render from django.forms import modelformset_factory from django.views.decorators.csrf import csrf_protect from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from .tables import CustomerTable, Custo...
true
true
f772ba5115aa669d4cbf55f3c2ab243e1abbfca9
2,956
py
Python
django/account/models.py
Leo-Ryu/tweet-generator
d938e2b1d3085d28a23ca567f10e1ce69bc15b8c
[ "MIT" ]
null
null
null
django/account/models.py
Leo-Ryu/tweet-generator
d938e2b1d3085d28a23ca567f10e1ce69bc15b8c
[ "MIT" ]
null
null
null
django/account/models.py
Leo-Ryu/tweet-generator
d938e2b1d3085d28a23ca567f10e1ce69bc15b8c
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager from django.contrib.auth.hashers import make_password from django.utils import timezone from django.utils.translation import gettext_lazy as _ class CustomUserManager(UserManager): use_in_migrations ...
33.590909
109
0.670501
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager from django.contrib.auth.hashers import make_password from django.utils import timezone from django.utils.translation import gettext_lazy as _ class CustomUserManager(UserManager): use_in_migrations ...
true
true
f772bbaa4c27c1f2cc0088983005b0aa22d52015
7,839
py
Python
contrib/bitrpc/bitrpc.py
SkullCash/SkullCash
7d8d87b4a6a24e9768d667b45e31d51e5cea1cd1
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
SkullCash/SkullCash
7d8d87b4a6a24e9768d667b45e31d51e5cea1cd1
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
SkullCash/SkullCash
7d8d87b4a6a24e9768d667b45e31d51e5cea1cd1
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
24.194444
79
0.668453
from jsonrpc import ServiceProxy import sys import string rpcuser = "" rpcpass = "" if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8332") cmd = sys.argv[1].lower() if cmd == "backupwallet": try: path = raw_input("Enter dest...
false
true
f772bcee680410350d5136fd8ae7f55459b13888
35,724
py
Python
electrum_but/but_tx.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
electrum_but/but_tx.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
electrum_but/but_tx.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Butcoin-Electrum - lightweight Butcoin client # Copyright (C) 2018 Butcoin Developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software witho...
37.52521
80
0.540785
import struct from collections import namedtuple from enum import IntEnum from ipaddress import ip_address, IPv6Address from bls_py import bls from .util import bh2u, bfh from .bitcoin import COIN from .crypto import sha256d from .i18n import _ def tx_header_to_tx_type(tx_header_bytes): tx_header = struct.unpac...
true
true
f772be764c2846719f82cd86258266fa6452ec4d
2,041
py
Python
tests/test_png_rw.py
crtrentz/MONAI
355db48e46047a18e3bb9dbd83f424a8ad0a2622
[ "Apache-2.0" ]
null
null
null
tests/test_png_rw.py
crtrentz/MONAI
355db48e46047a18e3bb9dbd83f424a8ad0a2622
[ "Apache-2.0" ]
null
null
null
tests/test_png_rw.py
crtrentz/MONAI
355db48e46047a18e3bb9dbd83f424a8ad0a2622
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
35.189655
88
0.677119
import os import shutil import tempfile import unittest import numpy as np from skimage import io from monai.data import write_png class TestPngWrite(unittest.TestCase): def test_write_gray(self): out_dir = tempfile.mkdtemp() image_name = os.path.join(out_dir, "test.png") img = np.rando...
true
true
f772c314505739e0a9cc2207921e7f561f38c315
4,015
py
Python
sockeye_contrib/sacrebleu/setup.py
hec44/DCGCN
a6e9c610d847295829a67337536769d678419ec2
[ "MIT" ]
75
2019-03-12T04:29:40.000Z
2022-03-19T14:04:04.000Z
sockeye_contrib/sacrebleu/setup.py
hec44/DCGCN
a6e9c610d847295829a67337536769d678419ec2
[ "MIT" ]
23
2019-07-29T05:21:52.000Z
2020-08-31T18:51:42.000Z
sockeye_contrib/sacrebleu/setup.py
hec44/DCGCN
a6e9c610d847295829a67337536769d678419ec2
[ "MIT" ]
51
2019-07-12T05:10:25.000Z
2021-07-28T16:19:06.000Z
#!/usr/bin/env python3 # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or i...
37.877358
268
0.692154
from setuptools import setup import re import os def get_version(): VERSION_RE = re.compile(r'''VERSION\s+=\s+['"]([0-9.]+)['"]''') with open(os.path.join(os.path.dirname(__file__), 'sacrebleu.py'), encoding='utf-8') as fin: return VERSION_RE.search(fin.read()).group(1) setup( name = 'sacrebleu...
true
true