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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6ba88a49bf9b0bc5582fd1e7422e8619828855f1 | 3,064 | py | Python | code/track_face.py | TianxingWu/face-tracking-pan-tilt-camera | a0c044d70afaab6f16d15905bc418c6a2c6bd5a3 | [
"MIT"
] | 53 | 2019-08-19T16:34:07.000Z | 2022-03-31T16:11:34.000Z | code/track_face.py | wtx666666/face-tracking-pan-tilt-camera | a0c044d70afaab6f16d15905bc418c6a2c6bd5a3 | [
"MIT"
] | 1 | 2021-01-31T13:23:59.000Z | 2021-07-19T09:10:45.000Z | code/track_face.py | TianxingWu/face-tracking-pan-tilt-camera | a0c044d70afaab6f16d15905bc418c6a2c6bd5a3 | [
"MIT"
] | 16 | 2020-03-12T14:03:42.000Z | 2022-03-12T01:17:31.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 18:03:22 2018
@author: James Wu
"""
import cv2
import serial
face_cascade = cv2.CascadeClassifier('./data/haarcascade_frontalface_default.xml')
#==============================================================================
# 1.
#
#
#===============... | 31.265306 | 93 | 0.42265 | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 18:03:22 2018
@author: James Wu
"""
import cv2
import numpy as np
import serial
face_cascade = cv2.CascadeClassifier('./data/haarcascade_frontalface_default.xml')
#==============================================================================
# 1.多人脸形心检测函数
# ... | 687 | 0 | 0 | 0 | 0 | 1,504 | 0 | -3 | 44 |
fea636263bfdbe4db8fc2c4d2322d80f9539955b | 988 | py | Python | anthill/static/model/deploy.py | anthill-platform/anthill-static | a689a0862100980556abb0325f0f2ddc1918bdac | [
"MIT"
] | null | null | null | anthill/static/model/deploy.py | anthill-platform/anthill-static | a689a0862100980556abb0325f0f2ddc1918bdac | [
"MIT"
] | null | null | null | anthill/static/model/deploy.py | anthill-platform/anthill-static | a689a0862100980556abb0325f0f2ddc1918bdac | [
"MIT"
] | null | null | null |
from . settings import NoSuchSettingsError, SettingsError
| 31.870968 | 88 | 0.720648 |
from anthill.common.model import Model
from anthill.common.validate import validate
from anthill.common.deployment import DeploymentError, DeploymentMethods
from . settings import NoSuchSettingsError, SettingsError
import os
class DeploymentModel(Model):
def __init__(self, settings):
self.settings = se... | 0 | 634 | 0 | 102 | 0 | 0 | 0 | 79 | 113 |
f540af3d871c70c7a81ebcb4e3770a5303325aae | 2,041 | py | Python | shared/reaction_message.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 16 | 2022-02-11T14:49:04.000Z | 2022-03-30T07:33:45.000Z | shared/reaction_message.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 1 | 2022-02-16T15:23:50.000Z | 2022-02-21T15:30:21.000Z | shared/reaction_message.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 1 | 2022-03-24T10:52:28.000Z | 2022-03-24T10:52:28.000Z | """
.. module:: reaction_message
:platform: Unix
:synopsis: A module that describes what the reaction should be when receiving a specific message.
.. Copyright 2022 EDF
.. moduleauthor:: Oscar RODRIGUEZ INFANTE, Tony ZHOU, Trang PHAM, Efflam OLLIVIER
.. License:: This source code is licensed under the MIT Li... | 24.590361 | 119 | 0.697697 | """
.. module:: reaction_message
:platform: Unix
:synopsis: A module that describes what the reaction should be when receiving a specific message.
.. Copyright 2022 EDF
.. moduleauthor:: Oscar RODRIGUEZ INFANTE, Tony ZHOU, Trang PHAM, Efflam OLLIVIER
.. License:: This source code is licensed under the MIT Li... | 0 | 363 | 0 | 1,225 | 0 | 0 | 0 | 0 | 115 |
0a023b74068bcb32a37f7e6cdf2f1adb0d30c8d1 | 715 | py | Python | backend/corpora/lambdas/api/v1/wmg.py | chanzuckerberg/dcp-prototype | 24d2323ba5ae1482395da35ea11c42708e3a52ce | [
"MIT"
] | 7 | 2021-09-17T23:44:31.000Z | 2022-03-25T22:36:07.000Z | backend/corpora/lambdas/api/v1/wmg.py | chanzuckerberg/single-cell-data-portal | d8901ef978ad96de75510d5eb0e459a4790197ea | [
"MIT"
] | 784 | 2021-08-18T23:38:09.000Z | 2022-03-31T21:18:54.000Z | backend/corpora/lambdas/api/v1/wmg.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 2 | 2021-09-07T19:04:17.000Z | 2021-12-23T21:51:36.000Z |
# "WHERE'S MY GENE" PROTOTYPE CODE
WMG_DATA_BUCKET = "wmg-prototype-data-dev-public"
WMG_DATA_S3_OBJ_PREFIX = "lung-tissue-10x-human-20220112"
| 28.6 | 118 | 0.767832 | import boto3
from flask import make_response
# "WHERE'S MY GENE" PROTOTYPE CODE
WMG_DATA_BUCKET = "wmg-prototype-data-dev-public"
WMG_DATA_S3_OBJ_PREFIX = "lung-tissue-10x-human-20220112"
def __request_wmg_s3_object(key: str) -> str:
s3 = boto3.client("s3")
return s3.get_object(Bucket=WMG_DATA_BUCKET, Key=f... | 0 | 0 | 0 | 0 | 0 | 429 | 0 | 1 | 136 |
976f9b5d24d1ceef1758f0d4fa90b9282240a1a2 | 1,186 | py | Python | src/randomcab/home/test.py | bjarnoldus/randomcab | f5598173957680658ad1af19e4b9d3d623d12163 | [
"MIT"
] | null | null | null | src/randomcab/home/test.py | bjarnoldus/randomcab | f5598173957680658ad1af19e4b9d3d623d12163 | [
"MIT"
] | null | null | null | src/randomcab/home/test.py | bjarnoldus/randomcab | f5598173957680658ad1af19e4b9d3d623d12163 | [
"MIT"
] | null | null | null | """
test.py
Copyright 2015 Jeroen Arnoldus <jeroen@repleo.nl>
THIS SOFTWARE IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, AND MAY BE
COPIED, MODIFIED OR DISTRIBUTED IN ANY WAY, AS LONG AS THIS NOTICE
AND ACKNOWLEDGEMENT OF AUTHORSHIP REMAIN.
"""
| 32.944444 | 83 | 0.588533 | """
test.py
Copyright 2015 Jeroen Arnoldus <jeroen@repleo.nl>
THIS SOFTWARE IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, AND MAY BE
COPIED, MODIFIED OR DISTRIBUTED IN ANY WAY, AS LONG AS THIS NOTICE
AND ACKNOWLEDGEMENT OF AUTHORSHIP REMAIN.
"""
from django.test import TestCase
import mimetypes
from randomcab... | 0 | 0 | 0 | 806 | 0 | 0 | 0 | 26 | 90 |
d4404a4edad6e9baaffebb283d28eb946939a2a4 | 3,493 | py | Python | utilities/cifar_tools.py | david-villagra/plan_b_DL | 1200e018086f1e3bd4bc61466b14ab4ec478c0ca | [
"MIT"
] | null | null | null | utilities/cifar_tools.py | david-villagra/plan_b_DL | 1200e018086f1e3bd4bc61466b14ab4ec478c0ca | [
"MIT"
] | null | null | null | utilities/cifar_tools.py | david-villagra/plan_b_DL | 1200e018086f1e3bd4bc61466b14ab4ec478c0ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#import io
#from PIL import Image
| 32.64486 | 102 | 0.599198 | # -*- coding: utf-8 -*-
import codecs
import os
import pickle
#import io
#from PIL import Image
import numpy as np
def im_to_cifar(image_array, class_im):
# Input: 3D array (32 x 32 x 3)
im_array_R = image_array[:, :, 0]
im_array_G = image_array[:, :, 1]
im_array_B = image_array[:, :, 2]
byte_a... | 0 | 0 | 0 | 0 | 0 | 3,235 | 0 | -31 | 226 |
16fff8920f2f45101eaff4cf96afe06e3fa0281d | 45 | py | Python | info.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null | info.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null | info.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null | ## This repo will use python code in general
| 22.5 | 44 | 0.755556 | ## This repo will use python code in general
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
38104d928ec8a2505358f2a08b082d55c9d63661 | 14,310 | py | Python | tripleo_workflows/utils/config.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | tripleo_workflows/utils/config.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | tripleo_workflows/utils/config.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 43.232628 | 79 | 0.57037 | # Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 0 | 154 | 0 | 13,326 | 0 | 0 | 0 | -66 | 245 |
04e331904ff0075eafbaec2bd49637c2ef3a59c6 | 5,986 | py | Python | dp_tornado/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 18 | 2015-04-07T14:28:39.000Z | 2020-02-08T14:03:38.000Z | dp_tornado/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 7 | 2016-10-05T05:14:06.000Z | 2021-05-20T02:07:22.000Z | dp_tornado/__init__.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 11 | 2015-12-15T09:49:39.000Z | 2021-09-06T18:38:21.000Z | # -*- coding: utf-8 -*-
"""
dp for Tornado
MVC Web Application Framework with Tornado
http://github.com/why2pac/dp-tornado
Copyright (c) 2015, why2pac <youngyongpark@gmail.com>
"""
import tornado.web
import tornado.ioloop
from dp_tornado.engine.engine import EngineSingleton as dpEngineSingleton
engine... | 35.211765 | 112 | 0.633478 | # -*- coding: utf-8 -*-
"""
dp for Tornado
MVC Web Application Framework with Tornado
http://github.com/why2pac/dp-tornado
Copyright (c) 2015, why2pac <youngyongpark@gmail.com>
"""
import tornado.web
import tornado.ioloop
import tornado.httpserver
import time
import os
import multiprocessing
import impo... | 0 | 0 | 0 | 5,077 | 0 | 0 | 0 | 231 | 333 |
b1639463c7c5288517ab6cdee1316338362c062a | 208 | py | Python | ABC151-200/ABC190/abc190_a.py | billyio/atcoder | 9d16765f91f28deeb7328fcc6c19541ee790941f | [
"MIT"
] | 1 | 2021-02-01T08:48:07.000Z | 2021-02-01T08:48:07.000Z | ABC151-200/ABC190/abc190_a.py | billyio/atcoder | 9d16765f91f28deeb7328fcc6c19541ee790941f | [
"MIT"
] | null | null | null | ABC151-200/ABC190/abc190_a.py | billyio/atcoder | 9d16765f91f28deeb7328fcc6c19541ee790941f | [
"MIT"
] | null | null | null | # AC
A,B,C = map(int, input().split())
if C == 0:
if A > B:
print("Takahashi")
else:
print("Aoki")
if C == 1:
if A < B:
print("Aoki")
else:
print("Takahashi")
| 14.857143 | 33 | 0.4375 | # AC
A,B,C = map(int, input().split())
if C == 0:
if A > B:
print("Takahashi")
else:
print("Aoki")
if C == 1:
if A < B:
print("Aoki")
else:
print("Takahashi")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c41d8136717569fc882e7838a9d753848f53e35d | 1,941 | py | Python | py3tftp/cli_parser.py | pritstift/py3tftp | 627979252291a6dc75d121be69cbc6355634f0f0 | [
"MIT"
] | null | null | null | py3tftp/cli_parser.py | pritstift/py3tftp | 627979252291a6dc75d121be69cbc6355634f0f0 | [
"MIT"
] | null | null | null | py3tftp/cli_parser.py | pritstift/py3tftp | 627979252291a6dc75d121be69cbc6355634f0f0 | [
"MIT"
] | null | null | null | import logging
EPILOG = """
Released under the MIT license.
Copyright 2016 Matt O. <matt@mattscodecave.com>
"""
logging_config = {
'format': '%(asctime)s [%(levelname)s] %(message)s',
'level': logging.INFO,
'filename': None
}
| 27.728571 | 79 | 0.574961 | import argparse
import logging
from sys import exit
from py3tftp import __version__
EPILOG = """
Released under the MIT license.
Copyright 2016 Matt O. <matt@mattscodecave.com>
"""
logging_config = {
'format': '%(asctime)s [%(levelname)s] %(message)s',
'level': logging.INFO,
'filename': None
}
def prin... | 0 | 0 | 0 | 0 | 0 | 1,583 | 0 | 3 | 113 |
834104961095e5ed6cb46b9494b374591115105a | 993 | py | Python | raptiformica/distributed/power.py | vdloo/raptiformica | e2807e5e913312034161efcbd74525a4b15b37e7 | [
"MIT"
] | 21 | 2016-09-04T11:27:31.000Z | 2019-10-30T08:23:14.000Z | raptiformica/distributed/power.py | vdloo/raptiformica | e2807e5e913312034161efcbd74525a4b15b37e7 | [
"MIT"
] | 5 | 2017-09-17T15:59:37.000Z | 2018-02-03T14:53:32.000Z | raptiformica/distributed/power.py | vdloo/raptiformica | e2807e5e913312034161efcbd74525a4b15b37e7 | [
"MIT"
] | 2 | 2017-11-21T18:14:51.000Z | 2017-11-22T01:20:45.000Z | from raptiformica.distributed.exec import try_machine_command
def try_issue_shutdown(host_and_port_pairs):
"""
Iterate over host and port pairs and try to issue a shutdown on all nodes until
one returns a nonzero exit code. At that point return the standard out output.
If we ran out of host and port p... | 41.375 | 90 | 0.723061 | from raptiformica.distributed.exec import try_machine_command
def try_issue_shutdown(host_and_port_pairs):
"""
Iterate over host and port pairs and try to issue a shutdown on all nodes until
one returns a nonzero exit code. At that point return the standard out output.
If we ran out of host and port p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dcb2cdeaeca5851d54ae1db8e5758cf183ee8b8a | 15,453 | py | Python | flytekit/sdk/types.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | 1 | 2019-10-22T05:22:16.000Z | 2019-10-22T05:22:16.000Z | flytekit/sdk/types.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | null | null | null | flytekit/sdk/types.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | 1 | 2019-08-28T22:27:07.000Z | 2019-08-28T22:27:07.000Z | from __future__ import absolute_import
| 35.770833 | 119 | 0.612244 | from __future__ import absolute_import
from flytekit.common.types import primitives as _primitives, blobs as _blobs, schema as _schema, helpers as _helpers, \
proto as _proto, containers as _containers
class Types(object):
Integer = _helpers.get_sdk_type_from_literal_type(_primitives.Integer.to_flyte_literal_... | 0 | 0 | 0 | 15,223 | 0 | 0 | 0 | 145 | 45 |
2f0dee40e826a41951c80e8159d2ebaf8b99fc22 | 2,767 | py | Python | src/navi/web/page.py | project-capo/app-drive-and-visualize | 05305c3bdc23769e259cdb82b3a4fac5bb177d39 | [
"Unlicense"
] | null | null | null | src/navi/web/page.py | project-capo/app-drive-and-visualize | 05305c3bdc23769e259cdb82b3a4fac5bb177d39 | [
"Unlicense"
] | null | null | null | src/navi/web/page.py | project-capo/app-drive-and-visualize | 05305c3bdc23769e259cdb82b3a4fac5bb177d39 | [
"Unlicense"
] | null | null | null | import logging
import os
from flask import Flask
_STOP = '/stop'
logging.basicConfig()
_pwd = os.path.abspath(__file__)
for i in range(4):
_pwd = os.path.dirname(_pwd)
_pwd += '/web'
_app_flask = Flask(__name__, template_folder=_pwd, static_folder=os.path.join(_pwd, 'static'), static_url_path='')
_global = ... | 25.385321 | 114 | 0.674738 | import logging
import urllib2
from navi.app import main
import os
from flask import Flask, render_template
from flask import request
_STOP = '/stop'
logging.basicConfig()
_pwd = os.path.abspath(__file__)
for i in range(4):
_pwd = os.path.dirname(_pwd)
_pwd += '/web'
_app_flask = Flask(__name__, template_fol... | 0 | 1,524 | 0 | 0 | 0 | 548 | 0 | 18 | 343 |
ed3ca9d40e64c12cb053908538d2c86d106623a8 | 340 | py | Python | hostel_project/hostel_webapp/migrations/0006_remove_complaint_complaint_pic.py | Saptashrungi/hostel-web-app | b5a7ad7b553e306fff2d27e607a13c1a410c5bef | [
"MIT"
] | null | null | null | hostel_project/hostel_webapp/migrations/0006_remove_complaint_complaint_pic.py | Saptashrungi/hostel-web-app | b5a7ad7b553e306fff2d27e607a13c1a410c5bef | [
"MIT"
] | 12 | 2020-08-18T08:06:40.000Z | 2021-09-22T19:32:06.000Z | hostel_project/hostel_webapp/migrations/0006_remove_complaint_complaint_pic.py | Saptashrungi/hostel-web-app | b5a7ad7b553e306fff2d27e607a13c1a410c5bef | [
"MIT"
] | 4 | 2020-08-03T06:49:44.000Z | 2020-08-03T20:05:24.000Z | # Generated by Django 3.0.8 on 2020-11-26 11:27
| 18.888889 | 49 | 0.605882 | # Generated by Django 3.0.8 on 2020-11-26 11:27
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hostel_webapp', '0005_student_avatar'),
]
operations = [
migrations.RemoveField(
model_name='complaint',
name='complaint_pic... | 0 | 0 | 0 | 234 | 0 | 0 | 0 | 11 | 46 |
84afac68182529c21cd89fdb14ca16636dc5a4f2 | 4,083 | py | Python | task/views.py | annstella/Awards | a83c6552048a3d36ae28e9efef148359641af0ea | [
"MIT"
] | null | null | null | task/views.py | annstella/Awards | a83c6552048a3d36ae28e9efef148359641af0ea | [
"MIT"
] | null | null | null | task/views.py | annstella/Awards | a83c6552048a3d36ae28e9efef148359641af0ea | [
"MIT"
] | null | null | null |
# Create your views here.
# def task(request):
# task = Image.objects.all()
# return render(request, 'all-task/index.html', {"task":task})
| 35.198276 | 106 | 0.678423 | from django.shortcuts import render,redirect
from .email import send_welcome_email
from django.contrib.auth.decorators import login_required
from .forms import NewsLetterForm
from .forms import NewProjectsForm
from .models import Profile , Projects
from rest_framework.response import Response
from rest_framework.views ... | 0 | 1,311 | 0 | 1,042 | 0 | 989 | 0 | 211 | 380 |
21e97797e6770c11e073969b7a1b8d11248d89c7 | 170 | py | Python | src/othello/__init__.py | upnt/othello-python | 1b7d73006ef25b6d52f7d2b1a42e90e9d99521ee | [
"Apache-2.0"
] | null | null | null | src/othello/__init__.py | upnt/othello-python | 1b7d73006ef25b6d52f7d2b1a42e90e9d99521ee | [
"Apache-2.0"
] | null | null | null | src/othello/__init__.py | upnt/othello-python | 1b7d73006ef25b6d52f7d2b1a42e90e9d99521ee | [
"Apache-2.0"
] | null | null | null | __version__ = '1.0.0'
__author__ = 'upnt'
__author_email__ = 'base.shun0329@gmail.com'
__url__ = 'https://github.com/upnt/othello-python'
| 34 | 62 | 0.6 | __version__ = '1.0.0'
__author__ = 'upnt'
__author_email__ = 'base.shun0329@gmail.com'
__url__ = 'https://github.com/upnt/othello-python'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
62ee6fcd2001b6b4f497fe90a14337cb91575a54 | 557 | py | Python | entree/projects/__init__.py | frenticb/pyproject | 23c4eae8ad3a1d805075483ba978bd5285c3d816 | [
"MIT"
] | null | null | null | entree/projects/__init__.py | frenticb/pyproject | 23c4eae8ad3a1d805075483ba978bd5285c3d816 | [
"MIT"
] | 37 | 2018-02-26T19:19:58.000Z | 2021-06-01T21:20:17.000Z | entree/projects/__init__.py | frenticb/pyproject | 23c4eae8ad3a1d805075483ba978bd5285c3d816 | [
"MIT"
] | 1 | 2018-06-03T16:14:32.000Z | 2018-06-03T16:14:32.000Z | '''
.. module:: entree.projects
.. moduleauthor:: Julien Spronck
.. created:: Feb 2018
Module for all projects
'''
from entree.projects.base import ProjectBase
CLASSES = ProjectBase.__subclasses__()
CLASS_LONG_NAMES = sorted([pcls.project_long_name for pcls in CLASSES])
CLASSES = {pcls.__name__.lower(): pcls for pcl... | 29.315789 | 71 | 0.800718 | '''
.. module:: entree.projects
.. moduleauthor:: Julien Spronck
.. created:: Feb 2018
Module for all projects
'''
from entree.projects.base import ProjectBase
from entree.projects.flask import Flask
from entree.projects.flask_large import FlaskLarge
from entree.projects.html5 import HTML5
from entree.projects.python... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 110 |
4babf04e8a956ac4c48d3030c028c911aa4319d5 | 12,560 | py | Python | gym/common/entity.py | intrig-unicamp/gym | 044be41236502ebde64427c3e1fff53bfff34aa2 | [
"Apache-2.0"
] | 8 | 2019-02-13T17:17:50.000Z | 2021-08-17T12:32:42.000Z | gym/common/entity.py | intrig-unicamp/gym | 044be41236502ebde64427c3e1fff53bfff34aa2 | [
"Apache-2.0"
] | 2 | 2017-09-18T03:06:29.000Z | 2019-07-30T23:59:34.000Z | gym/common/entity.py | intrig-unicamp/gym | 044be41236502ebde64427c3e1fff53bfff34aa2 | [
"Apache-2.0"
] | 2 | 2018-07-03T11:03:28.000Z | 2020-03-12T17:20:11.000Z | import logging
logger = logging.getLogger(__name__)
| 36.091954 | 120 | 0.557166 | import logging
import asyncio
from gym.common.profiler.profiler import Profiler
from gym.common.identity import Peers, Identity
from gym.common.mailing import Mailing
from gym.common.messages import Message, rpc_map, Hello, Info
from gym.common.events import EventBase, EventGreetings, EventMsg
logger = logging.getLo... | 0 | 1,656 | 1,967 | 8,138 | 0 | 393 | 0 | 148 | 202 |
7ab2679c1fafb8596a02aa58bd313d147fc4510d | 204 | py | Python | heartandsole/__init__.py | jannster/heartandsole | af5843ca82b3671002098c527a4437a858f2be1c | [
"MIT"
] | 9 | 2019-12-13T04:36:30.000Z | 2022-02-02T20:57:31.000Z | heartandsole/__init__.py | jannster/heartandsole | af5843ca82b3671002098c527a4437a858f2be1c | [
"MIT"
] | 5 | 2019-12-10T00:39:44.000Z | 2021-06-22T14:12:51.000Z | heartandsole/__init__.py | jannster/heartandsole | af5843ca82b3671002098c527a4437a858f2be1c | [
"MIT"
] | 4 | 2020-06-15T14:15:49.000Z | 2022-02-06T09:06:20.000Z |
__version__ = '0.0.23'
# __all__ = [
# 'Activity',
# ]
| 20.4 | 72 | 0.779412 | from heartandsole.core.activity import Activity
import heartandsole.api
from heartandsole.util import time_from_timestring, timestring_from_time
__version__ = '0.0.23'
# __all__ = [
# 'Activity',
# ]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 67 |
0d48a23c4b862d75e2efca78f49c3ac88e908396 | 103 | py | Python | chip8/__main__.py | NunoMCSilva/CHIP-8-Emulator | 52d9f5e6434134e2b10c93cc96b2f94ddd4fbb15 | [
"MIT"
] | null | null | null | chip8/__main__.py | NunoMCSilva/CHIP-8-Emulator | 52d9f5e6434134e2b10c93cc96b2f94ddd4fbb15 | [
"MIT"
] | 4 | 2021-06-08T20:35:35.000Z | 2022-03-12T00:08:23.000Z | chip8/__main__.py | NunoMCSilva/CHIP-8-Emulator | 52d9f5e6434134e2b10c93cc96b2f94ddd4fbb15 | [
"MIT"
] | null | null | null | # TODO: add docstrings
from chip8.presenter import Presenter
presenter = Presenter()
presenter.run()
| 14.714286 | 37 | 0.776699 | # TODO: add docstrings
from chip8.presenter import Presenter
presenter = Presenter()
presenter.run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b7d0c9723d069cad25e27191fd8aacf8513fc112 | 605 | py | Python | test_rosyaml/scripts/get_all_params.py | TheProjectsGuy/Learning-ROS-Intermediate | 31b18e64a34aac09a36610ccc71525d1fd16d8b1 | [
"MIT"
] | null | null | null | test_rosyaml/scripts/get_all_params.py | TheProjectsGuy/Learning-ROS-Intermediate | 31b18e64a34aac09a36610ccc71525d1fd16d8b1 | [
"MIT"
] | null | null | null | test_rosyaml/scripts/get_all_params.py | TheProjectsGuy/Learning-ROS-Intermediate | 31b18e64a34aac09a36610ccc71525d1fd16d8b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
if __name__ == "__main__":
try:
main()
except Exception as exc:
print("Exception occurred: ", exc)
| 30.25 | 99 | 0.652893 | #!/usr/bin/env python
import rospy
def main():
# Initialize the node
rospy.init_node("PY_list_ROSPARAM")
# Get the list of parameters
param_names = rospy.get_param_names()
# Print out the results
rospy.loginfo("Found the {l} parameters".format(l = len(param_names)))
for i, param in enumerat... | 0 | 0 | 0 | 0 | 0 | 423 | 0 | -9 | 45 |
44309d55bd80e6bb6f4866f5f03770d20a252213 | 434 | py | Python | custom/icds_reports/migrations/0128_nic_indicators.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0128_nic_indicators.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0128_nic_indicators.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 1.11.16 on 2019-07-11
from corehq.sql_db.operations import RawSQLMigration
migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views'))
| 24.111111 | 103 | 0.714286 | # Generated by Django 1.11.16 on 2019-07-11
from django.db import migrations
from corehq.sql_db.operations import RawSQLMigration
migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views'))
class Migration(migrations.Migration):
dependencies = [
('icds_report... | 0 | 0 | 0 | 174 | 0 | 0 | 0 | 11 | 46 |
eec446c78255934634d7b42981a3b529ff2f1e6f | 1,754 | py | Python | bb-master/sandbox/lib/python3.5/site-packages/buildbot/plugins/__init__.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 2 | 2017-07-11T18:56:27.000Z | 2017-07-28T14:01:12.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/plugins/__init__.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 1 | 2017-07-28T13:53:41.000Z | 2017-07-31T15:30:40.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/plugins/__init__.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | null | null | null | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 37.319149 | 79 | 0.769669 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11e30a736481ac58b5aa1363dfaa94fe8ea86504 | 8,315 | py | Python | huskar_sdk_v2/bootstrap/components/switch.py | mozillazg/huskar-python | f62a2d3636b2804a552bf59f76903cf2841d75c9 | [
"MIT"
] | 5 | 2019-09-29T03:09:31.000Z | 2019-11-01T15:38:26.000Z | huskar_sdk_v2/bootstrap/components/switch.py | mozillazg/huskar-python | f62a2d3636b2804a552bf59f76903cf2841d75c9 | [
"MIT"
] | 4 | 2019-09-27T03:58:55.000Z | 2019-09-27T06:34:10.000Z | huskar_sdk_v2/bootstrap/components/switch.py | mozillazg/huskar-python | f62a2d3636b2804a552bf59f76903cf2841d75c9 | [
"MIT"
] | 4 | 2019-09-27T06:03:30.000Z | 2019-10-23T09:54:08.000Z | from __future__ import absolute_import
| 36.629956 | 79 | 0.589176 | from __future__ import absolute_import
import time
import random
import functools
from huskar_sdk_v2.six import iteritems
from huskar_sdk_v2.utils import (
combine, decode_key, encode_key, get_function_name)
from huskar_sdk_v2.consts import CACHE_KEYS, SWITCH_SUBDOMAIN
from . import SignalComponent, Watchable, re... | 0 | 2,385 | 0 | 5,569 | 0 | 0 | 0 | 142 | 179 |
af39fbfeb52c5b76539e110094bad9e5420a565f | 701 | py | Python | baseadmin/components/system/actions/master.py | christophevg/baseAdmin | c5fd74886457197e079f0c3f3cde020f039c3bf0 | [
"MIT"
] | 2 | 2021-05-26T11:42:40.000Z | 2021-05-26T15:28:03.000Z | baseadmin/components/system/actions/master.py | christophevg/baseAdmin | c5fd74886457197e079f0c3f3cde020f039c3bf0 | [
"MIT"
] | 1 | 2020-02-12T13:40:40.000Z | 2020-02-12T14:10:50.000Z | baseadmin/components/system/actions/master.py | christophevg/baseadmin | c5fd74886457197e079f0c3f3cde020f039c3bf0 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
import os
from baseadmin.backend.interface import register_component
# add component UI
register_component("SystemActions.js", os.path.dirname(__file__))
# respond to system actions
| 21.90625 | 65 | 0.736091 | import logging
logger = logging.getLogger(__name__)
import os
from baseadmin.backend.interface import register_component
from baseadmin.backend.socketio import command
# add component UI
register_component("SystemActions.js", os.path.dirname(__file__))
# respond to system actions
@command("reboot")
def on_reboot... | 0 | 345 | 0 | 0 | 0 | 0 | 0 | 26 | 91 |
bfb326a4450722e60405d4f4f6f684d02b073a02 | 2,123 | py | Python | software/pynguin/tests/testcase/statements/test_assignmentstatement.py | se2p/artifact-pynguin-ssbse2020 | 32b5f4d27ef1b81e5c541471e98fa6e50f5ce8a6 | [
"CC-BY-4.0"
] | 3 | 2020-08-20T10:27:13.000Z | 2021-11-02T20:28:16.000Z | software/pynguin/tests/testcase/statements/test_assignmentstatement.py | se2p/artifact-pynguin-ssbse2020 | 32b5f4d27ef1b81e5c541471e98fa6e50f5ce8a6 | [
"CC-BY-4.0"
] | null | null | null | software/pynguin/tests/testcase/statements/test_assignmentstatement.py | se2p/artifact-pynguin-ssbse2020 | 32b5f4d27ef1b81e5c541471e98fa6e50f5ce8a6 | [
"CC-BY-4.0"
] | null | null | null | # This file is part of Pynguin.
#
# Pynguin is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pynguin is distributed in the ho... | 37.245614 | 85 | 0.783797 | # This file is part of Pynguin.
#
# Pynguin is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pynguin is distributed in the ho... | 0 | 0 | 0 | 0 | 0 | 1,165 | 0 | 96 | 182 |
582fe3c20d4efff7081ea9b9d5861a821fada022 | 813 | py | Python | contact_manager/urls.py | ConnorH2582/sample-proj | 043b76106e3b3484cbf9ada31d8274e9d5ea64bf | [
"MIT"
] | null | null | null | contact_manager/urls.py | ConnorH2582/sample-proj | 043b76106e3b3484cbf9ada31d8274e9d5ea64bf | [
"MIT"
] | null | null | null | contact_manager/urls.py | ConnorH2582/sample-proj | 043b76106e3b3484cbf9ada31d8274e9d5ea64bf | [
"MIT"
] | null | null | null | from django.conf.urls import url, patterns
from contact_manager.views import IndexView, CreateEventView, EventProfileView, CreateContactView, ContactProfileView, ContactSearchView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^new_event/$', CreateEventView.as_view(), name='cre... | 62.538462 | 131 | 0.707257 | from django.conf.urls import include, url, patterns
from django.contrib import admin
from contact_manager.views import IndexView,CreateEventView,EventProfileView,CreateContactView,ContactProfileView,ContactSearchView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^new_event/$',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 22 |
164ba198d86f7f38eb7b519f5057bfd9c369710b | 1,329 | py | Python | lib/datasets/factory.py | xctspring/iter-reason | 96e84482ea05131d69a43533cf3e3c10e99ff22b | [
"MIT"
] | 275 | 2018-03-31T20:50:02.000Z | 2021-12-15T14:39:02.000Z | lib/datasets/factory.py | xctspring/iter-reason | 96e84482ea05131d69a43533cf3e3c10e99ff22b | [
"MIT"
] | 12 | 2018-04-02T06:37:47.000Z | 2021-06-21T12:57:12.000Z | lib/datasets/factory.py | xctspring/iter-reason | 96e84482ea05131d69a43533cf3e3c10e99ff22b | [
"MIT"
] | 41 | 2018-04-01T03:31:35.000Z | 2020-01-16T06:52:27.000Z | """Factory method for easily getting imdbs by name."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__sets = {}
from datasets.coco import coco
from datasets.ade import ade
from datasets.visual_genome import visual_genome
# Set up coco_2014_<split>
for ye... | 28.891304 | 74 | 0.685478 | """Factory method for easily getting imdbs by name."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__sets = {}
from datasets.coco import coco
from datasets.ade import ade
from datasets.visual_genome import visual_genome
import numpy as np
# Set up coco... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
b0ccf531cfab6c9c4a503a8b46e7c6adcacdc203 | 1,336 | py | Python | tests/base.py | abdghani995/docker-falcon | 6e552a23c3dcc7210083cbe049a7ffbd13a888b1 | [
"MIT"
] | 19 | 2019-12-14T20:21:03.000Z | 2021-08-11T07:38:42.000Z | tests/base.py | abdghani995/docker-falcon | 6e552a23c3dcc7210083cbe049a7ffbd13a888b1 | [
"MIT"
] | 2 | 2018-05-14T23:05:11.000Z | 2021-11-21T19:32:08.000Z | tests/base.py | vvitsenets/VICTORIA | 843ad6cc1ecec8b0fb424263de37691454cd2b4e | [
"MIT"
] | 4 | 2019-12-15T05:59:57.000Z | 2022-03-05T08:03:04.000Z |
import falcon
import app.util.json as json
| 29.688889 | 66 | 0.627246 | import unittest
import falcon
import falcon.testing
import app.util.json as json
from app import create_app
class TestBase(unittest.TestCase):
def setUp(self):
self.app = create_app()
self.srmock = falcon.testing.StartResponseMock()
def simulate_request(self, path, *args, **kwargs):
... | 0 | 0 | 0 | 1,202 | 0 | 0 | 0 | -1 | 89 |
8254185427251e09c47a2fe652536c31a15ea5bd | 12,587 | py | Python | naklibsrc/src/applications/TS_protobuf/py/orchestrator.py | murphyj8/testNakStructure | fbd9fc0784b6b7ee3b176cb28d2b6e26abd2b48a | [
"Unlicense"
] | 1 | 2021-07-01T02:01:27.000Z | 2021-07-01T02:01:27.000Z | naklibsrc/src/applications/TS_protobuf/py/orchestrator.py | murphyj8/testNakStructure | fbd9fc0784b6b7ee3b176cb28d2b6e26abd2b48a | [
"Unlicense"
] | 1 | 2020-09-23T12:34:34.000Z | 2020-09-23T12:34:34.000Z | naklibsrc/src/applications/TS_protobuf/py/orchestrator.py | murphyj8/testNakStructure | fbd9fc0784b6b7ee3b176cb28d2b6e26abd2b48a | [
"Unlicense"
] | null | null | null |
from __future__ import print_function
#==========================================================================
# Example Server Code
# NB: this is example code only. Does not cover
# - authentication,
# - security,
# - timer events
# - maintaining active connections (Player disconne... | 32.524548 | 104 | 0.519981 |
from __future__ import print_function
import uuid
#==========================================================================
# Example Server Code
# NB: this is example code only. Does not cover
# - authentication,
# - security,
# - timer events
# - maintaining active connections (Pl... | 0 | 0 | 0 | 11,848 | 0 | 0 | 0 | -10 | 69 |
7b0e7026f78ad681786f372c71952e3ac14c46b3 | 4,849 | py | Python | NPRA_Data_Plot/create_plots.py | HighwayFlocking/HighwayFlocking | e870579d11574f5789162481219e771610f8b721 | [
"ECL-2.0",
"Apache-2.0"
] | 44 | 2015-06-11T14:39:26.000Z | 2021-05-21T11:06:47.000Z | NPRA_Data_Plot/create_plots.py | HighwayFlocking/HighwayFlocking | e870579d11574f5789162481219e771610f8b721 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-06-12T07:32:58.000Z | 2018-05-27T07:04:52.000Z | NPRA_Data_Plot/create_plots.py | HighwayFlocking/HighwayFlocking | e870579d11574f5789162481219e771610f8b721 | [
"ECL-2.0",
"Apache-2.0"
] | 8 | 2015-06-11T15:19:08.000Z | 2019-10-08T13:18:52.000Z | # Copyright 2015 Sindre Ilebekk Johansen and Andreas Slgedal Lvland
# 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 appl... | 33.673611 | 167 | 0.63972 | # Copyright 2015 Sindre Ilebekk Johansen and Andreas Sløgedal Løvland
# 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 ap... | 4 | 0 | 0 | 0 | 0 | 2,101 | 0 | 0 | 69 |
33534c898eb2f544436ed9093a8d2bcefb7fa7f2 | 19,509 | py | Python | zedboard_python/sidh_constants.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | 7 | 2020-01-15T13:36:37.000Z | 2021-04-10T02:54:28.000Z | zedboard_python/sidh_constants.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | null | null | null | zedboard_python/sidh_constants.py | pmassolino/hw-sike | 1fee8af81dcc3d0dcc57bc656e06acc6adf810a1 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Implementation by Pedro Maat C. Massolino,
# hereby denoted as "the implementer".
#
# To the extent possible under law, the implementer has waived all copyright
# and related or neighboring rights to the source code in this file.
# http://creativecommons.org/publicdomain/zero/1.0/
#
... | 58.939577 | 920 | 0.713414 | # -*- coding: utf-8 -*-
# Implementation by Pedro Maat C. Massolino,
# hereby denoted as "the implementer".
#
# To the extent possible under law, the implementer has waived all copyright
# and related or neighboring rights to the source code in this file.
# http://creativecommons.org/publicdomain/zero/1.0/
#
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6995f3cf72c96c3de17717ce097f1984891653a9 | 8,497 | py | Python | src/clusterfuzz/_internal/tests/core/bot/tasks/trials_test.py | quanyangsc/clusterfuzz | 5b5800dbb6abe5643d4fced8bd6e61414c628828 | [
"Apache-2.0"
] | null | null | null | src/clusterfuzz/_internal/tests/core/bot/tasks/trials_test.py | quanyangsc/clusterfuzz | 5b5800dbb6abe5643d4fced8bd6e61414c628828 | [
"Apache-2.0"
] | null | null | null | src/clusterfuzz/_internal/tests/core/bot/tasks/trials_test.py | quanyangsc/clusterfuzz | 5b5800dbb6abe5643d4fced8bd6e61414c628828 | [
"Apache-2.0"
] | null | null | null | # 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, ... | 40.655502 | 94 | 0.68177 | # 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 | 7,490 | 0 | 0 | 0 | 0 | 0 | 198 | 180 |
219920dcbd6dc557b861778546a5ec3692ce88b4 | 1,669 | py | Python | main.py | phung001/LicensePlateAnalysis | 44843bd5043ad6d787043b93a52fb293a90e4d52 | [
"OML",
"Xnet",
"Linux-OpenIB",
"FTL",
"X11"
] | 1 | 2017-01-23T12:22:31.000Z | 2017-01-23T12:22:31.000Z | main.py | phung001/LicensePlateAnalysis | 44843bd5043ad6d787043b93a52fb293a90e4d52 | [
"OML",
"Xnet",
"Linux-OpenIB",
"FTL",
"X11"
] | null | null | null | main.py | phung001/LicensePlateAnalysis | 44843bd5043ad6d787043b93a52fb293a90e4d52 | [
"OML",
"Xnet",
"Linux-OpenIB",
"FTL",
"X11"
] | null | null | null | #open files for reading
inFile = open("inFile.txt", "r")
inFile2 = open("stolen.txt", "r")
#initialize dictionary
D = {}
for line in inFile:
#find lines with 7 characters for the license plates and store into dictionary
#dictionary holds total percentage and total occurences
if line[4] == '-':
... | 26.492063 | 82 | 0.56441 | #open files for reading
inFile = open("inFile.txt", "r")
inFile2 = open("stolen.txt", "r")
#initialize dictionary
D = {}
for line in inFile:
#find lines with 7 characters for the license plates and store into dictionary
#dictionary holds total percentage and total occurences
if line[4] == '-':
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
66d22c0fb3b12d0e3a0818f362d23b33ae9f0b6b | 1,040 | py | Python | primerDesign/bloM8filter.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | primerDesign/bloM8filter.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | primerDesign/bloM8filter.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
1. blo m8 format output
2. query file length
3. allowed mismatch
'''
from sys import argv
from collections import defaultdict
try:
blom8f = open(argv[1])
lenf = open(argv[2])
allowedMM = int(argv[3])
except:
exit(__doc__)
lenD = defaultdict(int)
for l in lenf:
segs... | 19.622642 | 59 | 0.582692 | #!/usr/bin/python
'''
1. blo m8 format output
2. query file length
3. allowed mismatch
'''
from sys import argv
from collections import defaultdict
try:
blom8f = open(argv[1])
lenf = open(argv[2])
allowedMM = int(argv[3])
except:
exit(__doc__)
lenD = defaultdict(int)
for l in lenf:
segs... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3fc1eaeb9d24d354feb5ffc47b5ab3029d1ae8e0 | 7,940 | py | Python | speedy_mind/data_handler/preprocess.py | microsoft/SpeedyRec | 1186120f8c5ee8c904676bb2f19892d064c984e6 | [
"MIT"
] | 23 | 2021-03-29T03:08:27.000Z | 2022-01-19T06:41:19.000Z | speedy_mind/data_handler/preprocess.py | microsoft/SpeedyRec | 1186120f8c5ee8c904676bb2f19892d064c984e6 | [
"MIT"
] | 3 | 2021-11-29T04:03:38.000Z | 2022-01-19T08:57:54.000Z | speedy_mind/data_handler/preprocess.py | microsoft/SpeedyRec | 1186120f8c5ee8c904676bb2f19892d064c984e6 | [
"MIT"
] | 2 | 2021-04-13T07:26:32.000Z | 2021-09-13T12:16:50.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
| 36.930233 | 116 | 0.635894 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import numpy as np
import pickle
from tqdm import tqdm
import os
import logging
import torch
from torch.utils.data import Dataset, DataLoader
from utility.utils import MODEL_CLASSES
class NewsInfo:
def __init__(self, args, mode='train', ca... | 0 | 0 | 0 | 3,057 | 0 | 4,516 | 0 | 6 | 270 |
fa4cd8937291ab2af596382bea343af85caeceaf | 14,504 | py | Python | src/oscarapicheckout/serializers.py | Balu-Varanasi/django-oscar-api-checkout | 7a36bf236ebe91b562dc4afdc0e65afd74bdb43d | [
"0BSD"
] | null | null | null | src/oscarapicheckout/serializers.py | Balu-Varanasi/django-oscar-api-checkout | 7a36bf236ebe91b562dc4afdc0e65afd74bdb43d | [
"0BSD"
] | null | null | null | src/oscarapicheckout/serializers.py | Balu-Varanasi/django-oscar-api-checkout | 7a36bf236ebe91b562dc4afdc0e65afd74bdb43d | [
"0BSD"
] | null | null | null | from oscar.core.loading import get_model, get_class
Basket = get_model('basket', 'Basket')
Order = get_model('order', 'Order')
BillingAddress = get_model('order', 'BillingAddress')
ShippingAddress = get_model('order', 'ShippingAddress')
OrderTotalCalculator = get_class('checkout.calculators', 'OrderTotalCalculator')
... | 39.628415 | 141 | 0.657198 | from collections import OrderedDict
from decimal import Decimal
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.db import transaction
from django.utils import six
from django.utils.module_loading import import_string
from django.utils.translation import ug... | 0 | 1,193 | 0 | 12,051 | 0 | 0 | 0 | 442 | 489 |
6bf3aa26da24a385b2d78e5c86fc52563ed6dfb8 | 316 | py | Python | examples/partitioner.py | Kami/tooz | 2ac3ef36d2687f820cb44f6b27dd81ebf1c4165b | [
"Apache-2.0"
] | null | null | null | examples/partitioner.py | Kami/tooz | 2ac3ef36d2687f820cb44f6b27dd81ebf1c4165b | [
"Apache-2.0"
] | null | null | null | examples/partitioner.py | Kami/tooz | 2ac3ef36d2687f820cb44f6b27dd81ebf1c4165b | [
"Apache-2.0"
] | null | null | null | from tooz import coordination
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
partitioner = coordinator.join_partitioned_group("group1")
# Returns {'host-1'}
member = partitioner.members_for_object(object())
coordinator.leave_partitioned_group(partitioner)
coordinator.stop()
| 26.333333 | 64 | 0.800633 | from tooz import coordination
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
partitioner = coordinator.join_partitioned_group("group1")
# Returns {'host-1'}
member = partitioner.members_for_object(object())
coordinator.leave_partitioned_group(partitioner)
coordinator.stop()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5df672b54ea24287fbb146178409e68b3c5132e3 | 369 | py | Python | src/9-learn_program.py | paramraghavan/beginners-py-learn | 120db42b3ad304915d5be172f4ebc555ef2cb405 | [
"MIT"
] | null | null | null | src/9-learn_program.py | paramraghavan/beginners-py-learn | 120db42b3ad304915d5be172f4ebc555ef2cb405 | [
"MIT"
] | null | null | null | src/9-learn_program.py | paramraghavan/beginners-py-learn | 120db42b3ad304915d5be172f4ebc555ef2cb405 | [
"MIT"
] | null | null | null | '''
Roll your dice
'''
# to get help
help(str.split)
import random
x= ''
while x != 'xit':
'''
randint - A random integer takes in range [start, end] including the end points.
every time we execute randint it will give random values from 1 thru 6 including 1 and 6
'''
print(random.randint(1, 6))
... | 20.5 | 92 | 0.647696 | '''
Roll your dice
'''
# to get help
help(str.split)
import random
x= ''
while x != 'xit':
'''
randint - A random integer takes in range [start, end] including the end points.
every time we execute randint it will give random values from 1 thru 6 including 1 and 6
'''
print(random.randint(1, 6))
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1191dc78c5777e199a6ed074d2639ae5a5e8ef4b | 91 | py | Python | tests/test_train/conftest.py | jvrana/pyro-graphnets | 1c9809253e47414ecf3f6604c2147d5676ff76c0 | [
"MIT"
] | null | null | null | tests/test_train/conftest.py | jvrana/pyro-graphnets | 1c9809253e47414ecf3f6604c2147d5676ff76c0 | [
"MIT"
] | null | null | null | tests/test_train/conftest.py | jvrana/pyro-graphnets | 1c9809253e47414ecf3f6604c2147d5676ff76c0 | [
"MIT"
] | null | null | null | """test_train/conftest.py.
Tests blocks and networks are differentiable and trainable
"""
| 18.2 | 58 | 0.78022 | """test_train/conftest.py.
Tests blocks and networks are differentiable and trainable
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b6161267ef2c48ae5c81400aef8615b687c525bb | 2,319 | py | Python | nightwatch_imax/watcher.py | maplejune/nightwatch-imax | ac51e4a9216f58723606aec44ce6e77ff1c27f11 | [
"MIT"
] | 10 | 2015-04-20T10:31:30.000Z | 2019-04-03T13:20:15.000Z | nightwatch_imax/watcher.py | aiqu/nightwatch-imax | ac51e4a9216f58723606aec44ce6e77ff1c27f11 | [
"MIT"
] | 1 | 2018-04-15T15:51:26.000Z | 2018-04-16T13:58:24.000Z | nightwatch_imax/watcher.py | aiqu/nightwatch-imax | ac51e4a9216f58723606aec44ce6e77ff1c27f11 | [
"MIT"
] | 2 | 2019-03-15T15:29:01.000Z | 2020-08-26T00:24:23.000Z | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
| 30.116883 | 116 | 0.705045 | # -*- coding: utf-8 -*-
import logging
import os
import re
import arrow
import requests
from bs4 import BeautifulSoup
from nightwatch_imax.movie import is_imax_movie
from nightwatch_imax.schedule import create_schedule_info, save_schedule_list
def is_cgv_online():
try:
health_check = requests.get('http:... | 0 | 0 | 0 | 0 | 0 | 1,916 | 0 | 51 | 248 |
9548ad4ba6489c51de03cac818d88ffc269d710e | 2,661 | py | Python | GUI.py | waterpepene/Password-Generator | ff849d1f9ffda441f49608e1ffd29900d0dbeedd | [
"MIT"
] | null | null | null | GUI.py | waterpepene/Password-Generator | ff849d1f9ffda441f49608e1ffd29900d0dbeedd | [
"MIT"
] | null | null | null | GUI.py | waterpepene/Password-Generator | ff849d1f9ffda441f49608e1ffd29900d0dbeedd | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
sg.theme('DarkBlue16')
pw = ""
b64Img = b'iVBORw0KGgoAAAANSUhEUgAAAC8AAAAtCAYAAAA+7zKnAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxMAAAsTAQCanBgAAANpSURBVGhDzZlbSBVBGMd3SzO60wUigoqoh4goiiCIkkKiIBCV5Gh0ewgCK3qLKILo8hZIV+glo7weRUqyMIp8K8wKioiEgiyoh8IyUbxsv29nk3M8xzyXmfH84M/MN0fc/8x+M... | 73.916667 | 1,320 | 0.784292 | import PySimpleGUI as sg
sg.theme('DarkBlue16')
pw = ""
b64Img = b'iVBORw0KGgoAAAANSUhEUgAAAC8AAAAtCAYAAAA+7zKnAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxMAAAsTAQCanBgAAANpSURBVGhDzZlbSBVBGMd3SzO60wUigoqoh4goiiCIkkKiIBCV5Gh0ewgCK3qLKILo8hZIV+glo7weRUqyMIp8K8wKioiEgiyoh8IyUbxsv29nk3M8xzyXmfH84M/MN0fc/8x+M... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
60bd041ac2dfa2ebfbbec3c4d4971e1d3f28e1d4 | 662 | py | Python | encoders.py | dakoner/rpi_balance_bot | 7ca013924c486548f6a87ae30cce5ff5e0082c0f | [
"BSD-3-Clause"
] | null | null | null | encoders.py | dakoner/rpi_balance_bot | 7ca013924c486548f6a87ae30cce5ff5e0082c0f | [
"BSD-3-Clause"
] | null | null | null | encoders.py | dakoner/rpi_balance_bot | 7ca013924c486548f6a87ae30cce5ff5e0082c0f | [
"BSD-3-Clause"
] | null | null | null | import pigpio
_pi = pigpio.pi()
if not _pi.connected:
raise IOError("Can't connect to pigpio")
DECODER_LEFT_PINS = (20,21)
DECODER_RIGHT_PINS = (19,16)
| 27.583333 | 82 | 0.678248 | import pigpio
from read_encoder import decoder
_pi = pigpio.pi()
if not _pi.connected:
raise IOError("Can't connect to pigpio")
DECODER_LEFT_PINS = (20,21)
DECODER_RIGHT_PINS = (19,16)
class EncoderCallback:
def __init__(self, name):
self.name = name
self.pos = 0
def callback(self... | 0 | 0 | 0 | 426 | 0 | 0 | 0 | 11 | 67 |
7adbf189e2316fd64ffe9491777d40630dad841d | 597 | py | Python | codigos/fft_audio.py | Rosulen/python_dsp | 32f853cb568765e52f222e739dda7940970c31db | [
"Xnet",
"X11"
] | null | null | null | codigos/fft_audio.py | Rosulen/python_dsp | 32f853cb568765e52f222e739dda7940970c31db | [
"Xnet",
"X11"
] | null | null | null | codigos/fft_audio.py | Rosulen/python_dsp | 32f853cb568765e52f222e739dda7940970c31db | [
"Xnet",
"X11"
] | null | null | null | import scipy.io.wavfile as wavfile
import matplotlib.pylab as plt
import numpy as np
from scipy.fft import fft, fftfreq
from playsound import playsound
## Reproducir audio
playsound('/home/angie/Git/python_dsp/alejandro.wav')
## trear, extraer y grficar los datos de audio
fs, data = wavfile.read("alejandro.wav")
p... | 19.258065 | 53 | 0.713568 | import pyaudio
import scipy.io.wavfile as wavfile
import matplotlib.pylab as plt
import numpy as np
import wave
from scipy.fft import fft, fftfreq
from playsound import playsound
## Reproducir audio
playsound('/home/angie/Git/python_dsp/alejandro.wav')
## trear, extraer y gráficar los datos de audio
fs, data = wavfi... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | -17 | 44 |
7f72fd26cccb7b9136e6c01c09fa1dd979b529c8 | 632 | py | Python | coppeliaView.py | craigiedon/manipulation-playground | 2a6f3cac0f51f96955e2fdf18635df0a0985840f | [
"MIT"
] | 2 | 2021-04-13T07:19:30.000Z | 2021-05-30T15:10:07.000Z | coppeliaView.py | craigiedon/manipulation-playground | 2a6f3cac0f51f96955e2fdf18635df0a0985840f | [
"MIT"
] | null | null | null | coppeliaView.py | craigiedon/manipulation-playground | 2a6f3cac0f51f96955e2fdf18635df0a0985840f | [
"MIT"
] | 3 | 2021-09-26T04:30:09.000Z | 2022-03-25T14:15:19.000Z | import probRobScene
from pyrep import PyRep
import sys
from probRobScene.wrappers.coppelia.prbCoppeliaWrapper import cop_from_prs
if len(sys.argv) != 2:
print("python3 coppeliaView.py <path-to-scenario-file>")
sys.exit(0)
scenario_file = sys.argv[1]
scenario = probRobScene.scenario_from_file(scenario_file)
... | 23.407407 | 74 | 0.772152 | import probRobScene
from pyrep import PyRep
from pyrep.objects import Camera
import numpy as np
import sys
from probRobScene.wrappers.coppelia.prbCoppeliaWrapper import cop_from_prs
if len(sys.argv) != 2:
print("python3 coppeliaView.py <path-to-scenario-file>")
sys.exit(0)
scenario_file = sys.argv[1]
scenari... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 44 |
02476f64d1cc2e0fdaaf7ae6e37373e3906a2f43 | 5,954 | py | Python | test.py | caitlincoffey/discrete_miniproject_game | f50dbd15d0e3b0b42060f39eb1153d740e276098 | [
"MIT"
] | null | null | null | test.py | caitlincoffey/discrete_miniproject_game | f50dbd15d0e3b0b42060f39eb1153d740e276098 | [
"MIT"
] | null | null | null | test.py | caitlincoffey/discrete_miniproject_game | f50dbd15d0e3b0b42060f39eb1153d740e276098 | [
"MIT"
] | null | null | null | # coding: utf-8
# by Joao Bueno
FR = 30
SIZE = 640, 480
BGCOLOR = (255,255,255)
NODECOLOR = (255,0,255)
NODESIZE = 20,20
GRIDSPACING = 50
MAXTRIES = 1000
STARTINGNODES = 7 #need to eventually get to 20...
# Pattern in Python to make the same module
# be reusable as main program or importable module:
# if the builti... | 36.084848 | 141 | 0.535102 | # coding: utf-8
# by Joao Bueno
from random import randrange, choice
import pygame
FR = 30
SIZE = 640, 480
BGCOLOR = (255,255,255)
NODECOLOR = (255,0,255)
NODESIZE = 20,20
GRIDSPACING = 50
MAXTRIES = 1000
STARTINGNODES = 7 #need to eventually get to 20...
class Graph(object):
def __init__(self):
self.node... | 0 | 0 | 0 | 2,388 | 0 | 2,875 | 0 | 7 | 182 |
355a7553da186759bfc355b83f7b116a22c21769 | 5,829 | py | Python | qualia/nn/modules/module.py | Kashu7100/Qualia | ee295b0e0cff8a7c57244a22d30177491ecfcc4d | [
"MIT"
] | 4 | 2019-01-22T08:05:45.000Z | 2020-11-17T16:12:33.000Z | qualia/nn/modules/module.py | Kashu7100/Qualia | ee295b0e0cff8a7c57244a22d30177491ecfcc4d | [
"MIT"
] | null | null | null | qualia/nn/modules/module.py | Kashu7100/Qualia | ee295b0e0cff8a7c57244a22d30177491ecfcc4d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 37.365385 | 131 | 0.492194 | # -*- coding: utf-8 -*-
from collections import OrderedDict
import numpy as np
import math
import h5py as h5
from ...autograd import Variable
class Module(object):
'''Base class for all neural network modules in qualia.\n
Module can incoporate Modules, allowing to nest them in a tree structure.
... | 0 | 0 | 0 | 5,632 | 0 | 0 | 0 | 8 | 164 |
545c9267456c394ac736ed3a31c3bfd03b6b2738 | 1,862 | py | Python | scripts/xpath.py | MonkeyWaffle0/tradingview_scaper | 83fc346b3f39c4c46bc7da3eff4350c9ba264f16 | [
"MIT"
] | 1 | 2021-12-01T19:35:06.000Z | 2021-12-01T19:35:06.000Z | scripts/xpath.py | MonkeyWaffle0/tradingview_scaper | 83fc346b3f39c4c46bc7da3eff4350c9ba264f16 | [
"MIT"
] | null | null | null | scripts/xpath.py | MonkeyWaffle0/tradingview_scaper | 83fc346b3f39c4c46bc7da3eff4350c9ba264f16 | [
"MIT"
] | 3 | 2021-06-27T19:02:55.000Z | 2022-02-17T11:29:45.000Z | close_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[4]/div[2]"
).text
open_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[... | 40.478261 | 124 | 0.599356 | close_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[4]/div[2]"
).text
open_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5e147aacc743f2ebff7c983c1c00558dc5669afc | 879 | py | Python | setup.py | ZSAIm/PyJSCaller | 086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d | [
"Apache-2.0"
] | 31 | 2019-05-06T03:07:58.000Z | 2022-02-09T02:00:46.000Z | setup.py | zackmark29/PyJSCaller | 086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d | [
"Apache-2.0"
] | 1 | 2019-07-05T12:43:34.000Z | 2019-07-26T08:22:19.000Z | setup.py | zackmark29/PyJSCaller | 086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d | [
"Apache-2.0"
] | 10 | 2019-05-07T06:35:21.000Z | 2021-09-27T02:48:40.000Z |
from setuptools import setup, find_packages
import io
version = '0.2.1'
author = 'ZSAIm'
author_email = 'zzsaim@163.com'
with io.open('README.rst', 'r', encoding='utf-8') as freadme:
long_description = freadme.read()
setup(
name='PyJSCaller',
version=version,
description='Run JavaScript code from P... | 27.46875 | 65 | 0.637088 |
from setuptools import setup, find_packages
import io
version = '0.2.1'
author = 'ZSAIm'
author_email = 'zzsaim@163.com'
with io.open('README.rst', 'r', encoding='utf-8') as freadme:
long_description = freadme.read()
setup(
name='PyJSCaller',
version=version,
description='Run JavaScript code from P... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ea4adaba9d63e6840eb97cd0d2e886bca03043ee | 693 | py | Python | message/services.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | message/services.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | message/services.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 30.130435 | 71 | 0.655123 | import logging
from .backends.email import DjangoEmailBackend
from .models import Message, Messager
from .templates import REGISTER_VERIFY_CODE
from utils.data import guid
logger = logging.getLogger(__name__)
def send_active_mail(user):
if not user.email:
return
message = Message().parse_template(t... | 0 | 0 | 0 | 0 | 0 | 458 | 0 | 69 | 112 |
4bf8d618e2fc695f0c1ce8e759ba710d5bcca48b | 3,595 | py | Python | blitz-repo.py | jroivas/blitz-repos | 9a4f3c737abb4832b6dac1379289b8729b2e40f9 | [
"MIT"
] | null | null | null | blitz-repo.py | jroivas/blitz-repos | 9a4f3c737abb4832b6dac1379289b8729b2e40f9 | [
"MIT"
] | null | null | null | blitz-repo.py | jroivas/blitz-repos | 9a4f3c737abb4832b6dac1379289b8729b2e40f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import sys
import threading
import utils
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Blitz repos')
parser.add_argument('config', type=argparse.FileType('r'), help='Config file as JSON')
parser.add_argument('-f', '--folder', de... | 30.726496 | 106 | 0.609179 | #!/usr/bin/env python
import argparse
import build
import fetcher
import os
import sys
import threading
import time
import utils
def handle_project(name, data, dir_name, args):
utils.print_verb('* Project: %s' % name)
actions = 0
if args['all'] or args['init']:
fetch = fetcher.DataFetcher(name, da... | 0 | 0 | 0 | 0 | 0 | 1,648 | 0 | -26 | 158 |
621bfc3ce69f3145feb0164b5221c8c7b9d0e16e | 1,177 | py | Python | setup.py | damianospark/eazyprofiler | e4d59d5efd416d2394591fbd1705829d7b95d81e | [
"MIT"
] | null | null | null | setup.py | damianospark/eazyprofiler | e4d59d5efd416d2394591fbd1705829d7b95d81e | [
"MIT"
] | null | null | null | setup.py | damianospark/eazyprofiler | e4d59d5efd416d2394591fbd1705829d7b95d81e | [
"MIT"
] | null | null | null | from setuptools import setup
import versioneer
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
requirements = [
# package requirements go here
]
setup(
name='eazyprofiler',
v... | 31.810811 | 166 | 0.691589 | from setuptools import setup
import versioneer
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
requirements = [
# package requirements go here
]
setup(
name='eazyprofiler',
v... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b06e2606ca536c7af852af78c34ff272bd15eb9c | 2,228 | py | Python | perftracker/migrations/0033_artifactlinkmodel_artifactmetamodel.py | istillc0de/perftracker-perfguru | 79d0f1740f4072503ba1bf06b871590de6bcf470 | [
"Apache-2.0"
] | 11 | 2018-03-12T05:40:02.000Z | 2020-01-30T10:13:36.000Z | perftracker/migrations/0033_artifactlinkmodel_artifactmetamodel.py | istillc0de/perftracker-perfguru | 79d0f1740f4072503ba1bf06b871590de6bcf470 | [
"Apache-2.0"
] | 4 | 2019-05-12T18:38:22.000Z | 2020-07-20T07:13:34.000Z | perftracker/migrations/0033_artifactlinkmodel_artifactmetamodel.py | istillc0de/perftracker-perfguru | 79d0f1740f4072503ba1bf06b871590de6bcf470 | [
"Apache-2.0"
] | 25 | 2018-07-19T12:12:09.000Z | 2022-02-15T09:16:31.000Z | # Generated by Django 2.0.3 on 2018-09-30 09:48
| 55.7 | 148 | 0.640485 | # Generated by Django 2.0.3 on 2018-09-30 09:48
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('perftracker', '0032_merge_20180930_1207'),
]
operations = [
migrations.CreateModel(
name='ArtifactL... | 0 | 0 | 0 | 2,085 | 0 | 0 | 0 | 26 | 68 |
e0035754332e35af8b9330ddc6455a4d1ee31706 | 4,915 | py | Python | src/mtgss/optimisation.py | phi168/MTG-supplier-selector | c326f1bfa6520d945fdb58359697f87c83b408e0 | [
"MIT"
] | null | null | null | src/mtgss/optimisation.py | phi168/MTG-supplier-selector | c326f1bfa6520d945fdb58359697f87c83b408e0 | [
"MIT"
] | null | null | null | src/mtgss/optimisation.py | phi168/MTG-supplier-selector | c326f1bfa6520d945fdb58359697f87c83b408e0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 4 08:56:58 2021
@author: Thore
"""
| 36.407407 | 101 | 0.584537 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 4 08:56:58 2021
@author: Thore
"""
import numpy as np
from numpy.random import exponential
from random import randint, uniform
class GeneticAlgorithm:
def __init__(self, cost_func, bounds, N = 8000, mutation_rate = 0.05,
survi... | 0 | 0 | 0 | 4,693 | 0 | 0 | 0 | 26 | 89 |
50f9f166aa733429561dcbb139acb82f4bc7064d | 3,734 | py | Python | tests/test_print_helper.py | florianbegusch/simple_grep | 62fd0f76383e2332c5308e7961ce6f585c2a8208 | [
"BSD-2-Clause"
] | null | null | null | tests/test_print_helper.py | florianbegusch/simple_grep | 62fd0f76383e2332c5308e7961ce6f585c2a8208 | [
"BSD-2-Clause"
] | 2 | 2020-06-19T20:18:12.000Z | 2020-06-19T20:18:50.000Z | tests/test_print_helper.py | florianbegusch/simple_grep | 62fd0f76383e2332c5308e7961ce6f585c2a8208 | [
"BSD-2-Clause"
] | null | null | null |
# TODO do not call hotfix_delete_temp_dir manually
| 28.503817 | 122 | 0.681843 | import os
import tempfile
import platform
import pytest
from grep import print_helper
from tests.helper_for_tests import with_f_bwrite, hotfix_delete_temp_dir
def test_generate_output_for_matched_files_full_path():
matched_items = {
'/home/flo/Untitled Document': {
1: 'aware\n',
2... | 0 | 74 | 0 | 0 | 0 | 3,233 | 0 | 27 | 339 |
c4957a807b8e888ea704965a2739a8b1d31ae9be | 1,681 | py | Python | examples/Ex006_Moving_the_Current_Working_Point.py | Jojain/ncadquery | 736369e4f73cb69c7a1efd631d96c7da5acab985 | [
"Apache-2.0"
] | null | null | null | examples/Ex006_Moving_the_Current_Working_Point.py | Jojain/ncadquery | 736369e4f73cb69c7a1efd631d96c7da5acab985 | [
"Apache-2.0"
] | null | null | null | examples/Ex006_Moving_the_Current_Working_Point.py | Jojain/ncadquery | 736369e4f73cb69c7a1efd631d96c7da5acab985 | [
"Apache-2.0"
] | null | null | null | import ncadquery as cq
# These can be modified rather than hardcoding values for each dimension.
circle_radius = 3.0 # The outside radius of the plate
thickness = 0.25 # The thickness of the plate
# Make a plate with two cutouts in it by moving the workplane center point
# 1. Establishes a workplane that an object... | 46.694444 | 79 | 0.726948 | import ncadquery as cq
# These can be modified rather than hardcoding values for each dimension.
circle_radius = 3.0 # The outside radius of the plate
thickness = 0.25 # The thickness of the plate
# Make a plate with two cutouts in it by moving the workplane center point
# 1. Establishes a workplane that an object... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a9e306af5cf16df5cca23449d354eb6b59f76e17 | 24,268 | py | Python | ensembler/potentials/ND.py | philthiel/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 39 | 2020-05-19T08:45:27.000Z | 2022-03-17T16:58:34.000Z | ensembler/potentials/ND.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 38 | 2020-06-18T13:02:18.000Z | 2022-02-25T14:29:17.000Z | ensembler/potentials/ND.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 13 | 2020-05-19T08:45:57.000Z | 2022-03-10T16:18:20.000Z | """
Module: Potential
This module shall be used to implement subclasses of Potentials that formulate a potential as an Function with N-Dimensions.
This module contains all available potentials.
"""
# Base Classes | 42.426573 | 187 | 0.607796 | """
Module: Potential
This module shall be used to implement subclasses of Potentials that formulate a potential as an Function with N-Dimensions.
This module contains all available potentials.
"""
import numpy as np
import sympy as sp
from ensembler.util import ensemblerTypes as t
from ensembler.util.ensembl... | 2 | 4,375 | 0 | 19,360 | 0 | 0 | 0 | 108 | 203 |
d13232459000e11e2b3d6f706c5b9e1ad75b0d8d | 7,376 | py | Python | Scripts/HTMLDocsAutomation/HTMLDocsAutomation_test.py | Infosec-L3/content | 05fd87c713325ba31d8850c228e67c6c705c4188 | [
"MIT"
] | null | null | null | Scripts/HTMLDocsAutomation/HTMLDocsAutomation_test.py | Infosec-L3/content | 05fd87c713325ba31d8850c228e67c6c705c4188 | [
"MIT"
] | null | null | null | Scripts/HTMLDocsAutomation/HTMLDocsAutomation_test.py | Infosec-L3/content | 05fd87c713325ba31d8850c228e67c6c705c4188 | [
"MIT"
] | null | null | null |
RETURN_ERROR_TARGET = 'HTMLDocsAutomation.return_error'
# md = '''Key | Value
# - | -
# city | Mountain View
# country | US
# hostname | dns.google
# ip | 8.8.8.8
# loc | 37.3860,-122.0838
# org | AS15169 Google LLC
# postal | 94035
# readme | https://ipinfo.io/missingauth
# region | California
# {"lat": 37... | 26.532374 | 112 | 0.611036 | from CommonServerPython import *
import os
import demistomock as demisto
RETURN_ERROR_TARGET = 'HTMLDocsAutomation.return_error'
def test_get_yaml_obj(mocker):
from HTMLDocsAutomation import get_yaml_obj
return_error_mock = mocker.patch(RETURN_ERROR_TARGET)
# sanity
file_path = os.path.join('test_... | 0 | 0 | 0 | 0 | 0 | 6,790 | 0 | 7 | 182 |
29aba6a21300e2d6562b6f7b339044a402ff17bd | 5,238 | py | Python | doc/jupyter_execute/notebooks/istio_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/notebooks/istio_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/notebooks/istio_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Example Seldon Core Deployments using Helm with Istio
#
# Prequisites
#
# * [Install istio](https://istio.io/latest/docs/setup/getting-started/#download)
# ## Setup Cluster and Ingress
#
# Use the setup notebook to [Setup Cluster](https://docs.seldon.io/projects/seldon-co... | 27.139896 | 503 | 0.705995 | #!/usr/bin/env python
# coding: utf-8
# # Example Seldon Core Deployments using Helm with Istio
#
# Prequisites
#
# * [Install istio](https://istio.io/latest/docs/setup/getting-started/#download)
# ## Setup Cluster and Ingress
#
# Use the setup notebook to [Setup Cluster](https://docs.seldon.io/projects/seldon-co... | 0 | 108 | 0 | 0 | 0 | 0 | 0 | 34 | 46 |
4a48888a7c60778366f2515bfcea2fe87e3f9c6d | 218 | py | Python | src/pygcode_modules/square.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | src/pygcode_modules/square.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | src/pygcode_modules/square.py | kazetkazet/cnc | 8e207a71616a9a13bac57df85631714235589891 | [
"MIT"
] | null | null | null | def code():
"""
Example G-code module, a square.
Please simulate first, before milling.
"""
return """
G91
G0 X20 Y0
G0 X0 Y20
G0 X-20 Y0
G0 X0 Y-20
"""
| 15.571429 | 42 | 0.463303 | def code():
"""
Example G-code module, a square.
Please simulate first, before milling.
"""
return """
G91
G0 X20 Y0
G0 X0 Y20
G0 X-20 Y0
G0 X0 Y-20
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
05dd667763d40671b6356a8acd3a3a0dc85aa780 | 2,234 | py | Python | test/add_admin.py | ThorodanBrom/iudx-auth-server | 52c798811b3e551f63c82645591a6bfca62052e6 | [
"MIT"
] | null | null | null | test/add_admin.py | ThorodanBrom/iudx-auth-server | 52c798811b3e551f63c82645591a6bfca62052e6 | [
"MIT"
] | 7 | 2020-10-13T12:38:40.000Z | 2021-02-16T13:17:13.000Z | test/add_admin.py | ThorodanBrom/iudx-auth-server | 52c798811b3e551f63c82645591a6bfca62052e6 | [
"MIT"
] | 4 | 2020-09-03T09:29:57.000Z | 2020-12-21T07:55:10.000Z | import psycopg2
name = { "title" : "Mr.",
"firstName" : "Testing",
"lastName" : "Testing"
}
csr = "-----BEGIN CERTIFICATE REQUEST-----\nMIICjDCCAXQCAQAwRzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRQwEgYDVQQK\nDAtNeU9yZywgSW5jLjEVMBMGA1UEAwwMbXlkb21haW4uY29tMIIBIjANBgkqhkiG\n9w0BAQEFA... | 48.565217 | 984 | 0.749329 | from consent import provider_reg
from add_org import add_organization
import psycopg2
import random, string
name = { "title" : "Mr.",
"firstName" : "Testing",
"lastName" : "Testing"
}
csr = "-----BEGIN CERTIFICATE REQUEST-----\nMIICjDCCAXQCAQAwRzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMA... | 0 | 0 | 0 | 0 | 0 | 678 | 0 | 26 | 89 |
9274e868e1676ce31b39ca8c55c6bce3236cc35c | 4,453 | py | Python | scripts/run_job_flow.py | dfrestrepor/movie-rs | 5c23f789698017b357ef80df55c8842b36676619 | [
"Apache-2.0"
] | 21 | 2020-12-03T02:59:44.000Z | 2022-02-15T08:29:09.000Z | scripts/run_job_flow.py | dfrestrepor/movie-rs | 5c23f789698017b357ef80df55c8842b36676619 | [
"Apache-2.0"
] | 2 | 2021-12-16T19:47:25.000Z | 2021-12-17T18:39:02.000Z | scripts/run_job_flow.py | dfrestrepor/movie-rs | 5c23f789698017b357ef80df55c8842b36676619 | [
"Apache-2.0"
] | 12 | 2020-12-25T23:23:20.000Z | 2022-02-25T11:14:28.000Z | #!/usr/bin/env python3
# Purpose: Create a new EMR cluster and submits a variable
# number of Steps defined in a separate JSON file
# Author: Gary A. Stafford (November 2020)
import argparse
import json
import logging
import os
import boto3
from botocore.exceptions import ClientError
logging.basicConfig(f... | 30.5 | 137 | 0.481922 | #!/usr/bin/env python3
# Purpose: Create a new EMR cluster and submits a variable
# number of Steps defined in a separate JSON file
# Author: Gary A. Stafford (November 2020)
import argparse
import json
import logging
import os
import boto3
from botocore.exceptions import ClientError
from scripts.paramete... | 0 | 0 | 0 | 0 | 0 | 133 | 0 | 20 | 46 |
adc14f4a93a1042eb839691caa5df56d8072eb88 | 4,259 | py | Python | data_collector/neo-wrapper.py | cardwizard/vulnerable-python-ecosystem | 582fda1f45bbe912352ed31a302d798365628713 | [
"MIT"
] | null | null | null | data_collector/neo-wrapper.py | cardwizard/vulnerable-python-ecosystem | 582fda1f45bbe912352ed31a302d798365628713 | [
"MIT"
] | null | null | null | data_collector/neo-wrapper.py | cardwizard/vulnerable-python-ecosystem | 582fda1f45bbe912352ed31a302d798365628713 | [
"MIT"
] | null | null | null | from neo4j import GraphDatabase
port = 7688
data_uri = 'bolt://localhost:' + str(port)
username = 'neo4j'
password = 'abc123'
# data_creds = (username, password)
data_creds = None
driver = GraphDatabase.driver(data_uri, auth=data_creds)
"""
@param pkg_data : Python dictionary of package data to be inserted
"""
... | 28.972789 | 124 | 0.538154 | from neo4j import GraphDatabase
port = 7688
data_uri = 'bolt://localhost:' + str(port)
username = 'neo4j'
password = 'abc123'
# data_creds = (username, password)
data_creds = None
driver = GraphDatabase.driver(data_uri, auth=data_creds)
def close_db():
driver.close()
def clear_db():
with driver.session() a... | 0 | 0 | 0 | 0 | 0 | 2,805 | 0 | 0 | 92 |
ec98e071fcc99a0d2ab708d83afb8cde87c2cc94 | 3,041 | py | Python | 2017/CVE-2017-14537/poc/pocsploit/CVE-2017-14537.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 421 | 2021-12-07T08:46:40.000Z | 2022-03-31T12:42:16.000Z | 2017/CVE-2017-14537/poc/pocsploit/CVE-2017-14537.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 5 | 2022-03-27T07:37:32.000Z | 2022-03-31T13:56:11.000Z | 2017/CVE-2017-14537/poc/pocsploit/CVE-2017-14537.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 144 | 2021-12-07T11:06:14.000Z | 2022-03-31T07:41:35.000Z |
# Vuln Base Info
# Vender Fingerprint
# Proof of Concept
# Exploit, can be same with poc()
# Utils | 40.546667 | 339 | 0.599803 | import requests
# Vuln Base Info
def info():
return {
"author": "cckuailong",
"name": '''trixbox 2.8.0 - directory-traversal''',
"description": '''trixbox 2.8.0.4 has path traversal via the xajaxargs array parameter to /maint/index.php?packages or the lang parameter to /maint/modules/home/... | 0 | 0 | 0 | 0 | 0 | 2,808 | 0 | -6 | 132 |
584bcd35a645874fbcb4c80c26a2a8bacd667ed5 | 797 | py | Python | release/scripts/addons/add_mesh_BoltFactory/presets/M3.py | wycivil08/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 30 | 2015-01-29T14:06:05.000Z | 2022-01-10T07:47:29.000Z | release/scripts/addons/add_mesh_BoltFactory/presets/M3.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 1 | 2017-02-20T20:57:48.000Z | 2018-12-19T23:44:38.000Z | release/scripts/addons/add_mesh_BoltFactory/presets/M3.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 15 | 2015-04-23T02:38:36.000Z | 2021-03-01T20:09:39.000Z | props.bf_Shank_Dia = 3.0
#props.bf_Pitch = 0.5 # Coarse
props.bf_Pitch = 0.35 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 3.0
props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch)
props.bf_Hex_Head_Flat_Distance = 5.5
props.bf_Hex_Head_Height = 2.0
props.bf_Cap... | 34.652174 | 80 | 0.795483 | props.bf_Shank_Dia = 3.0
#props.bf_Pitch = 0.5 # Coarse
props.bf_Pitch = 0.35 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 3.0
props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch)
props.bf_Hex_Head_Flat_Distance = 5.5
props.bf_Hex_Head_Height = 2.0
props.bf_Cap... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dffde25a4da00a3113e1aa7d88d4ce49632a0533 | 2,836 | py | Python | share/views.py | makotosan999/second-repository | a2e9816f014eb196ccd7f01356e2e6677cbe4d91 | [
"Apache-2.0"
] | null | null | null | share/views.py | makotosan999/second-repository | a2e9816f014eb196ccd7f01356e2e6677cbe4d91 | [
"Apache-2.0"
] | 9 | 2021-04-07T09:13:05.000Z | 2022-03-12T00:56:10.000Z | share/views.py | makotosan999/second-repository | a2e9816f014eb196ccd7f01356e2e6677cbe4d91 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import redirect
# create model
| 27.533981 | 95 | 0.562059 | from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.shortcuts import redirect
from .models import Image,Friend,Post #imageちゃんとある
from .forms import ImageForm, FriendForm,PostForm
def index(request):
images = Image.objects.all()
timeline = Post.objects.all()
da... | 264 | 0 | 0 | 0 | 0 | 2,346 | 0 | 83 | 263 |
1f84af834084d26927a44fcfd524f817b8a16de1 | 282 | py | Python | reprohack_hub/reprohack/tests/factories.py | willfurnass/reprohack_site | 6b8befc24fb55481597cd9721081bef4d57d10ec | [
"MIT"
] | null | null | null | reprohack_hub/reprohack/tests/factories.py | willfurnass/reprohack_site | 6b8befc24fb55481597cd9721081bef4d57d10ec | [
"MIT"
] | null | null | null | reprohack_hub/reprohack/tests/factories.py | willfurnass/reprohack_site | 6b8befc24fb55481597cd9721081bef4d57d10ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 20.142857 | 54 | 0.698582 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from factory import DjangoModelFactory, Sequence
from reprohack_hub.reprohack.models import Paper
class PaperFactory(DjangoModelFactory):
title = Sequence(lambda n: "Paper Title: #%s" % n)
class Meta:
model = Paper
| 0 | 0 | 0 | 112 | 0 | 0 | 0 | 54 | 69 |
2807e7f9434aa14dc20efd6e2f33e7b1a4c6913c | 7,778 | py | Python | dictknife/commands/swaggerknife.py | podhmo/dictknife | a172220c1adc8411b69f31646ea2154932d71516 | [
"MIT"
] | 13 | 2018-11-23T15:55:18.000Z | 2021-11-24T02:42:44.000Z | dictknife/commands/swaggerknife.py | podhmo/dictknife | a172220c1adc8411b69f31646ea2154932d71516 | [
"MIT"
] | 105 | 2017-01-09T02:05:48.000Z | 2021-07-26T03:39:22.000Z | dictknife/commands/swaggerknife.py | podhmo/dictknife | a172220c1adc8411b69f31646ea2154932d71516 | [
"MIT"
] | 4 | 2017-07-19T12:34:47.000Z | 2019-06-20T10:32:13.000Z | import os.path
import logging
from dictknife import loading
logger = logging.getLogger(__name__)
def merge(
*,
files: list,
dst: str,
style: str, # flavor?, strategy?
strict: bool = False,
wrap: str = None,
wrap_section: str = "definitions"
):
"""merge files"""
from dictknife.l... | 32.957627 | 93 | 0.587683 | import os.path
import logging
import warnings
import contextlib
from dictknife import loading
from dictknife.cliutils import traceback_shortly
from magicalimport import import_symbol
logger = logging.getLogger(__name__)
def tojsonschema(*, src, dst, name):
# todo: id
d = loading.loadfile(src)
root = d["d... | 0 | 0 | 0 | 0 | 0 | 5,049 | 0 | 35 | 157 |
1ca7e151f9deca55704801d6bb2bdaedd96df773 | 12,599 | py | Python | modoboa/relaydomains/tests.py | vietbm-hcm/modoboa | ceeec1bf0a63cf1b3ef7b4087c06e2a1eb35598d | [
"ISC"
] | null | null | null | modoboa/relaydomains/tests.py | vietbm-hcm/modoboa | ceeec1bf0a63cf1b3ef7b4087c06e2a1eb35598d | [
"ISC"
] | null | null | null | modoboa/relaydomains/tests.py | vietbm-hcm/modoboa | ceeec1bf0a63cf1b3ef7b4087c06e2a1eb35598d | [
"ISC"
] | null | null | null | """modoboa-admin-relaydomains unit tests."""
| 37.165192 | 79 | 0.60989 | """modoboa-admin-relaydomains unit tests."""
import json
from django.core.files.base import ContentFile
from django.core.urlresolvers import reverse
from django.test import TestCase
from modoboa.admin import factories as admin_factories
from modoboa.admin import models as admin_models
from modoboa.core.factories imp... | 0 | 1,107 | 0 | 10,865 | 0 | 0 | 0 | 216 | 361 |
9c99700c6fc2e1b333f93c7764bceb31f5fc7f7d | 9,122 | py | Python | appengine/monorail/api/api_proto/users_prpc_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/api/api_proto/users_prpc_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 16 | 2020-09-07T11:55:09.000Z | 2022-03-02T05:47:58.000Z | appengine/monorail/api/api_proto/users_prpc_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT!
# source: api/api_proto/users.proto
import base64
import zlib
from google.protobuf import descriptor_pb2
# Includes description of the api/api_proto/users.proto and all of its transitive
# dependencies. Includes source code info.
FILE_DESCRIPTOR_... | 70.169231 | 83 | 0.873164 | # Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT!
# source: api/api_proto/users.proto
import base64
import zlib
from google.protobuf import descriptor_pb2
# Includes description of the api/api_proto/users.proto and all of its transitive
# dependencies. Includes source code info.
FILE_DESCRIPTOR_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1a44b83a53d937116cf8c4bae65f89a44a4e8acd | 3,564 | py | Python | test/integration_tests/test_collection.py | poldracklab/bids-core | b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e | [
"MIT"
] | 1 | 2016-03-09T01:24:02.000Z | 2016-03-09T01:24:02.000Z | test/integration_tests/test_collection.py | poldracklab/bids-core | b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e | [
"MIT"
] | 15 | 2016-02-17T19:11:32.000Z | 2018-04-12T23:33:06.000Z | test/integration_tests/test_collection.py | poldracklab/bids-core | b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e | [
"MIT"
] | 4 | 2017-04-05T17:34:59.000Z | 2018-01-22T01:40:51.000Z | import logging
log = logging.getLogger(__name__)
sh = logging.StreamHandler()
log.addHandler(sh)
log.setLevel(logging.INFO)
import pymongo
db = pymongo.MongoClient('mongodb://localhost:9001/scitran').get_default_database()
adm_user = 'test@user.com'
base_url = 'http://localhost:8080/api'
test_data = type('',(object,)... | 29.94958 | 96 | 0.601852 | import requests
import json
import time
import logging
log = logging.getLogger(__name__)
sh = logging.StreamHandler()
log.addHandler(sh)
log.setLevel(logging.INFO)
from nose.tools import with_setup
import pymongo
from bson.objectid import ObjectId
db = pymongo.MongoClient('mongodb://localhost:9001/scitran').get_defa... | 0 | 1,449 | 0 | 0 | 0 | 1,608 | 0 | -1 | 180 |
ed95f27cc2d40d10911d4b942ad52fafb4049f1c | 11,170 | py | Python | keras_wide_deep_98_table_15GB/python/lib/dataset.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | 4 | 2020-03-03T12:51:05.000Z | 2021-06-19T17:34:45.000Z | keras_wide_deep_98_table_15GB/python/lib/dataset.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | null | null | null | keras_wide_deep_98_table_15GB/python/lib/dataset.py | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | 6c3031487cd1447b7f5362483c14b108177387bb | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import os
import sys
PACKAGE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, PACKAGE_DIR)
def input_fn(csv_data_file, img_data_file, mode, batch_siz... | 48.565217 | 124 | 0.607431 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import OrderedDict
import abc
import tensorflow as tf
import os
import sys
PACKAGE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, PACKAGE_DIR)
from lib.r... | 0 | 750 | 0 | 8,834 | 0 | 0 | 0 | 14 | 114 |
20c99068fe946623d452875a141e82102f2a8a22 | 1,070 | py | Python | main.py | PanchitoMunoz/Black-Scholes | f1765183a1f6db60ae408104026cd1bdf2b01e3c | [
"MIT"
] | null | null | null | main.py | PanchitoMunoz/Black-Scholes | f1765183a1f6db60ae408104026cd1bdf2b01e3c | [
"MIT"
] | null | null | null | main.py | PanchitoMunoz/Black-Scholes | f1765183a1f6db60ae408104026cd1bdf2b01e3c | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
from black_scholes.plotters import PlotTrajectories
from black_scholes import NumericGeometricBrownianMotion
N_MAX = 20000
N = 5
MU, SIGMA = 1, 0.5
bm = NumericGeometricBrownianMotion(
x_0=5,
n_max=N_MAX,
mu=lambda t, x: np.cos(t/0.1) + MU,
sigm... | 27.435897 | 121 | 0.728972 | import numpy as np
from matplotlib import pyplot as plt
from black_scholes.plotters import PlotTrajectories
from black_scholes import NumericGeometricBrownianMotion, TheoreticalGeometricBrownianMotion
N_MAX = 20000
N = 5
MU, SIGMA = 1, 0.5
bm = NumericGeometricBrownianMotion(
x_0=5,
n_max=N_MAX,
mu=lambd... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0 |
d9caa712d321a55fcb8b5ea5cf1e98f8e4550922 | 400 | py | Python | monitorrent/rest/new_version.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 465 | 2015-08-31T09:16:41.000Z | 2022-03-12T10:33:04.000Z | monitorrent/rest/new_version.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 340 | 2015-07-18T17:31:54.000Z | 2022-03-30T15:16:25.000Z | monitorrent/rest/new_version.py | DmitryRibalka/monitorrent | f329d4bca151360d29e93d5369a1d21268d8998f | [
"WTFPL"
] | 87 | 2015-07-18T10:52:24.000Z | 2022-03-27T09:52:35.000Z |
# noinspection PyUnusedLocal
| 28.571429 | 69 | 0.72 | from monitorrent.new_version_checker import NewVersionChecker
# noinspection PyUnusedLocal
class NewVersion(object):
def __init__(self, new_version_checker):
"""
:type new_version_checker: NewVersionChecker
"""
self.new_version_checker = new_version_checker
def on_get(self, re... | 0 | 0 | 0 | 285 | 0 | 0 | 0 | 40 | 44 |
405f1b95cb697b99aa7c11db75b31634518b6b76 | 27,187 | py | Python | include/El/core/Matrix.py | sg0/Elemental | 614f02509690449b553451e36bc78e7e132ea517 | [
"BSD-3-Clause"
] | 1 | 2015-12-08T22:54:37.000Z | 2015-12-08T22:54:37.000Z | include/El/core/Matrix.py | sg0/Elemental | 614f02509690449b553451e36bc78e7e132ea517 | [
"BSD-3-Clause"
] | null | null | null | include/El/core/Matrix.py | sg0/Elemental | 614f02509690449b553451e36bc78e7e132ea517 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
buffer_from_memory = pythonapi.PyBuffer_FromMemory
buff... | 43.92084 | 76 | 0.747085 | #
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
from environment import *
import numpy as np
buffer_fro... | 0 | 0 | 0 | 13,134 | 0 | 0 | 0 | 1 | 67 |
432ccae64dd1c66b9f921250d3df2c779db2e785 | 839 | py | Python | tests/builtins/test_setattr.py | jacebrowning/voc | 7bc84e8a870674d300ad5083748cf6b826e7fb68 | [
"BSD-3-Clause"
] | 850 | 2015-08-17T16:45:22.000Z | 2019-03-24T07:50:15.000Z | tests/builtins/test_setattr.py | jacebrowning/voc | 7bc84e8a870674d300ad5083748cf6b826e7fb68 | [
"BSD-3-Clause"
] | 506 | 2015-09-26T18:20:00.000Z | 2019-03-19T18:16:18.000Z | tests/builtins/test_setattr.py | jacebrowning/voc | 7bc84e8a870674d300ad5083748cf6b826e7fb68 | [
"BSD-3-Clause"
] | 670 | 2015-09-12T21:57:44.000Z | 2019-03-19T13:15:33.000Z | from .. utils import TranspileTestCase
| 31.074074 | 69 | 0.543504 | from .. utils import TranspileTestCase
class SetattrTests(TranspileTestCase):
def test_minimal(self):
self.assertCodeExecution("""
class MyClass(object):
class_value = 42
def __init__(self, val):
self.value = val
print("On class... | 0 | 0 | 0 | 776 | 0 | 0 | 0 | 0 | 23 |
2b8f583adb11f3d0492cee695ecba23411f01119 | 3,861 | py | Python | excel_migrator.py | mvhb/testlinkmigrationhelper | a0b2bd4785695069f2a6e6bd3fa86fa433c88a2c | [
"MIT"
] | null | null | null | excel_migrator.py | mvhb/testlinkmigrationhelper | a0b2bd4785695069f2a6e6bd3fa86fa433c88a2c | [
"MIT"
] | null | null | null | excel_migrator.py | mvhb/testlinkmigrationhelper | a0b2bd4785695069f2a6e6bd3fa86fa433c88a2c | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
while True:
xml_name = input("Type the name of the XML file with .xml: ")
if xml_name.upper() != "QUIT":
excel_name = create_excel_name(xml_name)
excel_path = get_excel_path(excel_name)
workbook, worksheet = creating_excel_file_w... | 31.137097 | 82 | 0.630407 | from openpyxl import load_workbook
import xml.etree.ElementTree as ET
import xlsxwriter
import re
import os
def create_excel_name(xml_name):
return xml_name[:-4] + '_to_excel.xlsx'
def get_excel_path(excel_name):
excel_path = os.path.abspath(".") + "/excel/" + excel_name
return excel_path
def creating... | 0 | 0 | 0 | 0 | 0 | 2,929 | 0 | -2 | 248 |
825259abf6fbd779f31c19a9aff94a320704322a | 2,701 | py | Python | tools/external/getTSedge.py | gronchi/mpts | 5e33e885b099a337c0cadc78840dd2c216a6d9df | [
"MIT"
] | null | null | null | tools/external/getTSedge.py | gronchi/mpts | 5e33e885b099a337c0cadc78840dd2c216a6d9df | [
"MIT"
] | null | null | null | tools/external/getTSedge.py | gronchi/mpts | 5e33e885b099a337c0cadc78840dd2c216a6d9df | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import itertools
import sys
sys.path.append('/afs/ipp/aug/ads-diags/common/python/lib')
import dd
import map_equ
from scipy.interpolate import interp1d
eqm = map_equ.equ_map()
marker = itertools.cycle(('o', 's', 'd', 'v', '^', '<', '>', '*', '.'))
shot_list = np.arr... | 38.042254 | 125 | 0.63495 | import numpy as np
import matplotlib.pyplot as plt
import itertools
import sys
sys.path.append('/afs/ipp/aug/ads-diags/common/python/lib')
import dd
import map_equ
from scipy.interpolate import interp1d
eqm = map_equ.equ_map()
marker = itertools.cycle(('o', 's', 'd', 'v', '^', '<', '>', '*', '.'))
shot_list = np.arr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
046db82c2d2d133c98b4ac80238c4f85b259ccf4 | 340 | py | Python | confply/new_tool/default.py | graehu/confply | 4471b520b3685d587a89d31dee7eec9ca7bf85de | [
"MIT"
] | null | null | null | confply/new_tool/default.py | graehu/confply | 4471b520b3685d587a89d31dee7eec9ca7bf85de | [
"MIT"
] | null | null | null | confply/new_tool/default.py | graehu/confply | 4471b520b3685d587a89d31dee7eec9ca7bf85de | [
"MIT"
] | null | null | null | import confply.{config_type} as {config_type}
tool_name = "echo"
| 15.454545 | 45 | 0.697059 | import confply.{config_type} as {config_type}
tool_name = "echo"
def generate():
{config_type}.tool = tool_name
return {config_type}.generate()
def get_environ():
return {config_type}.get_environ()
def handle_args():
{config_type}.handle_args()
pass
def is_found():
return {config_type}.... | 0 | 0 | 0 | 0 | 0 | 178 | 0 | 0 | 92 |
baa7ea9f98e587f9531249042c8a46476b02c131 | 6,977 | py | Python | evolutionary_search.py | tomoshi0809/single_tmaze | 59fdb7ccb393d1cbc5253f80fd8f83b99e06eabc | [
"MIT"
] | 3 | 2018-11-23T08:56:49.000Z | 2021-03-02T10:04:55.000Z | evolutionary_search.py | tomoshi0809/single_tmaze | 59fdb7ccb393d1cbc5253f80fd8f83b99e06eabc | [
"MIT"
] | 1 | 2018-12-29T01:35:30.000Z | 2019-03-13T09:32:41.000Z | evolutionary_search.py | Johnson37975725/single_tmaze | 291429bf04f0623f7bac42003919779de98927eb | [
"MIT"
] | 1 | 2019-03-08T09:33:13.000Z | 2019-03-08T09:33:13.000Z | import numpy as np
if __name__ == '__main__':
'''
Some tests
'''
n_neu = 4
n_pop = 25
n_grp = 5
es = EvolutionarySearch(EnvMock, PheMock, n_neu, n_pop, n_grp)
# tests for fit_stats
for i in range(n_pop): es.pop[i].fitness = i
result = es.fit_stats(es.pop)
... | 42.03012 | 108 | 0.62534 | import numpy as np
import copy as cp
from genotype import *
class EvolutionarySearch:
def __init__(self, env_cls, phe_cls, n_neuron, n_pop, n_group = 5):
self.env = env_cls()
self.phe_cls = phe_cls
self.n_input = self.env.n_input
self.n_neuron = n_neuron
sel... | 0 | 0 | 0 | 3,594 | 0 | 92 | 0 | -3 | 158 |
082305ce8490e41bdcb5cedce0ff13918edde87a | 4,160 | py | Python | cines.py | robertozoia/cartelera | eb4ac703a348c96d13106dd032b9db53ddca58ce | [
"MIT"
] | 1 | 2016-10-10T18:21:42.000Z | 2016-10-10T18:21:42.000Z | cines.py | robertozoia/cartelera | eb4ac703a348c96d13106dd032b9db53ddca58ce | [
"MIT"
] | null | null | null | cines.py | robertozoia/cartelera | eb4ac703a348c96d13106dd032b9db53ddca58ce | [
"MIT"
] | null | null | null | # encoding: utf-8
# cines.py
#
# First release: 2012-05-02
#
# The MIT License (MIT)
#
# Copyright (c) 2012 Roberto Zoia
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restric... | 25.679012 | 96 | 0.641827 | # encoding: utf-8
# cines.py
#
# First release: 2012-05-02
#
# The MIT License (MIT)
#
# Copyright (c) 2012 Roberto Zoia
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restric... | 0 | 0 | 0 | 0 | 0 | 1,989 | 0 | 45 | 457 |
1b5df41380914f2448f84ab51c21bf9307af6188 | 1,606 | py | Python | ContainerWithMostWater.py | reedwave/leetcode-cn | dd9367948b39aea31501bd345492aaa16d2640fa | [
"MIT"
] | 1 | 2020-12-21T10:01:48.000Z | 2020-12-21T10:01:48.000Z | ContainerWithMostWater.py | reed-qu/leetcode-cn | dd9367948b39aea31501bd345492aaa16d2640fa | [
"MIT"
] | 7 | 2020-01-23T13:24:07.000Z | 2021-03-30T08:00:09.000Z | ContainerWithMostWater.py | reed-qu/leetcode-cn | dd9367948b39aea31501bd345492aaa16d2640fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/12/15 11:05
# @Title : 11.
# @Link : https://leetcode-cn.com/problems/container-with-most-water/
QUESTION = """
n a1a2...an(i,ai)
n i(i,ai) (i, 0)
x
n 2
[1,8,6,2,5,4,8,3,7]49
: https://aliyun-lc-upload.oss-cn-hangzhou.aliyuncs.com/aliyun-l... | 26.766667 | 111 | 0.628892 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/12/15 下午11:05
# @Title : 11. 盛最多水的容器
# @Link : https://leetcode-cn.com/problems/container-with-most-water/
QUESTION = """
给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。
在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线
使得它们与 x 轴共同构成的容器可以容纳最多的水。
... | 1,394 | 0 | 0 | 354 | 0 | 0 | 0 | 2 | 46 |
074b42be48178517185311cda7a91881826a6fd2 | 654 | py | Python | sktime/annotation/tests/test_all_annotators.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | 1 | 2021-09-08T14:24:52.000Z | 2021-09-08T14:24:52.000Z | sktime/annotation/tests/test_all_annotators.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | sktime/annotation/tests/test_all_annotators.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for sktime annotators."""
from sktime.registry import all_estimators
ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False)
| 28.434783 | 87 | 0.750765 | # -*- coding: utf-8 -*-
"""Tests for sktime annotators."""
import pandas as pd
import pytest
from sktime.registry import all_estimators
from sktime.utils._testing.estimator_checks import _make_args
ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False)
@pytest.mark.parametrize("Est... | 0 | 341 | 0 | 0 | 0 | 0 | 0 | 30 | 90 |
30b31e0baad43abdc83fc15da6a8cd0f4c74d836 | 437 | py | Python | devilry/devilry_gradeform/templatetags/devilry_gradeform_tags.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 29 | 2015-01-18T22:56:23.000Z | 2020-11-10T21:28:27.000Z | devilry/devilry_gradeform/templatetags/devilry_gradeform_tags.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 786 | 2015-01-06T16:10:18.000Z | 2022-03-16T11:10:50.000Z | devilry/devilry_gradeform/templatetags/devilry_gradeform_tags.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 15 | 2015-04-06T06:18:43.000Z | 2021-02-24T12:28:30.000Z | from django import template
register = template.Library() | 27.3125 | 112 | 0.789474 | from django import template
from devilry.devilry_gradeform.views import grade_form
register = template.Library()
@register.simple_tag(name="devilry_gradeform_editable_advanced")
def devilry_gradeform_editable_advanced(assignment, feedbackset):
"""
:param assignment:
:param feedbackset:
:return:
... | 0 | 299 | 0 | 0 | 0 | 0 | 0 | 33 | 46 |
9c7c0df391ffc905f66e7818815f50898fb96fd1 | 4,510 | py | Python | cyclopeps/scripts/asep/conv.py | philliphelms/cyclopeps | f024d827a7412f4d9df10d6b9453c2692b1a74c3 | [
"MIT"
] | null | null | null | cyclopeps/scripts/asep/conv.py | philliphelms/cyclopeps | f024d827a7412f4d9df10d6b9453c2692b1a74c3 | [
"MIT"
] | null | null | null | cyclopeps/scripts/asep/conv.py | philliphelms/cyclopeps | f024d827a7412f4d9df10d6b9453c2692b1a74c3 | [
"MIT"
] | null | null | null | from cyclopeps.tools.peps_tools import PEPS
from cyclopeps.tools.ops_tools import ops_conj_trans
from cyclopeps.ops.asep import return_op, return_curr_op
from cyclopeps.ops.basic import return_dens_op
from cyclopeps.algs.tebd import run_tebd
from sys import argv
from numpy import linspace
# Input arguments
Nx = int(a... | 30.066667 | 78 | 0.521508 | from cyclopeps.tools.utils import *
from cyclopeps.tools.peps_tools import PEPS
from cyclopeps.tools.ops_tools import ops_conj_trans
from cyclopeps.ops.asep import return_op,return_curr_op
from cyclopeps.ops.basic import return_dens_op
from cyclopeps.algs.tebd import run_tebd
from sys import argv
from numpy import lins... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 22 |
5da63e6346b8e8cec9cd62954485a6de509c4964 | 38,675 | py | Python | src/python/platforms/android/device.py | sanketsaurav/clusterfuzz | 9f7efba7781614d50cdc6ab136b9bcf19607731c | [
"Apache-2.0"
] | null | null | null | src/python/platforms/android/device.py | sanketsaurav/clusterfuzz | 9f7efba7781614d50cdc6ab136b9bcf19607731c | [
"Apache-2.0"
] | null | null | null | src/python/platforms/android/device.py | sanketsaurav/clusterfuzz | 9f7efba7781614d50cdc6ab136b9bcf19607731c | [
"Apache-2.0"
] | null | null | null | # 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, ... | 36.417137 | 92 | 0.728248 | # 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7328ae4cc169670c4d9df3cd477025254fdd601 | 1,362 | py | Python | python/dazl/prim/map.py | DACH-NY/dazl-client | 56c8b1be047415b2bcb35b6558de4a780a402458 | [
"Apache-2.0"
] | null | null | null | python/dazl/prim/map.py | DACH-NY/dazl-client | 56c8b1be047415b2bcb35b6558de4a780a402458 | [
"Apache-2.0"
] | null | null | null | python/dazl/prim/map.py | DACH-NY/dazl-client | 56c8b1be047415b2bcb35b6558de4a780a402458 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
__all__ = ["FrozenDict", "to_hashable"]
| 27.795918 | 102 | 0.666667 | # Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
__all__ = ["FrozenDict", "to_hashable"]
class FrozenDict(dict):
"""
A special subclass of `dict` that is immutable and hashable. Instances of this "dict" can be
use... | 0 | 0 | 0 | 876 | 0 | 256 | 0 | 0 | 46 |
e6c970d5e431f611ea50217c3eeea15a97185064 | 3,164 | py | Python | 2021/Day 18/advent.py | Urgau/advent_of_code | 23d808cf0d06ab0a459a269a053857446367ba6b | [
"MIT"
] | null | null | null | 2021/Day 18/advent.py | Urgau/advent_of_code | 23d808cf0d06ab0a459a269a053857446367ba6b | [
"MIT"
] | null | null | null | 2021/Day 18/advent.py | Urgau/advent_of_code | 23d808cf0d06ab0a459a269a053857446367ba6b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Based on: https://topaz.github.io/paste/#XQAAAQD1BwAAAAAAAAA0m0pnuFI8c9WAoVc3IiG2klervCCkc3Fk33PvMZ8ZxYTRWczt5PtHYRBHYFff4ul0TRcyM/2lzDiSzW4VNg/PNjmJjYW9ckowDG1eb/5D8V9Rco3xOqXH2QGG6rijExTF9a0BoO3AniSgROLnmdNs7IU2MHGEC1h46yQ0I9+/3NjIUx/j8JHXp+mzyHeUNzRE08VPVEOSWXc3c3QusQxOVetAC819kymhm0NzeCxcwo... | 41.090909 | 931 | 0.61536 | #!/usr/bin/env python
# Based on: https://topaz.github.io/paste/#XQAAAQD1BwAAAAAAAAA0m0pnuFI8c9WAoVc3IiG2klervCCkc3Fk33PvMZ8ZxYTRWczt5PtHYRBHYFff4ul0TRcyM/2lzDiSzW4VNg/PNjmJjYW9ckowDG1eb/5D8V9Rco3xOqXH2QGG6rijExTF9a0BoO3AniSgROLnmdNs7IU2MHGEC1h46yQ0I9+/3NjIUx/j8JHXp+mzyHeUNzRE08VPVEOSWXc3c3QusQxOVetAC819kymhm0NzeCxcwo... | 0 | 0 | 0 | 0 | 0 | 1,499 | 0 | -12 | 137 |
444ef81b1ba20a23bff405bb5f2e6f71900df315 | 13,133 | py | Python | PiCN/Layers/ChunkLayer/test/test_UploadChunkLayer.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | PiCN/Layers/ChunkLayer/test/test_UploadChunkLayer.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | 5 | 2020-07-15T09:01:42.000Z | 2020-09-28T08:45:21.000Z | PiCN/Layers/ChunkLayer/test/test_UploadChunkLayer.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | """Testing the Basic Chunk Layer"""
| 38.970326 | 126 | 0.662682 | """Testing the Basic Chunk Layer"""
import multiprocessing
import time
import unittest
from PiCN.Layers.ChunkLayer.DataOffloadingChunkLayer import DataOffloadingChunklayer, CaEntry, RequestTableEntry
from PiCN.Layers.ICNLayer.ContentStore import ContentStoreMemoryExact
from PiCN.Layers.ICNLayer.ForwardingInformationB... | 0 | 0 | 0 | 12,534 | 0 | 0 | 0 | 338 | 223 |
dfd067a74bf53d211598a73f27b45e24efe459d0 | 66 | py | Python | bot/app/__init__.py | thesuhas/Covid19-Hyderabad-Alerts | a8d5c8e71912fe1020e727619cd04300c96e14f0 | [
"MIT"
] | null | null | null | bot/app/__init__.py | thesuhas/Covid19-Hyderabad-Alerts | a8d5c8e71912fe1020e727619cd04300c96e14f0 | [
"MIT"
] | null | null | null | bot/app/__init__.py | thesuhas/Covid19-Hyderabad-Alerts | a8d5c8e71912fe1020e727619cd04300c96e14f0 | [
"MIT"
] | null | null | null |
import discord
client = discord.Client()
| 13.2 | 26 | 0.727273 |
import discord
client = discord.Client()
from app import bot | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 22 |
3fdf62fb44fa26bfa8cba38748e1607abe39d12c | 62 | py | Python | scenarios/disconnect.py | ashirko/egts-debugger-tester | 4074def2fbd6a6f3edd11a07fba4a04a8fc30de8 | [
"MIT"
] | 1 | 2021-04-07T21:33:10.000Z | 2021-04-07T21:33:10.000Z | scenarios/disconnect.py | ashirko/egts-debugger-tester | 4074def2fbd6a6f3edd11a07fba4a04a8fc30de8 | [
"MIT"
] | null | null | null | scenarios/disconnect.py | ashirko/egts-debugger-tester | 4074def2fbd6a6f3edd11a07fba4a04a8fc30de8 | [
"MIT"
] | null | null | null | import scenario
sock = scenario.start_scenario()
sock.close() | 15.5 | 32 | 0.790323 | import scenario
sock = scenario.start_scenario()
sock.close() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8fc729fc9479f336dfc59750b6ad0280fb565a8 | 297 | py | Python | django-textflow/textflow/templatetags/textflow.py | mhaze4/jquery-textflow | 6a299b23b090af91030a5367711edb56a719d39b | [
"MIT"
] | 2 | 2016-10-30T23:29:36.000Z | 2016-11-04T19:10:01.000Z | django-textflow/textflow/templatetags/textflow.py | mhaze4/jquery-textflow | 6a299b23b090af91030a5367711edb56a719d39b | [
"MIT"
] | null | null | null | django-textflow/textflow/templatetags/textflow.py | mhaze4/jquery-textflow | 6a299b23b090af91030a5367711edb56a719d39b | [
"MIT"
] | null | null | null | # coding: utf-8
from django import template
__author__ = 'mhaze'
register = template.Library()
| 17.470588 | 52 | 0.666667 | # coding: utf-8
from django import template
__author__ = 'mhaze'
register = template.Library()
@register.inclusion_tag('textflow.html')
def textflow(texts=None):
if not isinstance(texts, str):
raise Exception("Texts must be of type str")
return {
'texts': texts
}
| 0 | 176 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
fd514086fb943235b3b07eb3eb2da383c6cd2729 | 3,895 | py | Python | compass/util/reports_interface.py | the-scouts/compass-interface | d5dcc2547992df57e6fc0ebc1dfada789cfff239 | [
"MIT"
] | 8 | 2020-08-07T23:07:25.000Z | 2021-12-05T15:01:05.000Z | compass/util/reports_interface.py | the-scouts/compass-interface | d5dcc2547992df57e6fc0ebc1dfada789cfff239 | [
"MIT"
] | 12 | 2021-01-18T23:39:13.000Z | 2022-01-20T16:36:29.000Z | compass/util/reports_interface.py | the-scouts/compass-interface | d5dcc2547992df57e6fc0ebc1dfada789cfff239 | [
"MIT"
] | 1 | 2021-05-26T22:50:42.000Z | 2021-05-26T22:50:42.000Z | from pathlib import Path
# import numba
# import compass.core as ci
PROJECT_ROOT = Path(__file__).absolute().parent.parent.parent.parent
# @numba.njit
def first(item, vec):
"""return the index of the first occurrence of item in vec"""
for i, v in enumerate(vec):
if item == v:
return i
... | 36.064815 | 136 | 0.659307 | from functools import reduce
from pathlib import Path
# import numba
import pandas as pd
# import compass.core as ci
PROJECT_ROOT = Path(__file__).absolute().parent.parent.parent.parent
def get_df():
df = pd.read_feather(PROJECT_ROOT / "all-region.feather")
try:
yield df
finally:
del df... | 0 | 0 | 0 | 0 | 108 | 3,160 | 0 | 5 | 228 |
ad65eeb4c5670d97d20c403b1ffe0ab2496b0c41 | 1,333 | py | Python | clioude-server/alembic/versions/1c8e26c03625_init.py | ccw630/CliOuDE | 743540c7c14d7f95455219efe8be01817e96f96b | [
"MIT"
] | 3 | 2020-07-22T02:17:23.000Z | 2021-03-10T12:48:46.000Z | alembic/versions/1c8e26c03625_init.py | ccw630/CLIOUDE-Server | 4dc129e5bc57caead2df0107f02671d74c7808f1 | [
"MIT"
] | 5 | 2020-07-24T07:39:43.000Z | 2022-02-27T08:32:49.000Z | alembic/versions/1c8e26c03625_init.py | ccw630/CLIOUDE-Server | 4dc129e5bc57caead2df0107f02671d74c7808f1 | [
"MIT"
] | null | null | null | """init
Revision ID: 1c8e26c03625
Revises:
Create Date: 2020-05-14 00:55:00.914868
"""
# revision identifiers, used by Alembic.
revision = '1c8e26c03625'
down_revision = None
branch_labels = None
depends_on = None
| 31 | 87 | 0.677419 | """init
Revision ID: 1c8e26c03625
Revises:
Create Date: 2020-05-14 00:55:00.914868
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1c8e26c03625'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by ... | 0 | 0 | 0 | 0 | 0 | 1,019 | 0 | 3 | 90 |
cf67d09b3c63c48ce25aba115f74b48b609a1137 | 859 | py | Python | fixtures/python/random-names/src/function.py | guiloga/scalade | fd59b239fb35e8a7028baea3ed6d4b23282c200d | [
"MIT"
] | 4 | 2021-12-22T18:07:10.000Z | 2021-12-29T09:22:44.000Z | fixtures/python/random-names/src/function.py | guiloga/scalade | fd59b239fb35e8a7028baea3ed6d4b23282c200d | [
"MIT"
] | null | null | null | fixtures/python/random-names/src/function.py | guiloga/scalade | fd59b239fb35e8a7028baea3ed6d4b23282c200d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import asyncio
if __name__ == "__main__":
asyncio.run(main())
| 24.542857 | 78 | 0.689173 | #!/usr/bin/env python
import asyncio
from faker import Faker
from scalade import scalade_func
from scalade.managers import ContextManager
from scalade.variables import Variable
def generate_random_names(total: int) -> str:
fake = Faker()
names = []
for i in range(total):
names.append(fake.name()... | 0 | 386 | 0 | 0 | 0 | 193 | 0 | 52 | 136 |
b292f63ec85a4163f5a2b92b5ecdc61c2f79f9b1 | 51 | py | Python | tests/integrations/rediscluster/__init__.py | annu-ps31/sentry-python | 3966b4a9744bfcb8c53dcca1b615bbadf4935aec | [
"BSD-2-Clause"
] | 1,213 | 2018-06-19T00:51:01.000Z | 2022-03-31T06:37:16.000Z | tests/integrations/rediscluster/__init__.py | annu-ps31/sentry-python | 3966b4a9744bfcb8c53dcca1b615bbadf4935aec | [
"BSD-2-Clause"
] | 1,020 | 2018-07-16T12:50:36.000Z | 2022-03-31T20:42:49.000Z | tests/integrations/rediscluster/__init__.py | annu-ps31/sentry-python | 3966b4a9744bfcb8c53dcca1b615bbadf4935aec | [
"BSD-2-Clause"
] | 340 | 2018-07-16T12:47:27.000Z | 2022-03-22T10:13:21.000Z | import pytest
pytest.importorskip("rediscluster")
| 12.75 | 35 | 0.823529 | import pytest
pytest.importorskip("rediscluster")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
506ad5d35e926a976c214942f069e50ae826a487 | 114 | py | Python | apps/post/urls.py | kkonieo/portfolio-server | 1c9524ae240dbd526a96f51cbf4d6f18291f535a | [
"MIT"
] | 4 | 2022-01-21T11:10:44.000Z | 2022-01-26T15:00:52.000Z | apps/post/urls.py | kkonieo/portfolio-server | 1c9524ae240dbd526a96f51cbf4d6f18291f535a | [
"MIT"
] | 22 | 2022-01-21T10:32:37.000Z | 2022-03-25T14:24:10.000Z | apps/post/urls.py | kkonieo/portfolio-server | 1c9524ae240dbd526a96f51cbf4d6f18291f535a | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path("posts", views.PostList.as_view()),
]
| 14.25 | 44 | 0.692982 | from django.urls import path
from . import views
urlpatterns = [
path("posts", views.PostList.as_view()),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
252f4607c9b422d98dfa7bc2967b014cf02a7409 | 39,345 | py | Python | wildbook_social/Database/database.py | FuckBrains/wildbook-social | a44b35262ab117ff4ca8d34e5c307c3e83c7cbfe | [
"Apache-2.0"
] | 2 | 2021-03-08T04:13:46.000Z | 2021-03-29T01:54:47.000Z | database.py | wildbook-social/wildbook-social | a44b35262ab117ff4ca8d34e5c307c3e83c7cbfe | [
"Apache-2.0"
] | null | null | null | database.py | wildbook-social/wildbook-social | a44b35262ab117ff4ca8d34e5c307c3e83c7cbfe | [
"Apache-2.0"
] | 3 | 2019-11-27T15:36:11.000Z | 2021-06-19T18:37:10.000Z | import pandas as pd
pd.options.mode.chained_assignment = None # default='warn'
| 47.575574 | 197 | 0.570466 | from pymongo import MongoClient
import pprint
from IPython.display import YouTubeVideo, Image, display, Video
from wildbook_social import EmbedTweet
from datetime import timedelta
import time
import dateutil.parser
import matplotlib.pyplot as plt
import csv
import pandas as pd
import geopandas as gpd
import descartes
p... | 0 | 0 | 0 | 38,612 | 0 | 0 | 0 | 137 | 507 |
df56ad19cc9b9c2c2cf283f1f854460d25fa108a | 186 | py | Python | app/main.py | JRubics/fastapi-boilerplate | 62abe978d937e162dec1f3ecc5c7cb5869a7e81e | [
"BSD-3-Clause"
] | null | null | null | app/main.py | JRubics/fastapi-boilerplate | 62abe978d937e162dec1f3ecc5c7cb5869a7e81e | [
"BSD-3-Clause"
] | null | null | null | app/main.py | JRubics/fastapi-boilerplate | 62abe978d937e162dec1f3ecc5c7cb5869a7e81e | [
"BSD-3-Clause"
] | null | null | null | from fastapi import FastAPI
from .routers import items, users, login
app = FastAPI()
app.include_router(users.router)
app.include_router(items.router)
app.include_router(login.router) | 20.666667 | 40 | 0.806452 | from fastapi import FastAPI
from .routers import items, users, login
app = FastAPI()
app.include_router(users.router)
app.include_router(items.router)
app.include_router(login.router) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |