hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0da309cbe4087be8f99284b0e3aa9a56529cdbf0 | 14,306 | py | Python | app/views.py | JeremyLG/submission | 5fb39a002a30b3f290ef99203682fe459b2b2e90 | [
"MIT"
] | null | null | null | app/views.py | JeremyLG/submission | 5fb39a002a30b3f290ef99203682fe459b2b2e90 | [
"MIT"
] | null | null | null | app/views.py | JeremyLG/submission | 5fb39a002a30b3f290ef99203682fe459b2b2e90 | [
"MIT"
] | null | null | null | import os
import flask_security as security
import numpy as np
from sklearn.metrics import accuracy_score
from app import app
from models import Competition
# @login_required
def get_scores(filename, competition_id):
"Returns (preview_score, score)"
regex = r'(\d+),(.+)'
# parse files
# filename ... | 34.977995 | 231 | 0.604781 | import os
import io
from datetime import datetime, timedelta
import uuid
from flask import flash, render_template, request, redirect, url_for, jsonify, send_from_directory, abort
from flask_admin.contrib.sqla import ModelView
from flask_admin.form.upload import FileUploadField
from flask_admin import AdminIndexView
im... | 4 | 6,117 | 0 | 2,559 | 0 | 2,770 | 0 | 297 | 676 |
3d272e9deb2dafc37efa25f42e73420260739be8 | 9,696 | py | Python | test_suite/gatt_server/test_descriptor_instantiation.py | AGlass0fMilk/mbed-os-bluetooth-integration-testsuite | 0fbcfcc84b27ec82505192bf181abb1df024c53c | [
"Apache-2.0"
] | null | null | null | test_suite/gatt_server/test_descriptor_instantiation.py | AGlass0fMilk/mbed-os-bluetooth-integration-testsuite | 0fbcfcc84b27ec82505192bf181abb1df024c53c | [
"Apache-2.0"
] | null | null | null | test_suite/gatt_server/test_descriptor_instantiation.py | AGlass0fMilk/mbed-os-bluetooth-integration-testsuite | 0fbcfcc84b27ec82505192bf181abb1df024c53c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2009-2020 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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 ... | 45.308411 | 119 | 0.707715 | # Copyright (c) 2009-2020 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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 ... | 0 | 8,193 | 0 | 0 | 0 | 0 | 0 | 79 | 91 |
930e25677fea5ad0eade9badb8cdf47a5077dc8c | 312 | py | Python | USACOClassLiveTest/src/sortfile2.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassLiveTest/src/sortfile2.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassLiveTest/src/sortfile2.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | import sys
filename = sys.argv[1]
outfile = sys.argv[2]
lines = open(filename, "r").readlines()
lines = sorted(lines, key = sortByFirstNumber)
ofile = open(outfile, "w")
for num in lines:
ofile.write(str(num))
| 26 | 46 | 0.660256 | import sys
filename = sys.argv[1]
outfile = sys.argv[2]
lines = open(filename, "r").readlines()
def sortByFirstNumber(line):
#print(line.split(" "))
return int((line.split(" "))[0])
lines = sorted(lines, key = sortByFirstNumber)
ofile = open(outfile, "w")
for num in lines:
ofile.write(str(num))
| 0 | 0 | 0 | 0 | 0 | 72 | 0 | 0 | 22 |
e633a0c107f41549f52e2010e6c986439a8fd72d | 1,414 | py | Python | tests/integration_tests/examples/test_example_05.py | zincware/ZnTrack | 7767e133720a75ccb289a5b19d7960584e9dc74f | [
"Apache-2.0"
] | 16 | 2021-12-08T15:35:22.000Z | 2022-03-29T09:43:31.000Z | tests/integration_tests/examples/test_example_05.py | zincware/ZnTrack | 7767e133720a75ccb289a5b19d7960584e9dc74f | [
"Apache-2.0"
] | 108 | 2021-10-20T08:00:57.000Z | 2022-03-30T14:52:30.000Z | tests/integration_tests/examples/test_example_05.py | zincware/ZnTrack | 7767e133720a75ccb289a5b19d7960584e9dc74f | [
"Apache-2.0"
] | 2 | 2021-11-18T07:41:52.000Z | 2022-03-17T15:39:56.000Z | import os
import shutil
import numpy as np
from zntrack import ZnTrackProject
def test_stage_addition(tmp_path):
"""Check that the dvc repro works"""
shutil.copy(__file__, tmp_path)
os.chdir(tmp_path)
project = ZnTrackProject()
project.name = "test01"
project.create_dvc_repository()
Co... | 25.25 | 81 | 0.676803 | import os
import shutil
import numpy as np
from zntrack import Node, ZnTrackProject, zn
class ComputeA(Node):
"""Node stage A"""
inp = zn.params()
out = zn.outs()
def __init__(self, inp=None, **kwargs):
super().__init__(**kwargs)
self.inp = inp
def run(self):
self.out ... | 0 | 0 | 0 | 230 | 0 | 0 | 0 | 10 | 23 |
71539a53e83018e0f6ad81e8e39223cfb8fe96f8 | 237 | py | Python | planning_system/cli/survey/__init__.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | planning_system/cli/survey/__init__.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | planning_system/cli/survey/__init__.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | from planning_system.cli import add_subcommands
add_subcommands(survey, __file__, __package__)
| 13.166667 | 47 | 0.662447 | import click
from planning_system.cli import add_subcommands
@click.group()
@click.pass_obj
def survey(config):
"""
Survey - related commands.
"""
pass
add_subcommands(survey, __file__, __package__)
| 0 | 85 | 0 | 0 | 0 | 0 | 0 | -9 | 60 |
6e4fee9bb134392e79ded54c330867c26c238309 | 1,156 | py | Python | bin/configlookup.py | prabhatpankaj/hipaa-cloudformation | 6eb7d89aa65e619c24e21aad8ca313ba087af73d | [
"Apache-2.0"
] | 6 | 2017-09-19T21:04:21.000Z | 2020-08-11T14:23:56.000Z | bin/configlookup.py | oralhealthsolutions/hipaa-cloudformation | 6eb7d89aa65e619c24e21aad8ca313ba087af73d | [
"Apache-2.0"
] | null | null | null | bin/configlookup.py | oralhealthsolutions/hipaa-cloudformation | 6eb7d89aa65e619c24e21aad8ca313ba087af73d | [
"Apache-2.0"
] | 7 | 2017-09-07T14:57:25.000Z | 2021-01-18T05:29:15.000Z | #!/usr/bin/env python3
"""Get the data at path from the provided file.
Copyright Notice
----------------
Copyright (C) HealthTensor, Inc - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited
Proprietary and confidential
"""
import sys
import yaml
if __name__ == '__main_... | 28.195122 | 74 | 0.660035 | #!/usr/bin/env python3
"""Get the data at path from the provided file.
Copyright Notice
----------------
Copyright (C) HealthTensor, Inc - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited
Proprietary and confidential
"""
import sys
import yaml
def get_data_at_path(dat... | 0 | 0 | 0 | 0 | 0 | 122 | 0 | 0 | 23 |
6945e866d3314d92808225a476de8477575c0780 | 1,071 | py | Python | portal/migrations/0012_auto_20170829_0754.py | nickmvincent/ugc-val-est | b5cceda14ef5830f1befaddfccfd90a694c9677a | [
"MIT"
] | 2 | 2019-11-13T19:56:05.000Z | 2020-09-05T03:21:14.000Z | portal/migrations/0012_auto_20170829_0754.py | nickmvincent/ugc-val-est | b5cceda14ef5830f1befaddfccfd90a694c9677a | [
"MIT"
] | 6 | 2018-03-02T16:49:20.000Z | 2021-06-10T18:55:02.000Z | portal/migrations/0012_auto_20170829_0754.py | nickmvincent/ugc-val-est | b5cceda14ef5830f1befaddfccfd90a694c9677a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-29 07:54
from __future__ import unicode_literals
| 29.75 | 68 | 0.61718 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-29 07:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('portal', '0011_auto_20170827_1347'),
]
operations = [
migrations.AddField(
... | 0 | 0 | 0 | 892 | 0 | 0 | 0 | 19 | 46 |
864a41834c05a3a563b689fa5a5f442dfde58096 | 21,185 | py | Python | monitor_test.py | x2y/monitors | 103bda6ffff7b9d22931b0fdb26a997332a913ec | [
"MIT"
] | null | null | null | monitor_test.py | x2y/monitors | 103bda6ffff7b9d22931b0fdb26a997332a913ec | [
"MIT"
] | null | null | null | monitor_test.py | x2y/monitors | 103bda6ffff7b9d22931b0fdb26a997332a913ec | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 36.400344 | 103 | 0.639131 | import io
import logging
import mock
import mocks
import monitor
import re
import time
import unittest
class MonitorTest(unittest.TestCase):
def setUp(self):
monitor.server.config['TESTING'] = True
self.server = monitor.server.test_client()
mock.patch('threading.Timer', mocks.MockTimer).start()
def ... | 0 | 0 | 0 | 21,010 | 0 | 0 | 0 | -67 | 177 |
55e7c37aed6abf09421b01c500ae01dd47d48c63 | 1,307 | py | Python | scripts/plots.py | mahlettaye/Lidar_3DEM | af0a10afb7a6acd3e7eb601cb2152015458ed52e | [
"MIT"
] | null | null | null | scripts/plots.py | mahlettaye/Lidar_3DEM | af0a10afb7a6acd3e7eb601cb2152015458ed52e | [
"MIT"
] | null | null | null | scripts/plots.py | mahlettaye/Lidar_3DEM | af0a10afb7a6acd3e7eb601cb2152015458ed52e | [
"MIT"
] | null | null | null |
from application_logger import logghandler
logger=logghandler('test','Geo_log')
user_logger= logger.get_logger("DEBUG")
if __name__=="__main__":
plotter_obj= Plotter("IA_FullState.tif","IA_FullState.shp")
#plotter_obj.get_shp_from_tif()
plotter_obj.plot_geometry()
| 25.627451 | 80 | 0.656465 | import geopandas as gpd
import rasterio as rio
from shapely.geometry import box
import matplotlib.pyplot as plt
from descartes import PolygonPatch
from application_logger import logghandler
logger=logghandler('test','Geo_log')
user_logger= logger.get_logger("DEBUG")
class Plotter:
def __init__(self, tif_file_... | 0 | 0 | 0 | 850 | 0 | 0 | 0 | 37 | 133 |
586e58ed2b9ef3d094c9d4de36b28fe5f5ddce53 | 87 | py | Python | custom/_legacy/pathindia/models.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | custom/_legacy/pathindia/models.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/apps/gsid/models.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | # Stub models file
| 17.4 | 42 | 0.793103 | # Stub models file
from dimagi.ext.couchdbkit import Document
class _(Document): pass
| 0 | 0 | 0 | 2 | 0 | 0 | 0 | 21 | 45 |
e5a5597275d39ce78fdb6be76416b1d4168fd72a | 698 | py | Python | lx146.py | ggznmg/spider | 04cc769f35ee14e56f05dd10d8d8ee6cacd574ce | [
"Apache-2.0"
] | null | null | null | lx146.py | ggznmg/spider | 04cc769f35ee14e56f05dd10d8d8ee6cacd574ce | [
"Apache-2.0"
] | null | null | null | lx146.py | ggznmg/spider | 04cc769f35ee14e56f05dd10d8d8ee6cacd574ce | [
"Apache-2.0"
] | null | null | null | import requests
import re
url="http://zyk.bjhd.gov.cn/zwdt/hdyw/"
headers={
'Referer':'http://zyk.bjhd.gov.cn/zwdt/hdyw/',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; LCTE; rv:11.0) like Gecko'
}
response=requests.get(url)
response.encoding='utf-8'
# r=respose.t... | 20.529412 | 105 | 0.633238 | import requests
import re
url="http://zyk.bjhd.gov.cn/zwdt/hdyw/"
headers={
'Referer':'http://zyk.bjhd.gov.cn/zwdt/hdyw/',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; LCTE; rv:11.0) like Gecko'
}
response=requests.get(url)
response.encoding='utf-8'
# r=respose.t... | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fd9f57b8cdcfddec6c8084af72a009610c9cd9a8 | 16,648 | py | Python | nn.py | mkuehn94/Diffusion-Handwriting-Generation-crohme | bc6122d919836de605deb7e687eb131437c12545 | [
"MIT"
] | null | null | null | nn.py | mkuehn94/Diffusion-Handwriting-Generation-crohme | bc6122d919836de605deb7e687eb131437c12545 | [
"MIT"
] | null | null | null | nn.py | mkuehn94/Diffusion-Handwriting-Generation-crohme | bc6122d919836de605deb7e687eb131437c12545 | [
"MIT"
] | null | null | null |
import tensorflow_probability as tfp
tfd = tfp.distributions | 39.079812 | 142 | 0.629865 | import tensorflow as tf
import numpy as np
from tensorflow.keras import Model, Sequential
from tensorflow.keras.applications import MobileNetV2
from tensorflow.keras.layers import (Dense, Conv1D, Embedding, UpSampling1D, AveragePooling1D,
AveragePooling2D, GlobalAveragePooling2D, Activation, LayerNormalization, Dropou... | 0 | 0 | 0 | 11,089 | 0 | 4,544 | 0 | 222 | 732 |
254005315431da0ee3b1ca25b50cc249d812225f | 8,815 | py | Python | psydac/cad/tests/test_geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 5 | 2018-03-13T13:50:26.000Z | 2018-12-22T14:04:11.000Z | psydac/cad/tests/test_geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 3 | 2019-02-08T13:29:47.000Z | 2019-03-06T17:23:08.000Z | psydac/cad/tests/test_geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 1 | 2018-12-15T09:55:12.000Z | 2018-12-15T09:55:12.000Z | # coding: utf-8
#
import os
base_dir = os.path.dirname(os.path.realpath(__file__))
#==============================================================================
#==============================================================================
#=========================================================================... | 31.823105 | 109 | 0.620193 | # coding: utf-8
#
import pytest
import numpy as np
import os
from sympde.topology import Domain, Line, Square, Cube
from psydac.cad.geometry import Geometry, export_nurbs_to_hdf5, refine_nurbs
from psydac.cad.geometry import import_geopdes_to_nurbs
from psydac.cad.cad import e... | 0 | 3,309 | 0 | 0 | 0 | 3,826 | 0 | 414 | 467 |
dbb3e0665d529794a4f2970106af8e672ba5336e | 1,433 | py | Python | exer5/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | null | null | null | exer5/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | null | null | null | exer5/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | 1 | 2020-08-19T20:50:04.000Z | 2020-08-19T20:50:04.000Z | import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
from skimage.feature import local_binary_pattern
#from skimage import io
from sklearn.cross_validation import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
from sklear... | 27.037736 | 112 | 0.64829 | import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
from skimage.feature import local_binary_pattern
#from skimage import io
from sklearn.cross_validation import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
from sklear... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb81f3e5842bc7d92fd8239f9f6a62f0d3d3eefe | 4,331 | py | Python | t5.py | lucasjoao/neural_network_mnist | 67675733ded1c3423e0ef8e60a2e3ccd4ebdbae5 | [
"MIT"
] | null | null | null | t5.py | lucasjoao/neural_network_mnist | 67675733ded1c3423e0ef8e60a2e3ccd4ebdbae5 | [
"MIT"
] | null | null | null | t5.py | lucasjoao/neural_network_mnist | 67675733ded1c3423e0ef8e60a2e3ccd4ebdbae5 | [
"MIT"
] | null | null | null |
# coding: utf-8
# Import dos mdulos necessrios e declarao de constantes
# ---
# In[1]:
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from sklearn import metrics
from sklearn.model_selection import... | 23.160428 | 95 | 0.693373 |
# coding: utf-8
# Import dos módulos necessários e declaração de constantes
# ---
# In[1]:
import numpy as np
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from sklearn import metric... | 34 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 22 |
4a03b9aed73aa4c385bd813a476915476ff90a3f | 240 | py | Python | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import pickle
with open('rce.png', 'rb') as inF:
pickle.load(inF)
| 20 | 64 | 0.7125 | #!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import pickle
with open('rce.png', 'rb') as inF:
pickle.load(inF)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1b6a27b604ef148c8589561199e405f3795a1c0 | 5,833 | py | Python | levels/editor.py | EliasFarhan/GBJam | 156a003378b8db994d4bd1f9c3a12415ceac7c01 | [
"WTFPL"
] | 1 | 2017-01-19T16:25:17.000Z | 2017-01-19T16:25:17.000Z | levels/editor.py | EliasFarhan/GBJam | 156a003378b8db994d4bd1f9c3a12415ceac7c01 | [
"WTFPL"
] | null | null | null | levels/editor.py | EliasFarhan/GBJam | 156a003378b8db994d4bd1f9c3a12415ceac7c01 | [
"WTFPL"
] | null | null | null | '''
Created on Feb 1, 2014
@author: efarhan
'''
| 41.964029 | 168 | 0.60192 | '''
Created on Feb 1, 2014
@author: efarhan
'''
from engine.const import log
from engine.init import engine
from render_engine.input import input_manager
from engine.vector import Vector2
from input.mouse_input import get_mouse, show_mouse
from game_object.game_object_main import GameObject
from game_obje... | 0 | 0 | 0 | 5,420 | 0 | 0 | 0 | 148 | 210 |
6bd0cde7cdc3c55514dd1f42113624660dcc0a44 | 1,168 | py | Python | rainfall.py | dmbb/Rainfall | 32fa74ac7e022e49ffeca8fbfab4e01d5fc694f8 | [
"MIT"
] | 4 | 2017-02-21T07:21:14.000Z | 2020-12-14T19:37:38.000Z | rainfall.py | dmbb/Rainfall | 32fa74ac7e022e49ffeca8fbfab4e01d5fc694f8 | [
"MIT"
] | null | null | null | rainfall.py | dmbb/Rainfall | 32fa74ac7e022e49ffeca8fbfab4e01d5fc694f8 | [
"MIT"
] | 1 | 2021-03-21T20:11:14.000Z | 2021-03-21T20:11:14.000Z | #####################################################
# Copyright (c) 2014 Diogo Barradas #
# #
# See the file LICENSE.txt for copying permission. #
#####################################################
#!/usr/bin/env python
import argparse
import sys... | 31.567568 | 115 | 0.595034 | #####################################################
# Copyright (c) 2014 Diogo Barradas #
# #
# See the file LICENSE.txt for copying permission. #
#####################################################
#!/usr/bin/env python
import argparse
import sys... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
58c5d67cdfdd60f2eb45f59ffc8139cec16fdd1a | 155 | py | Python | execicio110/teste.py | celioroberto06/cursopythonexercicios | 0a3f1b59395720760216b8e98767deb55e26f0d8 | [
"MIT"
] | null | null | null | execicio110/teste.py | celioroberto06/cursopythonexercicios | 0a3f1b59395720760216b8e98767deb55e26f0d8 | [
"MIT"
] | null | null | null | execicio110/teste.py | celioroberto06/cursopythonexercicios | 0a3f1b59395720760216b8e98767deb55e26f0d8 | [
"MIT"
] | null | null | null | from execicio110 import moedas
p = float(input('Digite um preo: R$ '))
#1 preo /2 aumenta / 3 diminui
moedas.resumo(p,10, 20)
| 22.142857 | 40 | 0.729032 | from execicio110 import moedas
from time import sleep
p = float(input('Digite um preço: R$ '))
#1º preço /2º aumenta / 3º diminui
moedas.resumo(p,10, 20)
| 10 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 22 |
c9f7cfe80797d966a6ea7f1a67cdd44579ab330d | 7,177 | py | Python | autopatch/autopatch.py | ioz9/tools | 4331742985ee7692dc902518a882eec7d3d3fa6a | [
"Apache-2.0"
] | 1 | 2015-04-12T08:20:34.000Z | 2015-04-12T08:20:34.000Z | autopatch/autopatch.py | ioz9/tools | 4331742985ee7692dc902518a882eec7d3d3fa6a | [
"Apache-2.0"
] | null | null | null | autopatch/autopatch.py | ioz9/tools | 4331742985ee7692dc902518a882eec7d3d3fa6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Filename: autopatch.py
### File Information ###
"""
Patch the files automatically based on the autopatch.xsd.
Usage: $shell autopatch.py [PATCH_XML]
- PATCH_XML : The patch XML definition. Default to be bringup.xml
"""
__author__ = 'duanqizhi01@baidu.com (duanqz)'
import sys
from c... | 28.145098 | 89 | 0.597325 | #!/usr/bin/python
# Filename: autopatch.py
### File Information ###
"""
Patch the files automatically based on the autopatch.xsd.
Usage: $shell autopatch.py [PATCH_XML]
- PATCH_XML : The patch XML definition. Default to be bringup.xml
"""
__author__ = 'duanqizhi01@baidu.com (duanqz)'
import os.path
i... | 0 | 954 | 0 | 5,276 | 0 | 0 | 0 | 38 | 317 |
25eed37891a6845af72d14173839186ab245eb94 | 7,995 | py | Python | main.py | okinter11/VTuber-Python-Unity | ebfdf729ffb07a1698acd07aa0e2baec0d6bbb02 | [
"MIT"
] | 127 | 2021-07-06T12:13:39.000Z | 2022-03-31T16:32:07.000Z | main.py | okinter11/VTuber-Python-Unity | ebfdf729ffb07a1698acd07aa0e2baec0d6bbb02 | [
"MIT"
] | 10 | 2021-09-07T11:54:15.000Z | 2022-03-30T05:19:19.000Z | main.py | okinter11/VTuber-Python-Unity | ebfdf729ffb07a1698acd07aa0e2baec0d6bbb02 | [
"MIT"
] | 22 | 2021-07-02T08:42:16.000Z | 2022-03-26T05:34:15.000Z | """
Main program to run the detection
"""
from argparse import ArgumentParser
# for TCP connection with unity
# face detection and facial landmark
# pose estimation and stablization
# Miscellaneous detections (eyes/ mouth...)
# global variable
port = 5066 # have to be same as unity
# ini... | 34.461207 | 122 | 0.568105 | """
Main program to run the detection
"""
from argparse import ArgumentParser
import cv2
import mediapipe as mp
import numpy as np
# for TCP connection with unity
import socket
from collections import deque
from platform import system
# face detection and facial landmark
from facial_landmark import Fa... | 0 | 0 | 0 | 0 | 0 | 6,583 | 0 | 74 | 328 |
3d06ac5f448d7472f4b7882a75806dd5c8be38f0 | 9,511 | py | Python | Utilities/ReleaseScripts/data/edmScanValgrind.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Utilities/ReleaseScripts/data/edmScanValgrind.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Utilities/ReleaseScripts/data/edmScanValgrind.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #!/bin/env python
from __future__ import print_function
import sys
fileName = sys.argv[1]
f = open(fileName,'r')
messageToIgnore = [
'edm::FunctorTask'
,'edm::FunctorWaitingTask'
,'edm::ModuleCallingContext::setContext'
,'edm::SerialTaskQueue::'
,'edm::SerialTaskQueueChain::'
,'edm::WaitingTa... | 37.152344 | 190 | 0.631584 | #!/bin/env python
from __future__ import print_function
import sys
fileName = sys.argv[1]
f = open(fileName,'r')
messageToIgnore = [
'edm::FunctorTask'
,'edm::FunctorWaitingTask'
,'edm::ModuleCallingContext::setContext'
,'edm::SerialTaskQueue::'
,'edm::SerialTaskQueueChain::'
,'edm::WaitingTa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d0262a355bd6cad14c82c833f79a8544c909d413 | 552 | py | Python | p001-010/p003.py | roycrippen4/euler | 621582b15e42016e990cbabe0cc5483c9a93d838 | [
"BSD-3-Clause"
] | null | null | null | p001-010/p003.py | roycrippen4/euler | 621582b15e42016e990cbabe0cc5483c9a93d838 | [
"BSD-3-Clause"
] | null | null | null | p001-010/p003.py | roycrippen4/euler | 621582b15e42016e990cbabe0cc5483c9a93d838 | [
"BSD-3-Clause"
] | null | null | null | # P003
# The prime factors of 13_195 are 5, 7, 13, and 29
# What is the largest prime factor of the number 600_851_475_143
if __name__ == "__main__":
main()
| 21.230769 | 64 | 0.637681 | # P003
# The prime factors of 13_195 are 5, 7, 13, and 29
# What is the largest prime factor of the number 600_851_475_143
import math
from sympy import isprime
def main():
prime_divisors = []
divisors = []
n = 600_851_475_143
round_sqrt_n = round(math.sqrt(n))
for num in range(2, round_sqrt_n):
... | 0 | 0 | 0 | 0 | 0 | 327 | 0 | -6 | 67 |
2a2ed4197ca2777688c0e4bc631319e9d1abd045 | 4,257 | py | Python | scripts/build_aln_store.py | wharvey31/project-diploid-assembly | 9c98871d039f1f6921b944eb1ab7f27e982c9b70 | [
"MIT"
] | null | null | null | scripts/build_aln_store.py | wharvey31/project-diploid-assembly | 9c98871d039f1f6921b944eb1ab7f27e982c9b70 | [
"MIT"
] | null | null | null | scripts/build_aln_store.py | wharvey31/project-diploid-assembly | 9c98871d039f1f6921b944eb1ab7f27e982c9b70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
main()
| 27.288462 | 99 | 0.593376 | #!/usr/bin/env python3
import os
import argparse
import pandas as pd
def parse_command_line():
parser = argparse.ArgumentParser()
parser.add_argument(
'--bed-folder',
'-b',
dest='bed_folder',
type=str,
)
parser.add_argument(
'--chrom-sizes',
'-c',
... | 0 | 0 | 0 | 0 | 0 | 3,966 | 0 | -20 | 229 |
7ed5eec8f93a8323a77e35bac2703dc8d3016c8a | 3,405 | py | Python | treeno/functions/common.py | OneRaynyDay/treeno | ce11b8447f471c0b5ea596a211b3855625ec43eb | [
"MIT"
] | 1 | 2021-12-28T19:00:01.000Z | 2021-12-28T19:00:01.000Z | treeno/functions/common.py | OneRaynyDay/treeno | ce11b8447f471c0b5ea596a211b3855625ec43eb | [
"MIT"
] | null | null | null | treeno/functions/common.py | OneRaynyDay/treeno | ce11b8447f471c0b5ea596a211b3855625ec43eb | [
"MIT"
] | null | null | null | """This module contains functions that belong to multiple categories. For example,
concat can be used to concat strings, varbinary, arrays, etc.
"""
from treeno.expression import (OPERATOR_PRECEDENCE)
# TODO: See expressions.py
OPERATOR_PRECEDENCE[Concatenate] = 5
| 32.428571 | 109 | 0.677239 | """This module contains functions that belong to multiple categories. For example,
concat can be used to concat strings, varbinary, arrays, etc.
"""
import functools
from typing import Any, ClassVar, List, Type
import attr
from treeno.base import PrintOptions
from treeno.datatypes import types as type_consts
from tre... | 0 | 1,066 | 0 | 0 | 0 | 1,504 | 0 | 294 | 270 |
e30b02ba61d47d2cec4c4c848069fbd3822cd1cc | 2,142 | py | Python | cryptoline_modules/detect_english.py | lucashowardmiller/cryptoline | 5055320e6eea824314c4a268a6dae5891a928b57 | [
"MIT"
] | null | null | null | cryptoline_modules/detect_english.py | lucashowardmiller/cryptoline | 5055320e6eea824314c4a268a6dae5891a928b57 | [
"MIT"
] | null | null | null | cryptoline_modules/detect_english.py | lucashowardmiller/cryptoline | 5055320e6eea824314c4a268a6dae5891a928b57 | [
"MIT"
] | null | null | null | """Used to classify if certain strings are words or contain words"""
# used to eliminate non whitespace separators
import re
import sqlite3
def load_words():
"""Loads the words document into a set"""
with open('cryptoline_modules/words.txt') as word_file:
valid_words = set(word_file.read().lower().spl... | 28.56 | 93 | 0.678805 | """Used to classify if certain strings are words or contain words"""
# used to eliminate non whitespace separators
import re
import sqlite3
import os
def load_words():
"""Loads the words document into a set"""
with open('cryptoline_modules/words.txt') as word_file:
valid_words = set(word_file.read().l... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
29663ae7eb0b05a1631e3192421e4bc7b5700550 | 408 | py | Python | tests/test_string_enum.py | shaypal5/ezenum | bc8ca1ac31711cd2c50f3cea91adf41fa37f12df | [
"MIT"
] | null | null | null | tests/test_string_enum.py | shaypal5/ezenum | bc8ca1ac31711cd2c50f3cea91adf41fa37f12df | [
"MIT"
] | 1 | 2021-04-20T17:49:27.000Z | 2021-04-20T17:49:27.000Z | tests/test_string_enum.py | shaypal5/ezenum | bc8ca1ac31711cd2c50f3cea91adf41fa37f12df | [
"MIT"
] | null | null | null | """Testing the StringEnum class."""
import ezenum as eze
def test_basic():
"""Just check it out."""
rgb = eze.StringEnum(['Red', 'Green', 'Blue'])
assert rgb.Red == 'Red'
assert rgb.Green == 'Green'
assert rgb.Blue == 'Blue'
assert rgb[0] == 'Red'
assert rgb[1] == 'Green'
assert rgb[2... | 24 | 50 | 0.558824 | """Testing the StringEnum class."""
import ezenum as eze
def test_basic():
"""Just check it out."""
rgb = eze.StringEnum(['Red', 'Green', 'Blue'])
assert rgb.Red == 'Red'
assert rgb.Green == 'Green'
assert rgb.Blue == 'Blue'
assert rgb[0] == 'Red'
assert rgb[1] == 'Green'
assert rgb[2... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5c68246766f68b65727da34436b7ac5adc4aaca4 | 2,055 | py | Python | prometheus_network_exporter/collectors/junos/environment.py | networkmess/prometheus-network-exporter | 4e7febb7e13447fd3612e591fbb2f634f97a5101 | [
"MIT"
] | 11 | 2018-12-13T05:39:24.000Z | 2022-01-07T16:59:59.000Z | prometheus_network_exporter/collectors/junos/environment.py | networkmess/prometheus-network-exporter | 4e7febb7e13447fd3612e591fbb2f634f97a5101 | [
"MIT"
] | 11 | 2018-11-29T20:43:44.000Z | 2020-11-14T22:33:50.000Z | prometheus_network_exporter/collectors/junos/environment.py | networkmess/prometheus-network-exporter | 4e7febb7e13447fd3612e591fbb2f634f97a5101 | [
"MIT"
] | 2 | 2021-09-11T22:28:56.000Z | 2021-09-11T22:43:19.000Z | from __future__ import annotations
from .. import junos
| 36.696429 | 86 | 0.648662 | from __future__ import annotations
import yaml
from importlib.resources import read_text
from ...config.configuration import Metric, MetricConfiguration
from ...config.junos import JunosMetricConfiguration
from ...devices import junosdevice
from .. import junos
from ..base import Collector
from . import base
class ... | 0 | 0 | 0 | 1,719 | 0 | 0 | 0 | 100 | 179 |
15a8bf16998aa59b4b73872ba297f06f49dd87da | 12,011 | py | Python | pydsm/iso226.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/iso226.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | pydsm/iso226.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Sergio Callegari
# All rights reserved.
# This file is part of PyDSM.
# PyDSM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | 31.775132 | 78 | 0.654733 | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Sergio Callegari
# All rights reserved.
# This file is part of PyDSM.
# PyDSM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b293adba8461b5b80e61af8f80c9ef2c5af3db9 | 7,494 | py | Python | core/utils/my_checkpoint.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | core/utils/my_checkpoint.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | core/utils/my_checkpoint.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | import logging
from timm.models.helpers import load_state_dict_from_hf, load_state_dict_from_url, has_hf_hub, adapt_input_conv
_logger = logging.getLogger(__name__)
def load_timm_pretrained(
model,
default_cfg=None,
num_classes=1000,
in_chans=3,
filter_fn=None,
strict=True,
progress=Tr... | 43.569767 | 138 | 0.641446 | import pickle
import os
from detectron2.utils.file_io import PathManager
from detectron2.checkpoint import DetectionCheckpointer
from mmcv.runner.checkpoint import (
_load_checkpoint,
load_state_dict,
_process_mmcls_checkpoint,
)
import math
import logging
from timm.models.helpers import load_state_dict_fro... | 0 | 0 | 0 | 1,781 | 0 | 1,044 | 0 | 122 | 201 |
ae9fdf06b911692a28fc59817fb70bc0ad989b63 | 2,298 | py | Python | src/flake8_aaa/block.py | jamescooke/flake8-aaa | 9df248e10538946531b67da4564bb229a91baece | [
"MIT"
] | 44 | 2018-04-08T21:25:43.000Z | 2022-01-20T14:28:16.000Z | src/flake8_aaa/block.py | jamescooke/flake8-aaa | 9df248e10538946531b67da4564bb229a91baece | [
"MIT"
] | 72 | 2018-03-30T14:30:48.000Z | 2022-03-31T16:18:16.000Z | src/flake8_aaa/block.py | jamescooke/flake8-aaa | 9df248e10538946531b67da4564bb229a91baece | [
"MIT"
] | 1 | 2018-10-17T18:49:25.000Z | 2018-10-17T18:49:25.000Z | from typing import TypeVar
_Block = TypeVar('_Block', bound='Block')
| 31.916667 | 101 | 0.624021 | import ast
from typing import Iterable, List, Tuple, Type, TypeVar
from .exceptions import EmptyBlock
from .helpers import filter_arrange_nodes, get_first_token, get_last_token
from .types import LineType
_Block = TypeVar('_Block', bound='Block')
class Block:
"""
An Arrange, Act or Assert block of code as p... | 0 | 558 | 0 | 1,467 | 0 | 0 | 0 | 90 | 112 |
ab00674cbbd4becd950e2803b6784554d5681bea | 3,068 | py | Python | lib/cros_logging.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | lib/cros_logging.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | lib/cros_logging.py | hustwei/chromite | 10eb79abeb64e859362546214b7e039096ac9830 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Logging module to be used by all scripts.
cros_logging is a wrapper around logging with additional support for NOTICE
level. This is to be used instea... | 31.306122 | 79 | 0.758801 | # Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Logging module to be used by all scripts.
cros_logging is a wrapper around logging with additional support for NOTICE
level. This is to be used instea... | 0 | 0 | 0 | 0 | 0 | 114 | 0 | 7 | 66 |
6e6fbc496d7aa358189b4f491a75b6719ed04b7e | 1,573 | py | Python | miniworld/model/spatial/MovementPattern/ArmaMovementPattern.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 5 | 2019-05-11T14:57:15.000Z | 2021-07-05T00:35:25.000Z | miniworld/model/spatial/MovementPattern/ArmaMovementPattern.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 27 | 2017-03-17T07:11:02.000Z | 2019-05-26T23:36:56.000Z | miniworld/model/spatial/MovementPattern/ArmaMovementPattern.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 6 | 2017-05-03T12:11:33.000Z | 2020-04-03T11:44:27.000Z | # encoding: utf-8
__author__ = "Patrick Lampe"
__email__ = "uni at lampep.de"
| 32.102041 | 92 | 0.664336 | # encoding: utf-8
from time import strptime
__author__ = "Patrick Lampe"
__email__ = "uni at lampep.de"
class ArmaMovementPattern:
def __init__(self, file_path, node_id):
self.file = open(file_path, "r")
self.node_id = node_id
self.crnt_line = ""
self.next_step = self.get_next_s... | 0 | 0 | 0 | 1,442 | 0 | 0 | 0 | 4 | 46 |
a12c2ef3d926b27ff1e739a04da1ac28c810e54e | 3,180 | py | Python | release_history.py | jsb613/isce2 | e80cfb0f29478d810eacdba2ab39afd6a7e76ae7 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-06-24T20:20:19.000Z | 2021-07-23T20:05:39.000Z | release_history.py | m-elhussieny/isce2 | cd66b264e32d6a64496f450677cce5f2b9ff53ab | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-08T05:00:02.000Z | 2021-11-08T05:00:02.000Z | release_history.py | m-elhussieny/isce2 | cd66b264e32d6a64496f450677cce5f2b9ff53ab | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-23T03:10:50.000Z | 2021-11-02T07:15:04.000Z | #!/usr/bin/env python3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright 2013 California Institute of Technology. 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... | 42.972973 | 81 | 0.568239 | #!/usr/bin/env python3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright 2013 California Institute of Technology. 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... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8c89e58483561fd26073630cb81d1ee9743fd737 | 1,451 | py | Python | leo/plugins/writers/basewriter.py | leonidborisenko/leo-editor | db55bd00c94fb8501795284453891ad64ce12af9 | [
"MIT"
] | 2 | 2020-01-19T18:11:05.000Z | 2020-01-19T18:12:07.000Z | leo/plugins/writers/basewriter.py | leonidborisenko/leo-editor | db55bd00c94fb8501795284453891ad64ce12af9 | [
"MIT"
] | 1 | 2020-06-19T02:28:25.000Z | 2020-06-19T02:28:25.000Z | leo/plugins/writers/basewriter.py | leonidborisenko/leo-editor | db55bd00c94fb8501795284453891ad64ce12af9 | [
"MIT"
] | null | null | null | #@+leo-ver=5-thin
#@+node:ekr.20140726091031.18143: * @file writers/basewriter.py
'''A module defining the base class for all writers in leo.plugins.writers.'''
#@@language python
#@@tabwidth -4
#@-leo
| 32.977273 | 78 | 0.566506 | #@+leo-ver=5-thin
#@+node:ekr.20140726091031.18143: * @file writers/basewriter.py
'''A module defining the base class for all writers in leo.plugins.writers.'''
class BaseWriter:
'''The base writer class for all writers in leo.plugins.writers.'''
def __init__(self, c):
'''Ctor for leo.plugins.writers.... | 0 | 0 | 0 | 1,225 | 0 | 0 | 0 | 0 | 23 |
3dbb6450f63e11638e2effc758cd31a3a69278a7 | 13,260 | py | Python | build/lib/gdalTools/shpTools.py | SonwYang/gdaltools | be6d2f516b849db61bb6b9723f7bf314be82d245 | [
"BSD-3-Clause"
] | 1 | 2021-01-08T07:44:36.000Z | 2021-01-08T07:44:36.000Z | build/lib/gdalTools/shpTools.py | SonwYang/gdaltools | be6d2f516b849db61bb6b9723f7bf314be82d245 | [
"BSD-3-Clause"
] | null | null | null | build/lib/gdalTools/shpTools.py | SonwYang/gdaltools | be6d2f516b849db61bb6b9723f7bf314be82d245 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from osgeo import ogr, gdal
import os
import geopandas as pd
from geopandas._vectorized import simplify
import rasterio
from rasterstats import zonal_stats
import time
import shutil
def intersection(ShpA, ShpB, fname):
"""
This function is used to get the intersection between shapefil... | 32.579853 | 90 | 0.674284 | from pathlib import Path
from osgeo import ogr, gdal
import os
import geopandas as pd
from geopandas._vectorized import simplify
import rasterio
from rasterstats import zonal_stats
import time
import shutil
def mkdir(path):
if not os.path.exists(path):
os.mkdir(path)
def intersection(ShpA, ShpB, fname):
... | 507 | 0 | 0 | 0 | 0 | 303 | 0 | 0 | 46 |
4aabd231f2ef369e5d952b86c7d929307270e2e5 | 2,235 | py | Python | minifold/lexical_cast.py | vishalbelsare/minifold | f1d90999cef46715a556f93dbead6ed987c4fdd0 | [
"BSD-3-Clause"
] | null | null | null | minifold/lexical_cast.py | vishalbelsare/minifold | f1d90999cef46715a556f93dbead6ed987c4fdd0 | [
"BSD-3-Clause"
] | null | null | null | minifold/lexical_cast.py | vishalbelsare/minifold | f1d90999cef46715a556f93dbead6ed987c4fdd0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of the minifold project.
# https://github.com/nokia/minifold
__author__ = "Marc-Olivier Buob"
__maintainer__ = "Marc-Olivier Buob"
__email__ = "marc-olivier.buob@nokia-bell-labs.com"
__copyright__ = "Copyright (C) 2018, Nokia"
__license__ ... | 27.256098 | 77 | 0.600447 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of the minifold project.
# https://github.com/nokia/minifold
__author__ = "Marc-Olivier Buob"
__maintainer__ = "Marc-Olivier Buob"
__email__ = "marc-olivier.buob@nokia-bell-labs.com"
__copyright__ = "Copyright (C) 2018, Nokia"
__license__ ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c54261b3b5080ad949589ce650a9b16e6053195b | 13,935 | py | Python | Streamlit/streamlit_app/tabs/modelisation.py | Nathaliegar/Soutenance_Co2Py | b7bb75e7c3fc9832d2a06ab641628333681fdf3b | [
"MIT"
] | null | null | null | Streamlit/streamlit_app/tabs/modelisation.py | Nathaliegar/Soutenance_Co2Py | b7bb75e7c3fc9832d2a06ab641628333681fdf3b | [
"MIT"
] | null | null | null | Streamlit/streamlit_app/tabs/modelisation.py | Nathaliegar/Soutenance_Co2Py | b7bb75e7c3fc9832d2a06ab641628333681fdf3b | [
"MIT"
] | null | null | null |
#Pour la modlisation
#Pour les graphs
#Pour l'interprtabilit'
import shap
shap.initjs()
from skater.core.explanations import Interpretation
interpreter = Interpretation()
title = "Modlisation"
sidebar_name = "Modlisation"
| 44.378981 | 237 | 0.663007 | import streamlit as st
import pandas as pd
import numpy as np
#Pour la modélisation
from sklearn import preprocessing
from sklearn.preprocessing import PolynomialFeatures
from sklearn.model_selection import train_test_split , cross_val_score, GridSearchCV
from sklearn.metrics import mean_squared_error, f1_score
from s... | 146 | 2,150 | 0 | 0 | 0 | 10,290 | 0 | 492 | 699 |
b146eedb6f8380d0425c73cc8cbf145fb5a3cdfc | 2,394 | py | Python | PythonWeb/apps/twitter/views.py | amdone/DjangoWebs | 4f0d0b3c431bc5fe06efd4126f86fefadb4b82e8 | [
"MIT"
] | null | null | null | PythonWeb/apps/twitter/views.py | amdone/DjangoWebs | 4f0d0b3c431bc5fe06efd4126f86fefadb4b82e8 | [
"MIT"
] | null | null | null | PythonWeb/apps/twitter/views.py | amdone/DjangoWebs | 4f0d0b3c431bc5fe06efd4126f86fefadb4b82e8 | [
"MIT"
] | null | null | null |
# Create your views here.
| 34.695652 | 105 | 0.555973 | from django.core.paginator import Paginator, PageNotAnInteger, InvalidPage, EmptyPage
from django.http import HttpResponse
from django.shortcuts import render
from .models import Tweets
def format_set(query_set_list: list):
res = []
for i in query_set_list:
imgList = []
imgLink = i['... | 282 | 0 | 0 | 0 | 0 | 2,029 | 0 | 98 | 140 |
23b7fd1b0e04345dd96e62d3da7795665a691ee4 | 212 | py | Python | spook/__init__.py | congzlwag/spook | 0c728086b811ce829c6226e0a9a10a350772ec15 | [
"MIT"
] | null | null | null | spook/__init__.py | congzlwag/spook | 0c728086b811ce829c6226e0a9a10a350772ec15 | [
"MIT"
] | null | null | null | spook/__init__.py | congzlwag/spook | 0c728086b811ce829c6226e0a9a10a350772ec15 | [
"MIT"
] | null | null | null | import spook.utils as utils
# from spook.vmi_special import PhotonFreqResVMI | 42.4 | 60 | 0.867925 | from spook.base import SpookBase
from spook.lin_solve import SpookLinSolve
from spook.quad_program import SpookPosL1,SpookPosL2,SpookL1
import spook.utils as utils
# from spook.vmi_special import PhotonFreqResVMI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 66 |
0798b31c88e7f9bf041ba937e35673c0f5ecc853 | 2,656 | py | Python | ats/utils/training.py | Billmvp73/attention-sampling | 6ac4ef44a438a1ab25ce97f18a185c87defbcdff | [
"MIT"
] | null | null | null | ats/utils/training.py | Billmvp73/attention-sampling | 6ac4ef44a438a1ab25ce97f18a185c87defbcdff | [
"MIT"
] | null | null | null | ats/utils/training.py | Billmvp73/attention-sampling | 6ac4ef44a438a1ab25ce97f18a185c87defbcdff | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>
#
"""Provide utilities for training attention sampling models."""
def compose_sequences(sequence, sequences):
"""Compose a sequence with other sequences.
Example
... | 27.102041 | 71 | 0.628765 | #
# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>
#
"""Provide utilities for training attention sampling models."""
from keras.utils import Sequence
import numpy as np
class Batcher(Sequence):
"""Assemble a sequence of thing... | 0 | 0 | 0 | 1,978 | 0 | 0 | 0 | 8 | 114 |
7b6b1c7be2f51131165b0ed60e58453d6cc45903 | 7,008 | py | Python | corehq/apps/hqwebapp/doc_info.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/hqwebapp/doc_info.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | corehq/apps/hqwebapp/doc_info.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | from dimagi.utils.couch.undo import DELETED_SUFFIX
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from corehq.apps.users.util import raw_username
from couchforms import models as couchforms_models
def get_doc_info(doc, domain_hint=None, cache=None):
"""
cache... | 31.567568 | 88 | 0.574344 | from couchdbkit import ResourceNotFound
from dimagi.utils.couch.database import get_db
from dimagi.utils.couch.undo import DELETED_SUFFIX
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from dimagi.ext.jsonobject import *
from corehq.apps.users.models import CouchUser
fro... | 0 | 0 | 0 | 220 | 0 | 703 | 0 | 82 | 161 |
28dd64b289a88e2166f07232710c9bc27237aad3 | 2,262 | py | Python | main.py | Rerumu/LidaPy | d79961f14027b661973e56a9531b2bc3d33b1ff0 | [
"MIT"
] | null | null | null | main.py | Rerumu/LidaPy | d79961f14027b661973e56a9531b2bc3d33b1ff0 | [
"MIT"
] | 1 | 2020-09-30T01:39:51.000Z | 2020-09-30T01:39:51.000Z | main.py | Rerumu/LidaPy | d79961f14027b661973e56a9531b2bc3d33b1ff0 | [
"MIT"
] | 2 | 2021-02-12T02:30:06.000Z | 2021-03-16T09:55:01.000Z | import argparse
import sys
# import assemble
import disassemble
import sutil
parser = argparse.ArgumentParser(
description='The Lida assembler service for Lua',
allow_abbrev=True
)
# Argument groups
action = parser.add_mutually_exclusive_group()
g_assembler = parser.add_argument_group('assembler')
g_disassembler... | 19.669565 | 76 | 0.736958 | import argparse
import sys
# import assemble
import disassemble
import sutil
def get_out_file(args):
if args.echo:
file = sys.stdout
else:
file = open(args.output, 'w', encoding=sutil.ASCII_ISO)
return file
parser = argparse.ArgumentParser(
description='The Lida assembler service for Lua',
allow_abbrev=T... | 0 | 0 | 0 | 0 | 0 | 116 | 0 | 0 | 23 |
ce4840ef1aa070d0377eaf7e281486f7b7b9f47d | 2,844 | py | Python | src/python/pants/backend/go/util_rules/go_mod_test.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 1,806 | 2015-01-05T07:31:00.000Z | 2022-03-31T11:35:41.000Z | src/python/pants/backend/go/util_rules/go_mod_test.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 9,565 | 2015-01-02T19:01:59.000Z | 2022-03-31T23:25:16.000Z | src/python/pants/backend/go/util_rules/go_mod_test.py | ryanking/pants | e45b00d2eb467b599966bca262405a5d74d27bdd | [
"Apache-2.0"
] | 443 | 2015-01-06T20:17:57.000Z | 2022-03-31T05:28:17.000Z | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
| 33.069767 | 93 | 0.64135 | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from textwrap import dedent
import pytest
from pants.backend.go.target_types import GoModTarget, GoPackageTarget
from pants.backend.go.util_rules impo... | 0 | 387 | 0 | 0 | 0 | 1,784 | 0 | 255 | 248 |
1366c1d9d338a529c1621edbc98e0532b78730e4 | 972 | py | Python | TreeB_CSF.py | rexhinokovaci/BellmanF_CSF.py | c72d7c9e52cd404a4f744d06c9016ec823f11fe6 | [
"MIT"
] | 2 | 2021-01-12T12:22:27.000Z | 2021-01-13T20:09:13.000Z | TreeB_CSF.py | rexhinokovaci/BellmanF_CSF.py | c72d7c9e52cd404a4f744d06c9016ec823f11fe6 | [
"MIT"
] | null | null | null | TreeB_CSF.py | rexhinokovaci/BellmanF_CSF.py | c72d7c9e52cd404a4f744d06c9016ec823f11fe6 | [
"MIT"
] | null | null | null | # @Rexhino_Kovaci
# This is an extra exercises that I challenged myself with on Google Kickstart 2020 during the online sessions
# This algorithm takes user input and compare the left and right subtree
# this would allow us to maintain a sorted list of numbers
# this program would check if the tree is balanced between ... | 28.588235 | 120 | 0.701646 | # @Rexhino_Kovaci
# This is an extra exercises that I challenged myself with on Google Kickstart 2020 during the online sessions
# This algorithm takes user input and compare the left and right subtree
# this would allow us to maintain a sorted list of numbers
# this program would check if the tree is balanced between ... | 0 | 0 | 0 | 454 | 0 | 0 | 0 | 0 | 23 |
135b868ea0bfb16b0555bf0e394f8a225316b903 | 20,046 | py | Python | test/nonregression/pipelines/test_run_pipelines_anat.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | test/nonregression/pipelines/test_run_pipelines_anat.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | test/nonregression/pipelines/test_run_pipelines_anat.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | # coding: utf8
"""
This file contains a set of functional tests designed to check the correct execution of the pipeline and the
different functions available in Clinica
"""
import warnings
# Determine location for working_directory
warnings.filterwarnings("ignore")
| 33.465776 | 112 | 0.635738 | # coding: utf8
"""
This file contains a set of functional tests designed to check the correct execution of the pipeline and the
different functions available in Clinica
"""
import warnings
from os import pardir
from test.nonregression.testing_tools import *
# Determine location for working_directory
warnings.filterw... | 0 | 0 | 0 | 0 | 0 | 19,492 | 0 | 25 | 251 |
8bcbffde5bd73f29faa9539d20bde6019261b14b | 581 | py | Python | data/NC-2016/filter.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | 1 | 2020-12-29T14:44:00.000Z | 2020-12-29T14:44:00.000Z | data/NC-2016/filter.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | null | null | null | data/NC-2016/filter.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | null | null | null | base_path_source = './'
base_path_target = '../NC2016/'
files = ['concatenated_en2de_dev_de.txt', 'concatenated_en2de_dev_en.txt', 'concatenated_en2de_test_de.txt', 'concatenated_en2de_test_en.txt', 'concatenated_en2de_train_de.txt', 'concatenated_en2de_train_en.txt']
for file_path in files:
source_path = base_pa... | 38.733333 | 212 | 0.707401 | base_path_source = './'
base_path_target = '../NC2016/'
files = ['concatenated_en2de_dev_de.txt', 'concatenated_en2de_dev_en.txt', 'concatenated_en2de_test_de.txt', 'concatenated_en2de_test_en.txt', 'concatenated_en2de_train_de.txt', 'concatenated_en2de_train_en.txt']
for file_path in files:
source_path = base_pa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
45acab94c6ac7c4ea6bde1821b79581a2b0634d6 | 3,123 | py | Python | tools/puint.py | CyberFlameGO/dragonfly | 4d106476132f94661554779e8c13851f050b4a8f | [
"ECL-2.0",
"Apache-2.0"
] | 58 | 2015-01-09T16:32:43.000Z | 2021-11-25T04:38:18.000Z | tools/puint.py | CyberFlameGO/dragonfly | 4d106476132f94661554779e8c13851f050b4a8f | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2015-01-23T22:10:00.000Z | 2018-04-30T18:55:21.000Z | tools/puint.py | CyberFlameGO/dragonfly | 4d106476132f94661554779e8c13851f050b4a8f | [
"ECL-2.0",
"Apache-2.0"
] | 24 | 2015-01-22T15:10:51.000Z | 2021-10-31T21:45:06.000Z | import sys
if __name__ == "__main__":
sys.exit(main()) | 33.580645 | 82 | 0.524496 | import sys
import os
import re
class Method(object):
def __init__(self, line, line_nr, name, args):
self.line = line;
self.line_nr = line_nr
self.name = name
self.args = args
self.re = re.compile("\. *" + name + "(?: |\()")
self.matches = {}
def check_f... | 0 | 0 | 0 | 248 | 0 | 2,683 | 0 | -24 | 146 |
f20ca9e84b4a3ae27ae115aa2683029387bd45b7 | 6,412 | py | Python | examples/IF_squarespike_model.py | yuanz271/PyDSTool | 886c143cdd192aea204285f3a1cb4968c763c646 | [
"Python-2.0",
"OLDAP-2.7"
] | 2 | 2021-02-04T15:01:31.000Z | 2021-02-25T16:08:43.000Z | examples/IF_squarespike_model.py | yuanz271/PyDSTool | 886c143cdd192aea204285f3a1cb4968c763c646 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | examples/IF_squarespike_model.py | yuanz271/PyDSTool | 886c143cdd192aea204285f3a1cb4968c763c646 | [
"Python-2.0",
"OLDAP-2.7"
] | 1 | 2021-02-25T14:43:36.000Z | 2021-02-25T14:43:36.000Z | """Library function to build Integrate and fire model with square-pulse
spike, as a hybrid system.
Robert Clewley, March 2005.
"""
from __future__ import print_function
from time import clock
# ----------------------------------------------------------------
# --------------------------------------------------... | 38.626506 | 83 | 0.5602 | """Library function to build Integrate and fire model with square-pulse
spike, as a hybrid system.
Robert Clewley, March 2005.
"""
from __future__ import print_function
from PyDSTool import *
from time import clock
# ----------------------------------------------------------------
def makeLinearLeak(name, rhs, p... | 0 | 0 | 0 | 0 | 0 | 3,203 | 0 | 1 | 92 |
86403aa3c988c83bc17e105a08619ac96bc6e4ee | 643 | py | Python | run-hello.py | fugrammer/web | 9c9b7b471c9ca5d96359e510698ff1aee43f4a45 | [
"BSD-3-Clause"
] | 111 | 2017-03-08T20:42:29.000Z | 2021-11-10T13:46:55.000Z | run-hello.py | Mozhuowen/projectJ-eveserver | a1373adab15d1860b179b590f9e2cbc54ef66b56 | [
"BSD-3-Clause"
] | 6 | 2015-01-21T00:26:46.000Z | 2016-10-18T09:01:21.000Z | run-hello.py | Mozhuowen/projectJ-eveserver | a1373adab15d1860b179b590f9e2cbc54ef66b56 | [
"BSD-3-Clause"
] | 44 | 2015-01-06T19:47:38.000Z | 2017-02-08T10:35:55.000Z | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | 22.172414 | 77 | 0.662519 | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | 0 | 44 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
6b258876bbf15fb230b2b968730ab3869fdbb84e | 1,218 | py | Python | invenio_previewer/extensions/ipynb.py | invenio-toaster/invenio-previewer | ac360d02a6628c8ed12983f8717bc229f6122acd | [
"MIT"
] | null | null | null | invenio_previewer/extensions/ipynb.py | invenio-toaster/invenio-previewer | ac360d02a6628c8ed12983f8717bc229f6122acd | [
"MIT"
] | null | null | null | invenio_previewer/extensions/ipynb.py | invenio-toaster/invenio-previewer | ac360d02a6628c8ed12983f8717bc229f6122acd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Jupyter Notebook previewer."""
from __future__ import absolute_import, unicode_li... | 26.478261 | 72 | 0.700328 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Jupyter Notebook previewer."""
from __future__ import absolute_import, unicode_li... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9fb28ef7f0643a45eab2e9013af6363d19b93f18 | 2,726 | py | Python | aprox2curves.py | anatolek/deviation_of_two_curves | 4dd4cfa857f9e171ff7b4bf8d73c072c94a13c5b | [
"Unlicense"
] | null | null | null | aprox2curves.py | anatolek/deviation_of_two_curves | 4dd4cfa857f9e171ff7b4bf8d73c072c94a13c5b | [
"Unlicense"
] | null | null | null | aprox2curves.py | anatolek/deviation_of_two_curves | 4dd4cfa857f9e171ff7b4bf8d73c072c94a13c5b | [
"Unlicense"
] | null | null | null | #! /usr/bin/python3
import math
from scipy.interpolate import interp1d
N = 100 # number of points of approximation
f1 = 'data/exp/M186/p_p0.txt' # data for curve 1
f2 = 'data/theory/M186/upper.xy' # data for curve 2
# x must be first column
n1 = 2 # column for curve 1
n2 = 2 # ... | 24.339286 | 81 | 0.581071 | #! /usr/bin/python3
import os
import math
from scipy.interpolate import interp1d
N = 100 # number of points of approximation
f1 = 'data/exp/M186/p_p0.txt' # data for curve №1
f2 = 'data/theory/M186/upper.xy' # data for curve №2
# x must be first column
n1 = 2 # column for curve №1
n2 = 2 ... | 24 | 0 | 0 | 0 | 0 | 317 | 0 | -12 | 44 |
86be99db038dd6e54c728f34202efc8d98832449 | 9,220 | py | Python | neutron/tests/unit/db/test_sqlalchemytypes.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | 1 | 2017-09-10T09:57:35.000Z | 2017-09-10T09:57:35.000Z | neutron/tests/unit/db/test_sqlalchemytypes.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/db/test_sqlalchemytypes.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | 1 | 2015-05-05T14:41:11.000Z | 2015-05-05T14:41:11.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 35.736434 | 78 | 0.602061 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 0 | 1,234 | 0 | 6,994 | 0 | 0 | 0 | 55 | 360 |
7c07e9134efdcce4d764171c5610533cbd249049 | 564 | py | Python | tests/utils/test_cloud_resources.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 111 | 2015-01-15T11:53:20.000Z | 2022-03-26T19:55:24.000Z | tests/utils/test_cloud_resources.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 2,995 | 2015-01-15T16:14:20.000Z | 2022-03-31T13:36:32.000Z | tests/utils/test_cloud_resources.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 55 | 2015-05-31T19:09:49.000Z | 2021-11-01T10:50:31.000Z | # coding=UTF-8
from scout.server.app import create_app
from scout.server.extensions import cloud_tracks
def test_align_handler_public_tracks(igv_test_tracks):
"""Test The class creating cloud tracks with public tracks"""
# GIVEN app config settings with a custom cloud public track
config = dict(CLOUD_IGV_... | 37.6 | 77 | 0.765957 | # coding=UTF-8
from scout.server.app import create_app
from scout.server.extensions import cloud_tracks
def test_align_handler_public_tracks(igv_test_tracks):
"""Test The class creating cloud tracks with public tracks"""
# GIVEN app config settings with a custom cloud public track
config = dict(CLOUD_IGV_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4a820335cb1cee43286536ce75a8d4532f3aead8 | 2,782 | py | Python | Src/Tests/interop/net/event/__init__.py | Enerccio/ironpython26-fixed | e302db14f05396a378adb438565a829e66acbf94 | [
"MS-PL"
] | 1 | 2020-02-11T06:02:40.000Z | 2020-02-11T06:02:40.000Z | Src/Languages/IronPython/Tests/interop/net/event/__init__.py | rudimk/dlr-dotnet | 71d11769f99d6ff1516ddbaed091a359eb46c670 | [
"MS-PL"
] | null | null | null | Src/Languages/IronPython/Tests/interop/net/event/__init__.py | rudimk/dlr-dotnet | 71d11769f99d6ff1516ddbaed091a359eb46c670 | [
"MS-PL"
] | 1 | 2018-11-21T04:10:23.000Z | 2018-11-21T04:10:23.000Z | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Microsoft Public License. A
# copy of the license can be found in the License.html file at the root of this ... | 39.183099 | 96 | 0.67757 | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Microsoft Public License. A
# copy of the license can be found in the License.html file at the root of this ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
82fd228339d4a021f0e47b6068c2d738752deef9 | 2,124 | py | Python | ProjectApplication/project_core/migrations/0035_added_funding_instrument_model.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-07-29T10:00:11.000Z | 2022-02-19T11:00:34.000Z | ProjectApplication/project_core/migrations/0035_added_funding_instrument_model.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 471 | 2019-09-20T14:37:28.000Z | 2022-03-25T14:16:34.000Z | ProjectApplication/project_core/migrations/0035_added_funding_instrument_model.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-03-15T12:42:47.000Z | 2022-02-15T18:06:52.000Z | # Generated by Django 2.2.6 on 2019-10-21 11:10
import django.db.models.deletion
| 59 | 221 | 0.698682 | # Generated by Django 2.2.6 on 2019-10-21 11:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 0 | 0 | 0 | 1,915 | 0 | 0 | 0 | 37 | 90 |
c81063d818ec46e3fcfffbb178daf0e250d2b664 | 677 | py | Python | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_iot/utils.py | piyushka17/azure-intelligent-edge-patterns | 0d088899afb0022daa2ac434226824dba2c997c1 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_iot/utils.py | piyushka17/azure-intelligent-edge-patterns | 0d088899afb0022daa2ac434226824dba2c997c1 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_iot/utils.py | piyushka17/azure-intelligent-edge-patterns | 0d088899afb0022daa2ac434226824dba2c997c1 | [
"MIT"
] | null | null | null | """Utilities
Azure IoT Edge utilities.
functions:
is_edge: depends is edge or not
inference_module_url: get inference_module_url
"""
import logging
from azure.iot.device import IoTHubModuleClient
logger = logging.getLogger(__name__)
def is_edge() -> bool:
"""is_edge.
Args:
Returns:
... | 15.386364 | 57 | 0.644018 | """Utilities
Azure IoT Edge utilities.
functions:
is_edge: depends is edge or not
inference_module_url: get inference_module_url
"""
import logging
from azure.iot.device import IoTHubModuleClient
logger = logging.getLogger(__name__)
def is_edge() -> bool:
"""is_edge.
Args:
Returns:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b2147e60804222cb841f66baf9ab9fb092a4e25b | 906 | py | Python | src/the_tale/the_tale/accounts/management/commands/accounts_thin_out_users_for_development_environment.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/accounts/management/commands/accounts_thin_out_users_for_development_environment.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/accounts/management/commands/accounts_thin_out_users_for_development_environment.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
| 31.241379 | 149 | 0.60596 |
import smart_imports
smart_imports.all()
class Command(utilities_base.Command):
help = 'Remove most of users from database, reatain only specified amount + all clan, forumm, folclor users. Also actualize their active states.'
LOCKS = ['game_commands', 'portal_commands']
GAME_MUST_BE_STOPPED = True
... | 0 | 0 | 0 | 839 | 0 | 0 | 0 | 0 | 23 |
33a9e72f8985e03f8c429ef368e978fcd30f7a62 | 12,669 | py | Python | autoio/chemkin_io/writer/old_reaction.py | mobergd/autoio | f3b84478c28d1dac79883c8ddfc9085497ffeebe | [
"Apache-2.0"
] | null | null | null | autoio/chemkin_io/writer/old_reaction.py | mobergd/autoio | f3b84478c28d1dac79883c8ddfc9085497ffeebe | [
"Apache-2.0"
] | null | null | null | autoio/chemkin_io/writer/old_reaction.py | mobergd/autoio | f3b84478c28d1dac79883c8ddfc9085497ffeebe | [
"Apache-2.0"
] | null | null | null | """
Writes strings containing the rate parameters
"""
# Functions to write the parameters in the correct format
def troe(reaction, high_params, low_params, troe_params, colliders=(), ea_units='kcal/mol'):
""" Write the string containing the Lindemann fitting parameters
formatted for ChemKin input files.
... | 37.371681 | 113 | 0.641171 | """
Writes strings containing the rate parameters
"""
# Functions to write the parameters in the correct format
def troe(reaction, high_params, low_params, troe_params, colliders=(), ea_units='kcal/mol'):
""" Write the string containing the Lindemann fitting parameters
formatted for ChemKin input files.
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d668700ebf877b656974f31783b482f21fda128a | 3,648 | py | Python | CardCut.py | iCalculated/ReinforcementLearningLearning | 1d12fee1628b02ae874cdc8bd90b010292054229 | [
"MIT"
] | null | null | null | CardCut.py | iCalculated/ReinforcementLearningLearning | 1d12fee1628b02ae874cdc8bd90b010292054229 | [
"MIT"
] | null | null | null | CardCut.py | iCalculated/ReinforcementLearningLearning | 1d12fee1628b02ae874cdc8bd90b010292054229 | [
"MIT"
] | null | null | null | """
Human
Search ideal tag
Is rep? Is sense?
tag simplification
"lizard in control of US gov" "democratics win midterms" "borders cause violence"
Find
Keywords
Yank
.txt
Reliability Assessment
Number of articles
Qualification
Compare? (John Baudrillard)
"""
import sys
import newsp... | 29.184 | 101 | 0.614035 | """
Human
Search ideal tag
Is rep? Is sense?
tag simplification
"lizard in control of US gov" "democratics win midterms" "borders cause violence"
Find
Keywords
Yank
.txt
Reliability Assessment
Number of articles
Qualification
Compare? (John Baudrillard)
"""
import sys
import urlli... | 0 | 0 | 0 | 2,304 | 0 | 533 | 0 | 24 | 269 |
afda515367e13e739e10a1655eaa3adc46e02614 | 1,416 | py | Python | reagent/evaluation/seq2reward_evaluator.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | reagent/evaluation/seq2reward_evaluator.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | reagent/evaluation/seq2reward_evaluator.py | alexnikulkov/ReAgent | e404c5772ea4118105c2eb136ca96ad5ca8e01db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
logger = logging.getLogger(__name__)
| 32.930233 | 84 | 0.649011 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
import torch
from reagent.core.types import PreprocessedTrainingBatch
from reagent.training.world_model.seq2reward_trainer import Seq2RewardTrainer
logger = logging.getLogger(__name__)
class Seq2RewardEval... | 0 | 877 | 0 | 217 | 0 | 0 | 0 | 82 | 90 |
220263c92d2bb0c83ac7e9f888d3b5741b01f009 | 488 | py | Python | pythonscript.py | HarleyEDU/pythoneduwork | 6c5a28217c96fac394cb7ad0fb8d186b5080f1de | [
"bzip2-1.0.6"
] | null | null | null | pythonscript.py | HarleyEDU/pythoneduwork | 6c5a28217c96fac394cb7ad0fb8d186b5080f1de | [
"bzip2-1.0.6"
] | null | null | null | pythonscript.py | HarleyEDU/pythoneduwork | 6c5a28217c96fac394cb7ad0fb8d186b5080f1de | [
"bzip2-1.0.6"
] | null | null | null | #Notebook Problem
print("Save your notes here, just type what you want to store.")
note1 = input("NOTE 1: ")
note2 = input("NOTE 2: ")
note3 = input("NOTE 3: ")
note4 = input("NOTE 4: ")
note5 = input("NOTE 5: ")
note6 = input("NOTE 6: ")
note7 = input("NOTE 7: ")
note8 = input("NOTE 8: ")
note9 = input("... | 23.238095 | 80 | 0.620902 | #Notebook Problem
import random
import time
print("Save your notes here, just type what you want to store.")
note1 = input("NOTE 1: ")
note2 = input("NOTE 2: ")
note3 = input("NOTE 3: ")
note4 = input("NOTE 4: ")
note5 = input("NOTE 5: ")
note6 = input("NOTE 6: ")
note7 = input("NOTE 7: ")
note8 = input(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -18 | 46 |
3498be49da96705e371325b6ded30179ba3f8649 | 1,861 | py | Python | bot.py | joslcarp/discord-bot | aab40c434051ee3f38a99ab164304f3f2b34c497 | [
"MIT"
] | null | null | null | bot.py | joslcarp/discord-bot | aab40c434051ee3f38a99ab164304f3f2b34c497 | [
"MIT"
] | null | null | null | bot.py | joslcarp/discord-bot | aab40c434051ee3f38a99ab164304f3f2b34c497 | [
"MIT"
] | null | null | null | from discord.ext import commands
import secrets
bot = commands.Bot(command_prefix='?')
# Retrieve query results from Wolfram Short Answer API
# Search Python3 Docs
# Roll dice in NdN format
# Pick random choice from 2
# Repeat a message N times
# Lookup user join timestamp on server
# Run t... | 28.19697 | 89 | 0.644277 | import discord
from discord.ext import commands
from urllib.parse import urlencode
import random
import aiohttp
import secrets
bot = commands.Bot(command_prefix='?')
@bot.event
async def on_ready():
print('Logged in as')
print(bot.user.name)
print(bot.user.id)
print('------')
# Re... | 0 | 1,255 | 0 | 0 | 0 | 0 | 0 | -9 | 255 |
3edf85029b7aa45edf671ff993356a7fff45ac80 | 7,046 | py | Python | olxcollector/olx.py | alisson0022/OlxCollector | fbc2ed37ea0da21380570ba59e0be7d65ba9006b | [
"MIT"
] | null | null | null | olxcollector/olx.py | alisson0022/OlxCollector | fbc2ed37ea0da21380570ba59e0be7d65ba9006b | [
"MIT"
] | null | null | null | olxcollector/olx.py | alisson0022/OlxCollector | fbc2ed37ea0da21380570ba59e0be7d65ba9006b | [
"MIT"
] | null | null | null |
# Ad class to centralize informations
#TODO Ajust this shit :/
# Get informations from pages | 33.552381 | 123 | 0.653278 | from requests import get
from bs4 import BeautifulSoup
import re
from datetime import datetime, timedelta
import pytz
# Ad class to centralize informations
class Ad:
def __init__(self, url: str, title: str, image_url: str, price: float, date: "datetime.datetime", professional: bool):
self.url = url
... | 4 | 0 | 0 | 543 | 0 | 5,992 | 0 | 8 | 406 |
6ee0abfd476a9e5ad3a3cd566fca67d22a533181 | 1,443 | py | Python | source-code/Google [PQ] Return the next leaf node in tree.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | source-code/Google [PQ] Return the next leaf node in tree.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | source-code/Google [PQ] Return the next leaf node in tree.py | ttungl/Coding-Interview-Challenge | d80c3e15468d50b42ee53fcc73e9326c6c816495 | [
"MIT"
] | null | null | null | # Return the next leaf node in tree
# Given a tree, if query a leaf node, return the next leaf node. If the queried node is an internal node, return whatever you want. You can define the node structure. (Not a binary tree)
# Example:
# a
# z x
# w z y o b
# If I quer... | 17.597561 | 186 | 0.61192 | # Return the next leaf node in tree
# Given a tree, if query a leaf node, return the next leaf node. If the queried node is an internal node, return whatever you want. You can define the node structure. (Not a binary tree)
# Example:
# a
# z x
# w z y o b
# If I quer... | 0 | 0 | 0 | 633 | 0 | 0 | 0 | 0 | 46 |
afaf98e5b04afe8c2176aa1a63d0e4189c532e59 | 7,075 | py | Python | DRL_py/ppo.py | darshan315/flow_past_cylender_by_DRL | 127915e8d4ac789afff42b13fcc7ab3edbfa7e7a | [
"MIT"
] | 16 | 2020-12-23T13:01:33.000Z | 2022-03-16T00:14:38.000Z | DRL_py/ppo.py | AndreWeiner/flowAcylenderDLR | 0ece783bc40f56bd9eaae628471d96c3856221a4 | [
"MIT"
] | 22 | 2020-10-21T12:49:52.000Z | 2022-03-31T07:09:45.000Z | DRL_py/ppo.py | darshan315/flow_past_cylinder_by_DRL | a3615ba4634187da0f283252939d418534a51e4f | [
"MIT"
] | 5 | 2021-06-08T13:41:37.000Z | 2021-12-16T14:43:32.000Z | """
This file has function containg main PPO algorithm
called in : main.py
"""
import time
def train_model(value_model,
policy_model,
env,
policy_optimizer,
policy_optimization_epochs,
policy_sample_ratio,
policy... | 40.66092 | 118 | 0.665724 | """
This file has function containg main PPO algorithm
called in : main.py
"""
import time
from reply_buffer import *
from eval_score_and_trace_update import *
def train_model(value_model,
policy_model,
env,
policy_optimizer,
policy_optimizati... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 45 |
25a9e6bf4d132a57ada9929883de35714180f89b | 2,976 | py | Python | extension/src/xdevice_extension/_core/exception.py | openharmony-gitee-mirror/test_xdevice | 1d24201649d4f6a3e5aa381989f794bb8cfe15b9 | [
"Apache-2.0"
] | 2 | 2021-12-20T03:22:21.000Z | 2022-02-10T07:26:38.000Z | extension/src/xdevice_extension/_core/exception.py | openharmony-gitee-mirror/test_xdevice | 1d24201649d4f6a3e5aa381989f794bb8cfe15b9 | [
"Apache-2.0"
] | null | null | null | extension/src/xdevice_extension/_core/exception.py | openharmony-gitee-mirror/test_xdevice | 1d24201649d4f6a3e5aa381989f794bb8cfe15b9 | [
"Apache-2.0"
] | 2 | 2021-09-13T11:13:53.000Z | 2022-02-28T21:54:23.000Z | #!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | 30.367347 | 79 | 0.670027 | #!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | 0 | 0 | 0 | 2,130 | 0 | 0 | 0 | 10 | 175 |
b4af6d08c8c4823df4ab88b550c9de81b7704b7e | 2,016 | py | Python | postgres/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | postgres/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | postgres/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
HERE = os.path.dirname(os.path.abspath(__file__))
| 24.289157 | 80 | 0.62252 | # (C) Datadog, Inc. 2010-2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import subprocess
import os
import time
import pytest
import mock
from datadog_checks.postgres import PostgreSql
from .common import HOST, PORT, USER, PASSWORD, DB_NAME
HERE = os.path.dirname(os.path.abspath(__... | 0 | 1,591 | 0 | 0 | 0 | 0 | 0 | 27 | 226 |
a5e8c62a1d7159485d1b250ee7010ea30c848cec | 177 | py | Python | query_sample.py | duyetdev/google-search-crawler | b0aac443b2d34ebb8013ce7f7a46ec477f0669d1 | [
"MIT"
] | 10 | 2017-07-18T20:22:52.000Z | 2020-01-03T07:51:31.000Z | query_sample.py | duyet/google-search-crawler | b0aac443b2d34ebb8013ce7f7a46ec477f0669d1 | [
"MIT"
] | null | null | null | query_sample.py | duyet/google-search-crawler | b0aac443b2d34ebb8013ce7f7a46ec477f0669d1 | [
"MIT"
] | 4 | 2017-05-23T15:14:49.000Z | 2020-05-02T15:38:34.000Z | from google import search
import pprint
KEYWORDS = 'duyetdev'
data = []
for d in search(KEYWORDS, tld='com.vn', lang='vi', stop=10):
data.append(d)
print pprint.pprint(data) | 17.7 | 60 | 0.711864 | from google import search
import pprint
KEYWORDS = 'duyetdev'
data = []
for d in search(KEYWORDS, tld='com.vn', lang='vi', stop=10):
data.append(d)
print pprint.pprint(data) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0172ec748d195d5ae12d677d1fe5b417d71691bc | 6,406 | py | Python | detect-once-tracking.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 7 | 2021-07-08T14:57:22.000Z | 2022-01-12T09:15:01.000Z | detect-once-tracking.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 1 | 2021-08-18T20:15:44.000Z | 2022-02-04T18:04:39.000Z | detect-once-tracking.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 2 | 2021-10-14T18:40:26.000Z | 2022-01-10T00:36:29.000Z | # import the necessary packages
from imutils.video import VideoStream
from imutils.video import FPS
import sys
import os
import numpy as np
import argparse
import imutils
import time
import cv2
sys.path.append(os.path.abspath('./modules/'))
import detection
# construct the argument parser and parse the ar... | 38.824242 | 127 | 0.635654 | # import the necessary packages
from imutils.video import VideoStream
from imutils.video import FPS
import sys
import os
import numpy as np
import argparse
import imutils
import time
import cv2
sys.path.append(os.path.abspath('./modules/'))
import detection
import helpers
# construct the argument parser ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 23 |
960d1835c6db32cbe502efac547c22ed98947c26 | 5,899 | py | Python | pgpdump/utils.py | paulfurley/python-pgpdump | 943af43ec98e6f3177a81f35a2ddbdb69cabaf40 | [
"BSD-3-Clause"
] | 36 | 2015-01-12T22:51:31.000Z | 2021-04-26T05:42:04.000Z | pgpdump/utils.py | akvadrako/python-pgpdump | 943af43ec98e6f3177a81f35a2ddbdb69cabaf40 | [
"BSD-3-Clause"
] | 9 | 2015-03-30T22:12:20.000Z | 2021-03-31T16:48:14.000Z | pgpdump/utils.py | akvadrako/python-pgpdump | 943af43ec98e6f3177a81f35a2ddbdb69cabaf40 | [
"BSD-3-Clause"
] | 15 | 2015-03-13T17:26:54.000Z | 2019-07-01T01:08:37.000Z | import binascii
import sys
PY26 = sys.version_info[0] == 2 and sys.version_info[1] <= 6
if PY26:
import struct
# 256 values corresponding to each possible byte
CRC24_TABLE = (
0x000000, 0x864cfb, 0x8ad50d, 0x0c99f6, 0x93e6e1, 0x15aa1a, 0x1933ec,
0x9f7f17, 0xa18139, 0x27cdc2, 0x2b5434, 0xad18cf, 0x3267d... | 39.858108 | 79 | 0.687744 | import binascii
import sys
PY26 = sys.version_info[0] == 2 and sys.version_info[1] <= 6
if PY26:
import struct
class PgpdumpException(Exception):
'''Base exception class raised by any parsing errors, etc.'''
pass
# 256 values corresponding to each possible byte
CRC24_TABLE = (
0x000000, 0x864cfb, ... | 0 | 0 | 0 | 88 | 0 | 0 | 0 | 0 | 23 |
64ece66b635702e635a503ad793653c8f70ed0b0 | 336 | py | Python | parser/team22/principal.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | 1 | 2021-01-09T05:32:35.000Z | 2021-01-09T05:32:35.000Z | parser/team22/principal.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | null | null | null | parser/team22/principal.py | itsmjoe/tytus | 3b0341cc854d67979b766c5c8b06ed172ce0c913 | [
"MIT"
] | null | null | null | import parser_asc as parser_asc
f = open("./entrada.txt", "r")
input = f.read()
instrucciones = parser_asc.parse(input)
print('**************** Consola: ****************')
for element in parser_asc.consola:
print(element)
print('**************** Salida: ****************')
for element in parser_asc.salida:
... | 25.846154 | 51 | 0.568452 | import parser_asc as parser_asc
f = open("./entrada.txt", "r")
input = f.read()
instrucciones = parser_asc.parse(input)
print('**************** Consola: ****************')
for element in parser_asc.consola:
print(element)
print('**************** Salida: ****************')
for element in parser_asc.salida:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b2afac528361486739b85dcb7e103b403e34b3f | 1,727 | py | Python | 003_StarField/starfield.py | Guilhermeasper/Tutoriais | e52852ae42034570cee5ceb0c0c00e32bb615746 | [
"MIT"
] | null | null | null | 003_StarField/starfield.py | Guilhermeasper/Tutoriais | e52852ae42034570cee5ceb0c0c00e32bb615746 | [
"MIT"
] | null | null | null | 003_StarField/starfield.py | Guilhermeasper/Tutoriais | e52852ae42034570cee5ceb0c0c00e32bb615746 | [
"MIT"
] | null | null | null | import pygame
import pygame.locals
try:
pygame.init()
print("O modulo pygame foi inicializado com sucesso")
except:
print("O modulo pygame no foi inicializado com sucesso")
altura = 800
largura = 800
relogio = pygame.time.Clock()
fundo = pygame.display.set_mode((altura,largura))
pygame.display.set_capti... | 26.166667 | 86 | 0.587145 | import pygame
import pygame.locals
from random import randrange, random
try:
pygame.init()
print("O modulo pygame foi inicializado com sucesso")
except:
print("O modulo pygame não foi inicializado com sucesso")
altura = 800
largura = 800
relogio = pygame.time.Clock()
fundo = pygame.display.set_mode((alt... | 2 | 0 | 0 | 852 | 0 | 0 | 0 | 15 | 45 |
5f52c277d3ded44f5d77e0fbcec30c4cae73f61a | 246 | py | Python | src/ajaxlogin/settings.py | manuelep/py4web_ajaxlogin | 1693e7f784863e2fb2d36181a5e4ea44a87cc406 | [
"MIT"
] | null | null | null | src/ajaxlogin/settings.py | manuelep/py4web_ajaxlogin | 1693e7f784863e2fb2d36181a5e4ea44a87cc406 | [
"MIT"
] | null | null | null | src/ajaxlogin/settings.py | manuelep/py4web_ajaxlogin | 1693e7f784863e2fb2d36181a5e4ea44a87cc406 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
DEFAULT_TOKEN = b"ThisIsAnInsecurePublicTokenDontUseIt"
DEFAULT_SALT = "Quisque vulputate nibh eros, vehicula sollicitudin neque pellentesque quis"
DEFAULT_LOGIN_PATH = 'ajaxlogin'
DEFAULT_NEW_TOKEN_PATH = 'ajaxtoken'
| 24.6 | 91 | 0.792683 | # -*- coding: utf-8 -*-
DEFAULT_TOKEN = b"ThisIsAnInsecurePublicTokenDontUseIt"
DEFAULT_SALT = "Quisque vulputate nibh eros, vehicula sollicitudin neque pellentesque quis"
DEFAULT_LOGIN_PATH = 'ajaxlogin'
DEFAULT_NEW_TOKEN_PATH = 'ajaxtoken'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0dadbbca080ec14aee28f5eedf45a863f3198b7b | 999 | py | Python | main.py | nyutian/Miniature-Database-System | 848078ff062287d11bd41dd1faadc3ac78e005d6 | [
"MIT"
] | null | null | null | main.py | nyutian/Miniature-Database-System | 848078ff062287d11bd41dd1faadc3ac78e005d6 | [
"MIT"
] | null | null | null | main.py | nyutian/Miniature-Database-System | 848078ff062287d11bd41dd1faadc3ac78e005d6 | [
"MIT"
] | 1 | 2020-12-07T10:51:21.000Z | 2020-12-07T10:51:21.000Z | import sys
if __name__ == '__main__':
testfile = sys.argv[1]
main(testfile)
| 29.382353 | 84 | 0.504505 | from util import excute_query_, excute_query
from util import database
import sys
def main(test_file):
queries = [query.rstrip('\n') for query in open(test_file)]
valid_queries = []
for query in queries:
if query.split()[0].strip() != "//":
valid_queries.append(query.split("//")[0].strip... | 0 | 0 | 0 | 0 | 0 | 793 | 0 | 27 | 66 |
431c7dbe7de6d4394df8681a3dfeb634027bc5fd | 13,422 | py | Python | hazelcast/core.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | hazelcast/core.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | hazelcast/core.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | """Hazelcast Core objects and constants."""
CLIENT_TYPE = "PYH"
SERIALIZATION_VERSION = 1
| 27.447853 | 99 | 0.596111 | """Hazelcast Core objects and constants."""
import json
CLIENT_TYPE = "PYH"
SERIALIZATION_VERSION = 1
class MemberInfo(object):
"""
Represents a member in the cluster with its address, uuid, lite member
status, attributes, version, and address map.
"""
__slots__ = ("address", "uuid", "attribute... | 0 | 1,660 | 0 | 11,317 | 0 | 0 | 0 | -10 | 351 |
ca55cc0919a68095883ccf3ce3bea78333e64c9c | 51 | py | Python | tools/datasets/signate/__init__.py | SuzukiDaichi-git/ai_edge_contest | 9fc62503dc755da33d7ffa6f85862964dba1c8d5 | [
"MIT"
] | null | null | null | tools/datasets/signate/__init__.py | SuzukiDaichi-git/ai_edge_contest | 9fc62503dc755da33d7ffa6f85862964dba1c8d5 | [
"MIT"
] | null | null | null | tools/datasets/signate/__init__.py | SuzukiDaichi-git/ai_edge_contest | 9fc62503dc755da33d7ffa6f85862964dba1c8d5 | [
"MIT"
] | null | null | null | from .signate import Signate
__all__ = ['Signate'] | 17 | 28 | 0.745098 | from .signate import Signate
__all__ = ['Signate'] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e7dd468f73de1a45a0ecc2207189405ee0f5145 | 38 | py | Python | tests/__init__.py | SuryaSankar/otpstore | 2b14746084f97378950a521325cd7b35273248ee | [
"MIT"
] | 1 | 2021-11-25T15:18:01.000Z | 2021-11-25T15:18:01.000Z | tests/__init__.py | SuryaSankar/otpstore | 2b14746084f97378950a521325cd7b35273248ee | [
"MIT"
] | null | null | null | tests/__init__.py | SuryaSankar/otpstore | 2b14746084f97378950a521325cd7b35273248ee | [
"MIT"
] | null | null | null | """Unit test package for otpstore."""
| 19 | 37 | 0.684211 | """Unit test package for otpstore."""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eaa619bb6827a05b118d9afa7c5452e15cd456bb | 123 | py | Python | Q01__/52_Maximum_Product_Subarray/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | Q01__/52_Maximum_Product_Subarray/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | Q01__/52_Maximum_Product_Subarray/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from Solution import Solution
obj = Solution()
#A = [2,3,-2,4]
A = [-2,0,-1]
print(obj.maxProduct(A))
| 12.3 | 29 | 0.626016 | #!/usr/bin/python
from Solution import Solution
obj = Solution()
#A = [2,3,-2,4]
A = [-2,0,-1]
print(obj.maxProduct(A))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1f88e4213262f3881f3418c016da03fe8cd8950 | 47,600 | py | Python | azotea/image.py | guaix-ucm/azotea | fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae | [
"MIT"
] | null | null | null | azotea/image.py | guaix-ucm/azotea | fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae | [
"MIT"
] | null | null | null | azotea/image.py | guaix-ucm/azotea | fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright (c) 2020
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# ----------... | 30.709677 | 116 | 0.577479 | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Copyright (c) 2020
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# ----------... | 6 | 0 | 0 | 112 | 0 | 34,054 | 0 | 144 | 1,533 |
4819d0a1f78fe00aeb9944dd7180d4a484c0397f | 3,358 | py | Python | services/pet_service.py | naolArega/buchi | cecc807a23a1177dc387b03aa05b4b2700e05977 | [
"MIT"
] | null | null | null | services/pet_service.py | naolArega/buchi | cecc807a23a1177dc387b03aa05b4b2700e05977 | [
"MIT"
] | 5 | 2022-03-18T08:00:14.000Z | 2022-03-21T16:58:27.000Z | services/pet_service.py | naolArega/buchi | cecc807a23a1177dc387b03aa05b4b2700e05977 | [
"MIT"
] | 1 | 2022-03-21T18:58:34.000Z | 2022-03-21T18:58:34.000Z | from core import mongodb
from decouple import config
pets_collection = mongodb.buchi.get_collection('pets')
host = config("HOST")
port = config("PORT")
cdn_url = config("CDN_HOST_URL_PREFIX")
| 37.730337 | 122 | 0.685825 | import aiofiles
from hashlib import md5
from pathlib import Path
from core import mongodb
from decouple import config
from base64 import decodebytes
from core.buchi_exception import BuchiException
from services.pet_finder_service import get_pet_finder_pets
pets_collection = mongodb.buchi.get_collection('pets')
host = ... | 0 | 0 | 1,949 | 0 | 0 | 828 | 0 | 72 | 316 |
b981dc69a1e3d042e88ed3d0f959a84f1df45517 | 2,921 | py | Python | unifi_protect_backup/cli.py | roastlechon/unifi-protect-backup | 298f500811b1d6e1f99c731aff9f67a2b9cd3eee | [
"MIT"
] | null | null | null | unifi_protect_backup/cli.py | roastlechon/unifi-protect-backup | 298f500811b1d6e1f99c731aff9f67a2b9cd3eee | [
"MIT"
] | null | null | null | unifi_protect_backup/cli.py | roastlechon/unifi-protect-backup | 298f500811b1d6e1f99c731aff9f67a2b9cd3eee | [
"MIT"
] | null | null | null | """Console script for unifi_protect_backup."""
if __name__ == "__main__":
main() # pragma: no cover
| 36.061728 | 117 | 0.707977 | """Console script for unifi_protect_backup."""
import asyncio
import click
from unifi_protect_backup import UnifiProtectBackup, __version__
@click.command()
@click.version_option(__version__)
@click.option('--address', required=True, envvar='UFP_ADDRESS', help='Address of Unifi Protect instance')
@click.option('--... | 0 | 2,694 | 0 | 0 | 0 | 0 | 0 | 27 | 92 |
6515c5b616952445da028f39f96e828c2fc5055c | 1,366 | py | Python | setup.py | xj361685640/legume | 6e44e38e209e739d2acc036aa6317fb306489477 | [
"MIT"
] | 54 | 2020-03-03T05:20:48.000Z | 2022-03-28T22:23:36.000Z | setup.py | xj361685640/legume | 6e44e38e209e739d2acc036aa6317fb306489477 | [
"MIT"
] | 13 | 2020-03-22T18:41:52.000Z | 2022-03-24T01:57:23.000Z | setup.py | xj361685640/legume | 6e44e38e209e739d2acc036aa6317fb306489477 | [
"MIT"
] | 19 | 2020-03-03T11:59:50.000Z | 2022-03-03T00:29:53.000Z | import os
from setuptools import setup, find_packages
# Single-source the version from legume/__init__.py
here = os.path.abspath(os.path.dirname(__file__))
#
with open('README.md', 'r') as f:
readme = f.read()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setup(
name='legume-g... | 29.695652 | 92 | 0.666911 | import os
import re
import codecs
from setuptools import setup, find_packages
# Single-source the version from legume/__init__.py
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
... | 0 | 0 | 0 | 0 | 0 | 364 | 0 | -20 | 90 |
d9b5f4471aeb0e5677276e348cbf679cf21d5630 | 3,816 | py | Python | test.py | regnar95/re-search | 4082f4efdc3762b507541d268e50aa49f6e460a5 | [
"MIT"
] | null | null | null | test.py | regnar95/re-search | 4082f4efdc3762b507541d268e50aa49f6e460a5 | [
"MIT"
] | null | null | null | test.py | regnar95/re-search | 4082f4efdc3762b507541d268e50aa49f6e460a5 | [
"MIT"
] | null | null | null | import tkinter as tk
root = tk.Tk()
canvas1 = tk.Canvas(root, width=400, height=300)
canvas1.pack()
entry1 = tk.Entry(root)
entry2 = tk.Entry(root)
label2 = tk.Label(root, text='Path')
label1 = tk.Label(root, text='Query')
canvas1.create_window(200, 160, window=entry1)
canvas1.create_window(200, 140, window=label1)
ca... | 84.8 | 985 | 0.725891 | import tkinter as tk
import os
import tempfile
root = tk.Tk()
canvas1 = tk.Canvas(root, width=400, height=300)
canvas1.pack()
entry1 = tk.Entry(root)
entry2 = tk.Entry(root)
label2 = tk.Label(root, text='Path')
label1 = tk.Label(root, text='Query')
canvas1.create_window(200, 160, window=entry1)
canvas1.create_window(2... | 0 | 0 | 0 | 0 | 0 | 3,242 | 0 | -18 | 67 |
a744661551bbc381fec065ea468fc58e93a83343 | 5,398 | py | Python | src/signalalign/__init__.py | mitenjain/signalAlign | 675a49b83dbd98dbc38b7bda216b3bca18d3ae6e | [
"MIT"
] | 6 | 2017-10-24T06:46:54.000Z | 2020-03-15T14:43:53.000Z | src/signalalign/__init__.py | mitenjain/signalAlign | 675a49b83dbd98dbc38b7bda216b3bca18d3ae6e | [
"MIT"
] | 5 | 2018-01-24T16:20:55.000Z | 2021-04-21T20:05:50.000Z | src/signalalign/__init__.py | mitenjain/signalAlign | 675a49b83dbd98dbc38b7bda216b3bca18d3ae6e | [
"MIT"
] | 1 | 2018-02-16T16:57:16.000Z | 2018-02-16T16:57:16.000Z |
ALLOWED_FLAGS = (0, 16)
DEFAULT_TRAINMODELS_OPTIONS = {
"fofn": None,
"fast5_dir": None,
"positions_file": None,
"motif": None,
"label": None,
}
| 40.586466 | 117 | 0.607818 | import os
import re
ALLOWED_FLAGS = (0, 16)
DEFAULT_TRAINMODELS_OPTIONS = {
"fofn": None,
"fast5_dir": None,
"positions_file": None,
"motif": None,
"label": None,
}
def parseFofn(fofn_file):
files = []
with open(fofn_file, "r") as fH:
for l in fH:
files.append(l.stri... | 0 | 0 | 0 | 0 | 0 | 5,114 | 0 | -24 | 136 |
b7adb5184cd9c3b6f3506840e90bc8d5715a33d9 | 4,132 | py | Python | tools/agile-machine-learning-api/tests/tests_api.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 2,116 | 2017-05-18T19:33:05.000Z | 2022-03-31T13:34:48.000Z | tools/agile-machine-learning-api/tests/tests_api.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 548 | 2017-05-20T05:05:35.000Z | 2022-03-28T16:38:12.000Z | tools/agile-machine-learning-api/tests/tests_api.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 1,095 | 2017-05-19T00:02:36.000Z | 2022-03-31T05:21:39.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.730769 | 103 | 0.513795 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 0 | 3,183 | 0 | 263 | 0 | 0 | 0 | -11 | 89 |
c01847b06df3591326c6ecacf58453dce530946d | 3,454 | py | Python | test/test_humbledb/test_helpers.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 26 | 2015-01-11T01:12:15.000Z | 2022-03-26T04:09:05.000Z | test/test_humbledb/test_helpers.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 7 | 2015-03-16T12:49:33.000Z | 2018-03-07T00:45:30.000Z | test/test_humbledb/test_helpers.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 6 | 2015-06-05T01:55:36.000Z | 2021-06-04T16:37:39.000Z | """
Tests for Helpers
=================
"""
from humbledb import _version
SIDECAR = 'sidecars'
# The safe= keyword doesn't exist in 3.0
if _version._lt('3.0.0'):
_safe = {'safe': True}
else:
_safe = {}
| 23.496599 | 78 | 0.655182 | """
Tests for Helpers
=================
"""
import pyconfig
from humbledb import _version
from humbledb import Document, Mongo
from humbledb.helpers import auto_increment
from humbledb.errors import DatabaseMismatch, NoConnection
from ..util import DBTest, database_name, eq_, ok_, raises, SkipTest
SIDECAR = 'sideca... | 0 | 684 | 0 | 477 | 0 | 1,614 | 0 | 115 | 340 |
fc937da133bfd1c51688b60ac194ba57a3e7567f | 5,457 | py | Python | redditSearch.py | joshuaeh/redditSearch | edc7a8ece06da0803644a9d704fb7e559aed857a | [
"MIT"
] | 1 | 2021-05-21T04:00:49.000Z | 2021-05-21T04:00:49.000Z | redditSearch.py | joshuaeh/redditSearch | edc7a8ece06da0803644a9d704fb7e559aed857a | [
"MIT"
] | null | null | null | redditSearch.py | joshuaeh/redditSearch | edc7a8ece06da0803644a9d704fb7e559aed857a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Function to search reddit comments and submissions and
return all metadata available and return a dataFrame """
import pandas as pd
import requests
import json
import datetime
def RedditSearch(query, before='', after='', search_type='hybrid'):
'''
... | 40.422222 | 107 | 0.60088 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Function to search reddit comments and submissions and
return all metadata available and return a dataFrame """
import pandas as pd
import requests
import json
import csv
import time
import datetime
def RedditSearch(query, before='', after='', search_type... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -21 | 46 |
b3a64175997416d1ec09d28831cea618daa03d5e | 345 | py | Python | templado/templatetags/search_form.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | null | null | null | templado/templatetags/search_form.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | 3 | 2020-02-11T21:28:48.000Z | 2021-06-10T17:24:02.000Z | templado/templatetags/search_form.py | nnkps/templado | 660bb430b06d34286ecb9d21ae88279277bf92fc | [
"BSD-2-Clause"
] | 2 | 2015-08-14T12:49:31.000Z | 2015-08-19T21:17:56.000Z | from django import template
register = template.Library()
| 20.294118 | 45 | 0.715942 | from bootstrap3.forms import render_form
from django import template
from ..forms import SearchForm
register = template.Library()
@register.simple_tag()
def bootstrap_query_form(request):
if request.GET.get('q'):
form = SearchForm(request.GET)
else:
form = SearchForm()
return render_form(... | 0 | 188 | 0 | 0 | 0 | 0 | 0 | 28 | 67 |
b85247ef5c2afe5f5f11808b277e26154b994b73 | 1,279 | py | Python | examples/cf_push_blue_green.py | hsdp/python-cf-api | 13fc605e2ea3b5c09cc8a556c58e8c36ae290c8c | [
"Apache-2.0"
] | 20 | 2018-01-19T20:19:02.000Z | 2020-06-09T08:45:40.000Z | examples/cf_push_blue_green.py | hsdp/python-cf-api | 13fc605e2ea3b5c09cc8a556c58e8c36ae290c8c | [
"Apache-2.0"
] | 4 | 2018-01-20T00:24:27.000Z | 2020-03-16T01:26:27.000Z | examples/cf_push_blue_green.py | hsdp/python-cf-api | 13fc605e2ea3b5c09cc8a556c58e8c36ae290c8c | [
"Apache-2.0"
] | 3 | 2020-02-19T22:56:50.000Z | 2021-05-12T19:38:33.000Z | """Runs a Blue Green deploy of a Cloud Foundry application using a manifest
"""
from __future__ import print_function
import os
import cf_api
from cf_api.deploy_space import Space
from getpass import getpass
print('----------')
# cloud_controller_url = 'https://api.changeme.com'
cloud_controller_url = raw_input('clou... | 29.744186 | 79 | 0.719312 | """Runs a Blue Green deploy of a Cloud Foundry application using a manifest
"""
from __future__ import print_function
import os
import sys
import json
import cf_api
from cf_api.deploy_manifest import Deploy
from cf_api.deploy_space import Space
from getpass import getpass
print('----------')
# cloud_controller_url = ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 66 |
d377f1664733df97e8a8557ff37a39d5ee25da9a | 11,493 | py | Python | lib/rank_utils.py | h-zcc/ref-nms | 8f83f350c497d0ef875c778a8ce76725552abb3c | [
"MIT"
] | 19 | 2020-12-14T13:53:10.000Z | 2022-02-27T09:46:15.000Z | lib/rank_utils.py | h-zcc/ref-nms | 8f83f350c497d0ef875c778a8ce76725552abb3c | [
"MIT"
] | 3 | 2021-01-16T11:41:07.000Z | 2021-08-06T08:21:42.000Z | lib/rank_utils.py | h-zcc/ref-nms | 8f83f350c497d0ef875c778a8ce76725552abb3c | [
"MIT"
] | 3 | 2021-01-10T15:25:29.000Z | 2021-09-26T01:38:16.000Z |
__all__ = ['RankDataset', 'RankEvalLoader', 'RankEvaluator']
| 44.546512 | 115 | 0.612982 | import os
import random
import pickle
import math
import torch
from torch.utils.data import Dataset
from torchvision.ops import nms
import numpy as np
import h5py
from tqdm import trange
from utils.misc import mrcn_crop_pool_layer, recursive_jitter_roi, repeat_loader, calculate_iou
__all__ = ['RankDataset', 'RankEv... | 0 | 610 | 0 | 10,463 | 0 | 0 | 0 | 41 | 313 |
f846089e57b3846e8efa30888ad772d677ae9a4e | 1,151 | py | Python | blink.py | VictorKoenders/icesugar_template | fa279b81b9e1b75a840bae9ec798ea356a5c8fa3 | [
"BSD-2-Clause"
] | 1 | 2020-12-30T11:45:41.000Z | 2020-12-30T11:45:41.000Z | blink.py | VictorKoenders/icesugar_template | fa279b81b9e1b75a840bae9ec798ea356a5c8fa3 | [
"BSD-2-Clause"
] | null | null | null | blink.py | VictorKoenders/icesugar_template | fa279b81b9e1b75a840bae9ec798ea356a5c8fa3 | [
"BSD-2-Clause"
] | null | null | null |
# Simple blink script. Call this with:
# ```python
# blink = Blink(12000000) # blink once a second, the icesugar runs at 12mhz
# led = platform.request('led_r')
#
# m = Module()
# m.submodules += blink
# m.d.comb += led.eq(blink.state)
# ```
| 30.289474 | 86 | 0.573414 | from nmigen import *
from nmigen.build import Platform
# Simple blink script. Call this with:
# ```python
# blink = Blink(12000000) # blink once a second, the icesugar runs at 12mhz
# led = platform.request('led_r')
#
# m = Module()
# m.submodules += blink
# m.d.comb += led.eq(blink.state)
# ```
class Blink(Elaborat... | 0 | 0 | 0 | 829 | 0 | 0 | 0 | 11 | 67 |
8940dcd76c1dc9c9d6d9555a7ba9951f47cf1f4c | 2,628 | py | Python | tests/cp2/test_cp2_cjalr_delay_2.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | null | null | null | tests/cp2/test_cp2_cjalr_delay_2.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | 2 | 2020-06-02T13:44:55.000Z | 2020-06-02T14:06:29.000Z | tests/cp2/test_cp2_cjalr_delay_2.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | null | null | null | #-
# Copyright (c) 2018 Alex Richardson
# All rights reserved.
#
# This software was developed by the University of Cambridge Computer
# Laboratory as part of the Rigorous Engineering of Mainstream Systems (REMS)
# project, funded by EPSRC grant EP/K008528/1.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BERI Open Sy... | 48.666667 | 129 | 0.753425 | #-
# Copyright (c) 2018 Alex Richardson
# All rights reserved.
#
# This software was developed by the University of Cambridge Computer
# Laboratory as part of the Rigorous Engineering of Mainstream Systems (REMS)
# project, funded by EPSRC grant EP/K008528/1.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BERI Open Sy... | 0 | 1,432 | 0 | 0 | 0 | 0 | 0 | 28 | 45 |
26cbb4361ec421cd4609b0ca8de7aad4035a3574 | 392 | py | Python | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.python.framework import graph_util
sess = tf.InteractiveSession()
op = tf.range([3, 4], [18, 10], [5, 3], name="range")
target=op.eval();
print(target)
constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['range'])
with tf.gfile.FastGFile("range.... | 24.5 | 91 | 0.732143 | import tensorflow as tf
from tensorflow.python.framework import graph_util
sess = tf.InteractiveSession()
op = tf.range([3, 4], [18, 10], [5, 3], name="range")
target=op.eval();
print(target)
constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['range'])
with tf.gfile.FastGFile("range.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ff45733d9acd64d8b12aef8074fc5fafc63f8108 | 21,252 | py | Python | import.py | pangaea-data-publisher/pg_itis_importer | fc95b3446cae234d8b81da345418452a2c7f970f | [
"MIT"
] | 1 | 2019-12-19T08:44:36.000Z | 2019-12-19T08:44:36.000Z | import.py | pangaea-data-publisher/pg_itis_importer | fc95b3446cae234d8b81da345418452a2c7f970f | [
"MIT"
] | null | null | null | import.py | pangaea-data-publisher/pg_itis_importer | fc95b3446cae234d8b81da345418452a2c7f970f | [
"MIT"
] | 2 | 2019-12-19T08:45:31.000Z | 2021-05-21T19:31:16.000Z | #!/usr/bin/python
import datetime
#test olnly
if __name__ == '__main__':
global logger
logger = initLog()
logger.debug("Starting ITIS harvester...")
a = datetime.datetime.now()
main()
b = datetime.datetime.now()
diff = b-a
logger.debug('Total execution time:%s' %diff)
logger.debug(... | 56.222222 | 214 | 0.705816 | #!/usr/bin/python
import configparser
import argparse
import pandas as pd
import datetime
import sql_itis
import logging
import os
import requests
from zipfile import ZipFile, BadZipfile
import re
from io import BytesIO
import xml.etree.ElementTree as ET
def main():
global args
global configParser
global l... | 0 | 0 | 0 | 0 | 0 | 20,531 | 0 | -21 | 379 |
7aebb6fadc7b10e49f91837a81257338471cd7f3 | 3,452 | py | Python | pandas/tests/io/formats/style/test_tooltip.py | madhuv2002/pandas | 006f1e0efb3ec81d52ff4d080b0c770b7b79d041 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-05-07T04:58:36.000Z | 2021-05-07T04:58:59.000Z | pandas/tests/io/formats/style/test_tooltip.py | madhuv2002/pandas | 006f1e0efb3ec81d52ff4d080b0c770b7b79d041 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/formats/style/test_tooltip.py | madhuv2002/pandas | 006f1e0efb3ec81d52ff4d080b0c770b7b79d041 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-06-16T07:19:12.000Z | 2021-12-16T10:24:44.000Z | import pytest
pytest.importorskip("jinja2")
| 34.52 | 88 | 0.490151 | import numpy as np
import pytest
from pandas import DataFrame
pytest.importorskip("jinja2")
from pandas.io.formats.style import Styler
class TestStylerTooltip:
@pytest.mark.parametrize(
"ttips",
[
DataFrame(
data=[["Min", "Max"], [np.nan, ""]],
columns... | 0 | 1,483 | 0 | 1,808 | 0 | 0 | 0 | 25 | 90 |
dc0fb9cfbdc29f0618bb324ecd977506af168797 | 5,395 | py | Python | hiicart/gateway/authorizenet/forms.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | 1 | 2016-07-15T05:10:24.000Z | 2016-07-15T05:10:24.000Z | hiicart/gateway/authorizenet/forms.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | null | null | null | hiicart/gateway/authorizenet/forms.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | null | null | null | from django.utils import timezone
PAYMENT_FIELDS = {'credit_card__number': 'x_card_num',
'credit_card__cvv': 'x_card_code',
'credit_card__exp_date': 'x_exp_date',
'credit_card__expiration_month': 'x_exp_date',
'billing__first_name': 'x_first_name'... | 39.379562 | 131 | 0.60519 | from django.utils import timezone
from django import forms
from django.forms.util import ErrorDict
PAYMENT_FIELDS = {'credit_card__number': 'x_card_num',
'credit_card__cvv': 'x_card_code',
'credit_card__exp_date': 'x_exp_date',
'credit_card__expiration_month': 'x_e... | 0 | 102 | 0 | 3,919 | 0 | 0 | 0 | 21 | 67 |
1c3c89eef599aed04fda4f871c9ab8f8c5f9eedc | 8,653 | py | Python | privex/db/query/postgres.py | Privex/python-db | 3b46b34b4310973e2e2a30a66adaa853fd10340d | [
"X11"
] | 1 | 2019-12-19T13:12:53.000Z | 2019-12-19T13:12:53.000Z | privex/db/query/postgres.py | Privex/python-db | 3b46b34b4310973e2e2a30a66adaa853fd10340d | [
"X11"
] | 9 | 2020-02-24T20:14:53.000Z | 2021-04-30T21:51:04.000Z | privex/db/query/postgres.py | Privex/python-db | 3b46b34b4310973e2e2a30a66adaa853fd10340d | [
"X11"
] | null | null | null | import psycopg2.extras
import logging
log = logging.getLogger(__name__)
| 42.209756 | 117 | 0.602912 | from typing import Iterable, Union
import psycopg2.extras
import psycopg2.extensions
import logging
from privex.db.base import CursorManager
from privex.db.types import GenericCursor
from privex.db.query.base import BaseQueryBuilder, QueryMode
log = logging.getLogger(__name__)
class PostgresQueryBuilder(BaseQueryBu... | 2 | 326 | 0 | 8,021 | 0 | 0 | 0 | 96 | 134 |
d3238a9adc42a7a3a67e9efc3985721a9b046fca | 411 | py | Python | build/lib/stdlib.py | nirvanasupermind/qlang | c3264a343f19af0de1161b006c6ec2ee86e73882 | [
"MIT"
] | null | null | null | build/lib/stdlib.py | nirvanasupermind/qlang | c3264a343f19af0de1161b006c6ec2ee86e73882 | [
"MIT"
] | null | null | null | build/lib/stdlib.py | nirvanasupermind/qlang | c3264a343f19af0de1161b006c6ec2ee86e73882 | [
"MIT"
] | null | null | null | from symbol_table import SymbolTable
# def func_N(args):
# return Number(float(args[0]))
stdlib = SymbolTable()
stdlib.set('I', Func(func_I))
stdlib.set('S', Func(func_S))
# stdlib.set('N', Func(func_N))
stdlib.set('P', Func(func_P)) | 19.571429 | 36 | 0.6691 | from symbol_table import SymbolTable
from values import *
def func_I(args):
return String(input())
# def func_N(args):
# return Number(float(args[0]))
def func_S(args):
return String(str(args[0]))
def func_P(args):
print(args[0])
return At()
stdlib = SymbolTable()
stdlib.set('I', Func(func_I))
... | 0 | 0 | 0 | 0 | 0 | 82 | 0 | -1 | 91 |
7dc1b794b1cf3088e6b7b3eb17ce6b5a2b877126 | 13,924 | py | Python | bin/useful.py | ddierschow/cab984 | 108ec0e4358690719ca2dabe0149021cfc7acd93 | [
"MIT"
] | null | null | null | bin/useful.py | ddierschow/cab984 | 108ec0e4358690719ca2dabe0149021cfc7acd93 | [
"MIT"
] | null | null | null | bin/useful.py | ddierschow/cab984 | 108ec0e4358690719ca2dabe0149021cfc7acd93 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# Things that are generally useful but require nothing other
# than standard libraries.
import copy, filecmp, glob, itertools, os, pprint, random, re, stat, string, urllib, urllib2
import config # bleagh
import jinja2
#html_done = False
alnum = string.digits + string.ascii_lowercase
if os.... | 25.133574 | 106 | 0.561692 | #!/usr/local/bin/python
# Things that are generally useful but require nothing other
# than standard libraries.
import copy, filecmp, glob, itertools, os, pprint, random, re, stat, string, urllib, urllib2
import config # bleagh
import jinja2
#html_done = False
alnum = string.digits + string.ascii_lowercase
if os.... | 0 | 0 | 0 | 460 | 0 | 10,850 | 0 | 0 | 986 |