hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
77cdd4cfa1ba951c628b06ba3c433937e7e39f69 | 2,017 | py | Python | web/posts/tests.py | arturgafizov/webtron_social_network | 38dc166ea8d099ca3a0967f378d751f758eae649 | [
"MIT"
] | null | null | null | web/posts/tests.py | arturgafizov/webtron_social_network | 38dc166ea8d099ca3a0967f378d751f758eae649 | [
"MIT"
] | null | null | null | web/posts/tests.py | arturgafizov/webtron_social_network | 38dc166ea8d099ca3a0967f378d751f758eae649 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from rest_framework.reverse import reverse_lazy
from rest_framework.test import APITestCase
from rest_framework import status
from django.contrib.auth.hashers import make_password
User = get_user_model()
class PostApiTestCase(APITestCase):
@classmethod
def setU... | 35.385965 | 91 | 0.646505 | 1,761 | 0.873079 | 0 | 0 | 344 | 0.17055 | 0 | 0 | 281 | 0.139316 |
77ce28391d9e87410ba9c6fe9f7e9101b1ee66d1 | 16,521 | py | Python | 04-data-lake/etl.py | Ceridan/data-engineering-projects | c608ea76e6db0069f1b8dc24b16c367cf243f657 | [
"MIT"
] | null | null | null | 04-data-lake/etl.py | Ceridan/data-engineering-projects | c608ea76e6db0069f1b8dc24b16c367cf243f657 | [
"MIT"
] | null | null | null | 04-data-lake/etl.py | Ceridan/data-engineering-projects | c608ea76e6db0069f1b8dc24b16c367cf243f657 | [
"MIT"
] | null | null | null | import configparser
import os
from pyspark.sql import SparkSession, Window
from pyspark.sql.functions import col, asc, desc
from pyspark.sql.functions import date_format, row_number, monotonically_increasing_id
from pyspark.sql.functions import year, month, dayofmonth, hour, weekofyear, date_format
from pyspark.sql.typ... | 44.056 | 120 | 0.685794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,254 | 0.560136 |
77ced5789b62f0ec5d0ecee1f28883d50d318adb | 882 | py | Python | SystemProgramming/models/parsers.py | Savital/BMSTU | 30b6b1f3e79e1286a8cf5b3da7a4199a215aebe1 | [
"MIT"
] | null | null | null | SystemProgramming/models/parsers.py | Savital/BMSTU | 30b6b1f3e79e1286a8cf5b3da7a4199a215aebe1 | [
"MIT"
] | null | null | null | SystemProgramming/models/parsers.py | Savital/BMSTU | 30b6b1f3e79e1286a8cf5b3da7a4199a215aebe1 | [
"MIT"
] | null | null | null | # Savital https://github.com/Savital
# Reads data from proc
import os
class ProcReader():
def __init__(self):
super(ProcReader, self).__init__()
self.construct()
def __del__(self):
pass
def construct(self):
pass
def get(self, path):
if not os.path.exists(path... | 22.05 | 44 | 0.422902 | 809 | 0.917234 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.081633 |
77d0551b120b7e247faec73e3785aed4c6572d10 | 1,575 | py | Python | blog/tests.py | kkampardi/DjangoTesting | 1092c41d9d4930f0512fac79b4d95836c70e5f3a | [
"MIT"
] | null | null | null | blog/tests.py | kkampardi/DjangoTesting | 1092c41d9d4930f0512fac79b4d95836c70e5f3a | [
"MIT"
] | 3 | 2017-05-05T09:47:40.000Z | 2017-05-09T07:28:36.000Z | blog/tests.py | kkampardi/DjangoTesting | 1092c41d9d4930f0512fac79b4d95836c70e5f3a | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from .models import Entry
class EntryModelTest(TestCase):
"""Ensure that the a blog's entry string representation is qual to its title"""
def test_string_representation(self):
entry = Entry(title="This is a test title")
... | 37.5 | 83 | 0.68254 | 1,464 | 0.929524 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.208889 |
77d18b76003c4bfc898530ed0582298875b31542 | 29 | py | Python | trader/trading/executioner.py | 9600dev/mmr | b08e63b7044f2b2061d8679b216822c82d309c86 | [
"Apache-2.0"
] | 12 | 2021-09-22T21:19:23.000Z | 2022-01-03T21:38:47.000Z | trader/trading/executioner.py | webclinic017/mmr | 9c385c027fcf8cf365e41726c7c5d2064f33c202 | [
"Apache-2.0"
] | null | null | null | trader/trading/executioner.py | webclinic017/mmr | 9c385c027fcf8cf365e41726c7c5d2064f33c202 | [
"Apache-2.0"
] | 3 | 2021-09-05T23:26:13.000Z | 2022-03-25T01:01:22.000Z | class Executioner():
pass | 14.5 | 20 | 0.689655 | 29 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
77d27a48425b7756b0ea323bb46686f3b1ceed5d | 1,196 | py | Python | DataStructure and algorithms/Overallfibnocci.py | Rajatkhatri7/Project-Milap | 0bb5dfc05064a8727760755fa55e53fd7bb8d8d3 | [
"Apache-2.0"
] | null | null | null | DataStructure and algorithms/Overallfibnocci.py | Rajatkhatri7/Project-Milap | 0bb5dfc05064a8727760755fa55e53fd7bb8d8d3 | [
"Apache-2.0"
] | null | null | null | DataStructure and algorithms/Overallfibnocci.py | Rajatkhatri7/Project-Milap | 0bb5dfc05064a8727760755fa55e53fd7bb8d8d3 | [
"Apache-2.0"
] | null | null | null | # grows via 2^n/2
# fn= { 0 ; n=0
# 1 ; n=1
# f(n-1)+f(n-2) ; n>1}
def fib(n):
if n<=1:
return n
else:
return fib(n-1)+fib(n-2)
# for f(n)>n it will take very long time to compute
# bad algo
"""
F(n)
/ ... | 23.92 | 93 | 0.405518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 775 | 0.647993 |
77d4c896f4135bf9076e4a4fc25159dd59f2bc8a | 5,765 | py | Python | unit-2/tower.py | GalvinGao/2019-ProgrammingCourse | b668bc9bab902959a574aa3db73ae481131c0c27 | [
"MIT"
] | null | null | null | unit-2/tower.py | GalvinGao/2019-ProgrammingCourse | b668bc9bab902959a574aa3db73ae481131c0c27 | [
"MIT"
] | null | null | null | unit-2/tower.py | GalvinGao/2019-ProgrammingCourse | b668bc9bab902959a574aa3db73ae481131c0c27 | [
"MIT"
] | null | null | null | import time
import turtle as t
t.mode('standard')
t.speed(8)
DISTANCE = 8
RESIZE_RATIO = 6
t.pensize(RESIZE_RATIO)
class Restorer:
def __init__(self):
self.last_pos = t.pos()
def restore(self):
t.goto(self.last_pos[0], self.last_pos[1])
class Draw:
@staticmethod
def goto(x, y, hea... | 27.716346 | 112 | 0.580399 | 4,786 | 0.830182 | 0 | 0 | 884 | 0.153339 | 0 | 0 | 587 | 0.101821 |
77d4f48663c89f32c4be3c6b61e022e849edb12a | 1,304 | py | Python | build_user_list.py | BennettDixon/sql_to_contact_list | 23497119628622b4bf9e660ec2c4b12efba8b081 | [
"MIT"
] | null | null | null | build_user_list.py | BennettDixon/sql_to_contact_list | 23497119628622b4bf9e660ec2c4b12efba8b081 | [
"MIT"
] | null | null | null | build_user_list.py | BennettDixon/sql_to_contact_list | 23497119628622b4bf9e660ec2c4b12efba8b081 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""script for testing connection to database"""
import pyodbc
import sys
import os
from models.user import User
import models
driver = os.environ.get('CONTACT_SQL_DRIVER')
server = os.environ.get('CONTACT_SQL_SERVER')
database = os.environ.get('CONTACT_SQL_DB')
username = os.environ.get('CONTACT... | 28.977778 | 127 | 0.68635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 488 | 0.374233 |
77d58ca19b534449cc89976ecbaf5bc5474e985e | 14,960 | py | Python | Project_03_Books/src/game.py | moniqklimek/training | 51504ab839ed4b5ccc5731662a5077d5db334b93 | [
"MIT"
] | null | null | null | Project_03_Books/src/game.py | moniqklimek/training | 51504ab839ed4b5ccc5731662a5077d5db334b93 | [
"MIT"
] | null | null | null | Project_03_Books/src/game.py | moniqklimek/training | 51504ab839ed4b5ccc5731662a5077d5db334b93 | [
"MIT"
] | null | null | null | import json
import pprint
"""
TITLE: imagine buy in bookshoop - interaktive fun with User :)
ISSUE : help you choose the right item, get to know the User's preferences, i.e. - the thematic category that interests him, the results improved for him, a detailed description of the selected item
assumptions:
no method h... | 43.74269 | 281 | 0.657754 | 13,036 | 0.871274 | 0 | 0 | 0 | 0 | 0 | 0 | 6,771 | 0.452546 |
77d754abc0dd2b42226712db869734718758f2ec | 1,592 | py | Python | books_and_chapters/urls.py | assulthoni/Django-Bookworm | d816c099b1eaceff05958ed3bf9e7dd611e9b5fd | [
"MIT"
] | null | null | null | books_and_chapters/urls.py | assulthoni/Django-Bookworm | d816c099b1eaceff05958ed3bf9e7dd611e9b5fd | [
"MIT"
] | null | null | null | books_and_chapters/urls.py | assulthoni/Django-Bookworm | d816c099b1eaceff05958ed3bf9e7dd611e9b5fd | [
"MIT"
] | null | null | null | """django_bookworm.books_and_chapters URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.hom... | 49.75 | 100 | 0.723618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 971 | 0.609925 |
77d8b870eb29ec01acb07c7f782c1ca8e13356c3 | 573 | py | Python | manage.py | mwaiyusuf/news_highlight | dfae21f67c3bbe20521a5c3c96a0a6a759fbd8fb | [
"MIT"
] | null | null | null | manage.py | mwaiyusuf/news_highlight | dfae21f67c3bbe20521a5c3c96a0a6a759fbd8fb | [
"MIT"
] | null | null | null | manage.py | mwaiyusuf/news_highlight | dfae21f67c3bbe20521a5c3c96a0a6a759fbd8fb | [
"MIT"
] | null | null | null | from app import create_app
from flask_script import Manager,Server #initialise our extensions and server class that aid in launching of our server
# Creating app instance
app = create_app('development')
manager = Manager(app)
manager.add_command('server',Server) #launch app server
@manager.command
def test():
""... | 30.157895 | 119 | 0.743455 | 0 | 0 | 0 | 0 | 204 | 0.356021 | 0 | 0 | 219 | 0.382199 |
77d998bd3b17f3da023e7ce99e510488aaf3a564 | 9,384 | py | Python | src/robotrunner.py | bbokser/hopper-mpc-simple | 51fd3c0cb515d32b2a9cce93a0db45dddf95174c | [
"MIT"
] | null | null | null | src/robotrunner.py | bbokser/hopper-mpc-simple | 51fd3c0cb515d32b2a9cce93a0db45dddf95174c | [
"MIT"
] | null | null | null | src/robotrunner.py | bbokser/hopper-mpc-simple | 51fd3c0cb515d32b2a9cce93a0db45dddf95174c | [
"MIT"
] | null | null | null | """
Copyright (C) 2020-2022 Benjamin Bokser
"""
import plots
import mpc_cvx
# import time
# import sys
import numpy as np
import copy
from scipy.linalg import expm
import itertools
np.set_printoptions(suppress=True, linewidth=np.nan)
def projection(p0, v):
# find point p projected onto ground plane from point p0... | 43.646512 | 120 | 0.494991 | 8,919 | 0.950448 | 0 | 0 | 0 | 0 | 0 | 0 | 1,755 | 0.18702 |
77ddff0fe98781dd316cac4d51b90e21e33f27de | 6,122 | py | Python | toy_example.py | chuchienshu/Pytorch-color-work | d4a6d052bd39e815f2303bc1583e2bc9bdb6cce3 | [
"MIT"
] | null | null | null | toy_example.py | chuchienshu/Pytorch-color-work | d4a6d052bd39e815f2303bc1583e2bc9bdb6cce3 | [
"MIT"
] | null | null | null | toy_example.py | chuchienshu/Pytorch-color-work | d4a6d052bd39e815f2303bc1583e2bc9bdb6cce3 | [
"MIT"
] | null | null | null | from sklearn.neighbors import NearestNeighbors
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
def check_value(inds, val):
''' Check to see if an array is a single element equaling a particular value
for pre-processing inputs in a function '''
if(np.array(inds).siz... | 32.913978 | 128 | 0.611728 | 2,365 | 0.378037 | 0 | 0 | 0 | 0 | 0 | 0 | 2,052 | 0.328005 |
77de70d6830250aef1c075b8acbbc068d1dc4029 | 348 | py | Python | setup.py | SimonLarsen/python-endktheme | 2c942a682eb258f1d8b5fee80b93b9565a7ebde7 | [
"MIT"
] | null | null | null | setup.py | SimonLarsen/python-endktheme | 2c942a682eb258f1d8b5fee80b93b9565a7ebde7 | [
"MIT"
] | null | null | null | setup.py | SimonLarsen/python-endktheme | 2c942a682eb258f1d8b5fee80b93b9565a7ebde7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import endktheme
setup(
name="endktheme",
description="Visualization themes following Energinet's design guide.",
version=endktheme.__version__,
author="Simon J. Larsen",
author_email="simonhffh@gmail.com",
license="MIT",
packages=find_packages(),... | 24.857143 | 75 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.321839 |
77e1bd1a557254805b1a9b3ba5eb391f9c2baece | 1,630 | py | Python | async_downloads/views.py | QuickRelease/django-async-downloads | 7a0090e94fe8b5ee78f6175ed877a9b04aa475d7 | [
"MIT"
] | 1 | 2021-08-19T23:56:23.000Z | 2021-08-19T23:56:23.000Z | async_downloads/views.py | QuickRelease/django-async-downloads | 7a0090e94fe8b5ee78f6175ed877a9b04aa475d7 | [
"MIT"
] | 11 | 2020-07-22T15:21:14.000Z | 2022-03-22T13:02:37.000Z | async_downloads/views.py | QuickRelease/django-async-downloads | 7a0090e94fe8b5ee78f6175ed877a9b04aa475d7 | [
"MIT"
] | 1 | 2022-01-05T07:45:42.000Z | 2022-01-05T07:45:42.000Z | import os
from django.contrib.auth.decorators import login_required
from django.core.cache import cache
from django.core.files.storage import default_storage
from django.http import JsonResponse, HttpResponse
from django.template.loader import render_to_string
from async_downloads.cache import get_collection_key
from... | 32.6 | 82 | 0.698773 | 0 | 0 | 0 | 0 | 1,253 | 0.768712 | 0 | 0 | 333 | 0.204294 |
77e1cf7fad88dd83f35688487683b7260d719151 | 517 | py | Python | dltranz/data_load/augmentations/drop_day.py | KirillVladimirov/pytorch-lifestream | 83005b950d41de8afc11711fc955ffafb5ff7a9e | [
"Apache-2.0"
] | null | null | null | dltranz/data_load/augmentations/drop_day.py | KirillVladimirov/pytorch-lifestream | 83005b950d41de8afc11711fc955ffafb5ff7a9e | [
"Apache-2.0"
] | null | null | null | dltranz/data_load/augmentations/drop_day.py | KirillVladimirov/pytorch-lifestream | 83005b950d41de8afc11711fc955ffafb5ff7a9e | [
"Apache-2.0"
] | 1 | 2022-02-05T15:06:48.000Z | 2022-02-05T15:06:48.000Z | import numpy as np
import torch
class DropDay:
def __init__(self, event_time_name='event_time'):
self.event_time_name = event_time_name
def __call__(self, x):
mask = self.get_perm_ix(x[self.event_time_name])
new_x = {k: v[mask] for k, v in x.items()}
return new_x
@staticm... | 25.85 | 56 | 0.634429 | 482 | 0.932302 | 0 | 0 | 204 | 0.394584 | 0 | 0 | 12 | 0.023211 |
77e1ec7bc5d891f1b7dd17ef8b326f42e0381896 | 371 | py | Python | app/api_1_0/books.py | zheng-zy/flask_app | f9a720d76906bfbd48e2b28cf10c0923b9314649 | [
"Apache-2.0"
] | null | null | null | app/api_1_0/books.py | zheng-zy/flask_app | f9a720d76906bfbd48e2b28cf10c0923b9314649 | [
"Apache-2.0"
] | null | null | null | app/api_1_0/books.py | zheng-zy/flask_app | f9a720d76906bfbd48e2b28cf10c0923b9314649 | [
"Apache-2.0"
] | null | null | null | #!usr/bin/env python
# coding=utf-8
# Created by zhezhiyong@163.com on 2016/11/17.
from flask import jsonify
from . import api
from .. import mongodb
@api.route('/books/')
def get_books():
# id = mongodb.db.book.insert({'test':1})
books = mongodb.db.Book.find({})
for book in books:
print book
... | 18.55 | 46 | 0.619946 | 0 | 0 | 0 | 0 | 216 | 0.58221 | 0 | 0 | 137 | 0.369272 |
77e475b891c5acd960168cb4f57e50fe78d26b08 | 270 | py | Python | distrib/tests_platane.py | BonJovi1/Bullet-the-Blue-Sky | 9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f | [
"WTFPL"
] | 2 | 2019-10-13T02:56:35.000Z | 2020-04-04T08:57:13.000Z | distrib/tests_platane.py | BonJovi1/Bullet-the-Blue-Sky | 9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f | [
"WTFPL"
] | null | null | null | distrib/tests_platane.py | BonJovi1/Bullet-the-Blue-Sky | 9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f | [
"WTFPL"
] | null | null | null | from utils import *
Clean()
HgUpdate21()
PatchAll()
Build_VC11Express_64()
OptimusForceIntel()
RunAll()
OptimusForceNVIDIA()
RunAll()
Clean()
HgUpdate33()
PatchAll()
Build_VC11Express_64()
OptimusForceNVIDIA()
RunAll()
Clean()
HgUpdate33()
| 11.25 | 23 | 0.692593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
77e5180d6ab5330f71187b669f22ec6397e5429c | 514 | py | Python | custom/_legacy/pact/reports/admin_reports.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | custom/_legacy/pact/reports/admin_reports.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/_legacy/pact/reports/admin_reports.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.standard import CustomProjectReport
class PactAdminReport(GenericTabularReport, CustomProjectReport):
fields = ['corehq.apps.reports.filters.dates.DatespanFilter']
name = "PACT Admin Reports"
slug = "pactadmin"
email... | 24.47619 | 65 | 0.725681 | 386 | 0.750973 | 0 | 0 | 87 | 0.169261 | 0 | 0 | 126 | 0.245136 |
77e99bc3b885eac60af8099d66d105d9eea0d121 | 4,807 | py | Python | tests/test_helper.py | INM-6/correlation-toolbox | 26b9e999069990a8b756d8a4d880bd152f95149f | [
"MIT"
] | 1 | 2018-10-12T22:54:16.000Z | 2018-10-12T22:54:16.000Z | tests/test_helper.py | INM-6/correlation-toolbox | 26b9e999069990a8b756d8a4d880bd152f95149f | [
"MIT"
] | 6 | 2017-04-03T07:44:17.000Z | 2018-06-08T08:37:47.000Z | tests/test_helper.py | INM-6/correlation-toolbox | 26b9e999069990a8b756d8a4d880bd152f95149f | [
"MIT"
] | 2 | 2017-04-05T04:42:12.000Z | 2018-07-17T11:43:24.000Z | # global imports
import unittest
import numpy as np
from future.builtins import range
# local imports
import correlation_toolbox.helper as cthlp
class TestHelper(unittest.TestCase):
def setUp(self):
np.random.seed(12345)
self.rate = 30. # (Hz)
self.T = 3e4 # (ms)
self.N = 100
... | 44.100917 | 78 | 0.607239 | 4,610 | 0.959018 | 0 | 0 | 0 | 0 | 0 | 0 | 507 | 0.105471 |
77ea483e2f5d12c57ce4e04b7312ab2402473ea4 | 47 | py | Python | input.py | rooch001/RaspberryPi-DTU | baea2ad7a2eb8bdc45b56d6bde5d5bd3e3c30cfd | [
"MIT"
] | null | null | null | input.py | rooch001/RaspberryPi-DTU | baea2ad7a2eb8bdc45b56d6bde5d5bd3e3c30cfd | [
"MIT"
] | null | null | null | input.py | rooch001/RaspberryPi-DTU | baea2ad7a2eb8bdc45b56d6bde5d5bd3e3c30cfd | [
"MIT"
] | null | null | null | import os
import shutil
print(os.listdir('/')) | 11.75 | 22 | 0.723404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.06383 |
77eb25a04371bec64faee1671d09a1d02f6b7e59 | 3,783 | py | Python | Tareas/Tarea_4.py | JESUS-2120/Python_2 | b1854b4118215684eb1adb5acdbc3313c2a15f20 | [
"Apache-2.0"
] | null | null | null | Tareas/Tarea_4.py | JESUS-2120/Python_2 | b1854b4118215684eb1adb5acdbc3313c2a15f20 | [
"Apache-2.0"
] | null | null | null | Tareas/Tarea_4.py | JESUS-2120/Python_2 | b1854b4118215684eb1adb5acdbc3313c2a15f20 | [
"Apache-2.0"
] | null | null | null | '''
NAME
Tarea_4.py
VERSION
1.0
AUTHOR
Victor Jesus Enriquez Castro <victorec@lcg.unam.mx>
DESCRIPTION
Empleando Entrez.einfo y ENtrez.read el programa imprime la descripcion
de los campos FieldList y LinkList en la base de datos protein, de la misma
... | 32.333333 | 168 | 0.68755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,875 | 0.759979 |
77ebdf9ca9d4616e429b8e92977f8018b29b5675 | 3,464 | py | Python | HDPython/v_enum.py | HardwareDesignWithPython/HDPython | aade03aaa092b1684fa12bffd17674cf1c45f5ac | [
"MIT"
] | null | null | null | HDPython/v_enum.py | HardwareDesignWithPython/HDPython | aade03aaa092b1684fa12bffd17674cf1c45f5ac | [
"MIT"
] | null | null | null | HDPython/v_enum.py | HardwareDesignWithPython/HDPython | aade03aaa092b1684fa12bffd17674cf1c45f5ac | [
"MIT"
] | 1 | 2021-10-20T20:08:16.000Z | 2021-10-20T20:08:16.000Z | import os,sys,inspect
from HDPython.base import *
from HDPython.v_symbol import v_symbol
from HDPython.primitive_type_converter import get_primitive_hdl_converter
from HDPython.lib_enums import varSig, InOut_t
class v_enum(HDPython_base):
def __init__(self,EnumIn,EnumVal=None,name=None, Inout = InOut_t.Interna... | 28.162602 | 134 | 0.602483 | 3,239 | 0.935046 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.032044 |
77ecf310ae779764d67ed3eb67a498968e7015a3 | 2,146 | py | Python | setup.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | 12 | 2015-11-03T20:41:29.000Z | 2019-02-15T17:13:27.000Z | setup.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | 35 | 2015-08-23T17:10:00.000Z | 2017-05-10T12:08:57.000Z | setup.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import pip
from setuptools import setup, find_packages
import fabrik
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
package_exclude = ("tests*", "examples*")
packages = find_packages(exclude=package_exclu... | 26.825 | 76 | 0.596925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,144 | 0.532837 |
77ed35b54ba191d21237cd5df4a01654fd2c195e | 14 | py | Python | utokenize/testdata/comment_intra.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 126 | 2019-07-19T14:42:41.000Z | 2022-03-21T22:22:19.000Z | utokenize/testdata/comment_intra.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 38 | 2019-08-28T01:46:31.000Z | 2022-03-17T05:46:51.000Z | utokenize/testdata/comment_intra.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 55 | 2019-08-02T09:32:33.000Z | 2021-12-22T11:25:51.000Z | foo # comment
| 7 | 13 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.642857 |
77efdc6a298f42286268601e0029f556def6374b | 12,607 | py | Python | tool.py | Illidanz/MonoPriTranslation | 2cff8fe3133d76e1311273ef3b54dde428151390 | [
"MIT"
] | 3 | 2021-10-31T04:20:16.000Z | 2022-02-16T04:12:57.000Z | tool.py | Illidanz/MonoPriTranslation | 2cff8fe3133d76e1311273ef3b54dde428151390 | [
"MIT"
] | 1 | 2021-11-01T10:27:59.000Z | 2021-11-01T10:27:59.000Z | tool.py | Illidanz/MonoPriTranslation | 2cff8fe3133d76e1311273ef3b54dde428151390 | [
"MIT"
] | null | null | null | import codecs
import csv
import filecmp
import os
import time
import click
import pyimgur
import requests
from zipfile import ZipFile, ZIP_DEFLATED
from hacktools import common, wii
version = "1.5.5"
isofile = "data/disc.iso"
infolder = "data/extract/"
outfolder = "data/repack/"
replacefolder = "data/replace/"
fontin ... | 43.622837 | 129 | 0.560482 | 0 | 0 | 0 | 0 | 11,320 | 0.897487 | 0 | 0 | 3,066 | 0.243083 |
77f166eca841bd7df6212b114048257be00c424b | 50,437 | py | Python | sequana/bedtools.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | null | null | null | sequana/bedtools.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | null | null | null | sequana/bedtools.py | brwnj/sequana | 58f6ca47815bf7253f27e4631d971a0a479c3a63 | [
"BSD-3-Clause"
] | 1 | 2019-10-11T18:21:05.000Z | 2019-10-11T18:21:05.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Sequana software
#
# Copyright (c) 2016 - Sequana Development Team
#
# File author(s):
# Thomas Cokelaer <thomas.cokelaer@pasteur.fr>
# Dimitri Desvillechabrol <dimitri.desvillechabrol@pasteur.fr>,
# <d.desvillechabrol@gmail.com>
#
# Distributed un... | 36.761662 | 97 | 0.5606 | 49,356 | 0.978567 | 0 | 0 | 2,777 | 0.055059 | 0 | 0 | 18,756 | 0.37187 |
77f172359238ee4f9aa64dd9f0ca2c3d158a0bf1 | 1,989 | py | Python | tests/feed/test_refresh_user_feeds.py | sslavov93/rss_scraper | 4621e01b295de341d0921cade026b406f2b389e3 | [
"MIT"
] | 1 | 2020-09-17T12:40:34.000Z | 2020-09-17T12:40:34.000Z | tests/feed/test_refresh_user_feeds.py | sslavov93/rss_scraper | 4621e01b295de341d0921cade026b406f2b389e3 | [
"MIT"
] | null | null | null | tests/feed/test_refresh_user_feeds.py | sslavov93/rss_scraper | 4621e01b295de341d0921cade026b406f2b389e3 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from feed.models import FeedItem
from tests import BaseTestFixture, basic_auth_headers
class TestRefreshUserFeeds(BaseTestFixture):
def test_refresh_single_feed_when_not_authenticated(self):
response = self.client.post('/api/my-feeds/5/update')
self.assertEqual(401... | 38.25 | 86 | 0.691302 | 1,866 | 0.93816 | 0 | 0 | 1,201 | 0.603821 | 0 | 0 | 248 | 0.124686 |
77f23de07c25946522c768f1ef7e8ffca7391f96 | 2,272 | py | Python | qsrlib/src/qsrlib_qsrs/qsr_tpcc.py | alexiatoumpa/QSR_Detector | ff92a128dddb613690a49a7b4130afeac0dd4381 | [
"MIT"
] | 15 | 2015-06-15T16:50:37.000Z | 2022-03-27T09:25:56.000Z | qsrlib/src/qsrlib_qsrs/qsr_tpcc.py | alexiatoumpa/QSR_Detector | ff92a128dddb613690a49a7b4130afeac0dd4381 | [
"MIT"
] | 205 | 2015-01-22T12:02:59.000Z | 2022-03-29T11:59:55.000Z | qsrlib/src/qsrlib_qsrs/qsr_tpcc.py | alexiatoumpa/QSR_Detector | ff92a128dddb613690a49a7b4130afeac0dd4381 | [
"MIT"
] | 16 | 2015-02-04T23:13:18.000Z | 2022-03-08T13:45:53.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function, division
from qsrlib_qsrs.qsr_triadic_abstractclass import QSR_Triadic_1t_Abstractclass
import math
class QSR_TPCC(QSR_Triadic_1t_Abstractclass):
"""TPCC QSRs.
.. seealso:: For further details about TPCC, refer to its :doc:`description. <../handw... | 37.245902 | 108 | 0.559859 | 2,107 | 0.927377 | 0 | 0 | 571 | 0.25132 | 0 | 0 | 502 | 0.220951 |
77f3d071cf3be67ef3b31b8f16f8ea3ddb7f75dc | 9,434 | py | Python | baobab/configs/tdlmc_diagonal_config.py | aymgal/baobab | 960ddbd55fc4391f2b857f2232af38c45c809ae8 | [
"MIT"
] | null | null | null | baobab/configs/tdlmc_diagonal_config.py | aymgal/baobab | 960ddbd55fc4391f2b857f2232af38c45c809ae8 | [
"MIT"
] | null | null | null | baobab/configs/tdlmc_diagonal_config.py | aymgal/baobab | 960ddbd55fc4391f2b857f2232af38c45c809ae8 | [
"MIT"
] | null | null | null | import numpy as np
from addict import Dict
cfg = Dict()
cfg.name = 'tdlmc'
cfg.seed = 1113 # random seed
cfg.bnn_prior_class = 'DiagonalBNNPrior'
cfg.n_data = 200 # number of images to generate
cfg.train_vs_val = 'train'
cfg.components = ['lens_mass', 'external_shear', 'src_light', 'lens_light', 'agn_light']
cfg.chec... | 49.39267 | 178 | 0.246555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,521 | 0.161225 |
77f68b4f89363b8438a93d741379bb05a3a09d63 | 1,053 | py | Python | arrandmatrix/q17.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 79 | 2018-03-27T12:37:49.000Z | 2022-01-21T10:18:17.000Z | arrandmatrix/q17.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | null | null | null | arrandmatrix/q17.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 27 | 2018-04-08T03:07:06.000Z | 2021-10-30T00:01:50.000Z | """
问题描述:给定一个矩阵matrix,其中的值有正、负和0,返回子矩阵的最大累加和.
例如,矩阵matrix为
-90 48 78
64 -40 64
-81 -7 66
其中,最大累加和的子矩阵为:
48 78
-40 64
-7 66
所以返回累加和209.
例如,matrix为:
-1 -1 -1
-1 2 2
-1 -1 -1
其中,最大累加和的子矩阵为:
2 2
所以返回累加和为4.
"""
import sys
from arrandmatrix.q16 import MaxSum
class MaxMatrixSum:
@classmethod
def g... | 18.155172 | 69 | 0.545109 | 610 | 0.505385 | 0 | 0 | 580 | 0.48053 | 0 | 0 | 388 | 0.321458 |
77f69a445572611cb4e740401ece731d7139aa76 | 842 | py | Python | registro/migrations/0001_initial.py | lokcito/salute | 655a9407ca725785527f486b60162e406d140bfa | [
"bzip2-1.0.6"
] | null | null | null | registro/migrations/0001_initial.py | lokcito/salute | 655a9407ca725785527f486b60162e406d140bfa | [
"bzip2-1.0.6"
] | null | null | null | registro/migrations/0001_initial.py | lokcito/salute | 655a9407ca725785527f486b60162e406d140bfa | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-22 00:26
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Persona',
fields=[
('id', models.AutoField(... | 32.384615 | 114 | 0.589074 | 749 | 0.889549 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.186461 |
77f7e72e1c1010465e3c08a2178c53ca02ebd59a | 362 | py | Python | Beginner/Easy Math/easy_math.py | agnisain123/CodeChef-1 | c6316b179e4b055eb17ead9df8f93505d8fc1166 | [
"Apache-2.0"
] | null | null | null | Beginner/Easy Math/easy_math.py | agnisain123/CodeChef-1 | c6316b179e4b055eb17ead9df8f93505d8fc1166 | [
"Apache-2.0"
] | null | null | null | Beginner/Easy Math/easy_math.py | agnisain123/CodeChef-1 | c6316b179e4b055eb17ead9df8f93505d8fc1166 | [
"Apache-2.0"
] | null | null | null | t=int(input())
for _ in range(t):
n=int(input())
a=list(map(int, input().split()))
max_sum=0
for j in range(n):
for k in range(j+1, n):
num=a[j]*a[k]
add=0
while(num!=0):
add+=num%10
num=num//10
if max_sum<add:
... | 22.625 | 37 | 0.428177 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
77f8db530c6e11a50fc91ef02feb1663a2228e2e | 25 | py | Python | utokenize/testdata/func_varargs.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 126 | 2019-07-19T14:42:41.000Z | 2022-03-21T22:22:19.000Z | utokenize/testdata/func_varargs.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 38 | 2019-08-28T01:46:31.000Z | 2022-03-17T05:46:51.000Z | utokenize/testdata/func_varargs.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 55 | 2019-08-02T09:32:33.000Z | 2021-12-22T11:25:51.000Z | def foo(a, *b):
pass
| 8.333333 | 15 | 0.48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
77fb88e214d8327d25cb3dbd91a4d85fb6136d9e | 5,686 | py | Python | openapi_client/models/validation_error.py | brighthive/jdx-client-api-python | ed94c578a6c9a5e9aadf8764439c22783ac1d9d5 | [
"Apache-2.0"
] | null | null | null | openapi_client/models/validation_error.py | brighthive/jdx-client-api-python | ed94c578a6c9a5e9aadf8764439c22783ac1d9d5 | [
"Apache-2.0"
] | null | null | null | openapi_client/models/validation_error.py | brighthive/jdx-client-api-python | ed94c578a6c9a5e9aadf8764439c22783ac1d9d5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
JDX reference application API
This is a collection of schemas and endpoints for the various JDX, Concentric Sky facing REST endpoints, the schemas define an API contract of sorts between the request and response expectations of the JDX reference application. This API is to be mutually deve... | 32.678161 | 317 | 0.615195 | 5,116 | 0.899754 | 0 | 0 | 2,409 | 0.423672 | 0 | 0 | 2,981 | 0.52427 |
77fd511d1f33029866da7ab3ca7352cff624cfec | 435 | py | Python | exercises/play_ground/pg_008.py | EngineerToBe/python-labs | dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf | [
"Apache-2.0"
] | null | null | null | exercises/play_ground/pg_008.py | EngineerToBe/python-labs | dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf | [
"Apache-2.0"
] | null | null | null | exercises/play_ground/pg_008.py | EngineerToBe/python-labs | dbedcf1f8ebb4bdf756c732ad65c3b737df62cdf | [
"Apache-2.0"
] | null | null | null | # Some say that every one year of a human’s life is equivalent to seven years of a dog’s life.
# Write a function named dog_years() that has two parameters named name and age.
# The function should compute the age in dog years and return the following string:
# "{name}, you are {age} years old in dog years"
def dog_y... | 43.5 | 95 | 0.698851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.794989 |
77ff924bd9452e672bd6d921994120546cb53305 | 102 | py | Python | custom_components/matts_gadgets_ceiling_fan/const.py | mattyway/matts_gadgets_ceiling_fan | f7b353fb9752f87569ec1925d08804a83e6715cf | [
"MIT"
] | null | null | null | custom_components/matts_gadgets_ceiling_fan/const.py | mattyway/matts_gadgets_ceiling_fan | f7b353fb9752f87569ec1925d08804a83e6715cf | [
"MIT"
] | null | null | null | custom_components/matts_gadgets_ceiling_fan/const.py | mattyway/matts_gadgets_ceiling_fan | f7b353fb9752f87569ec1925d08804a83e6715cf | [
"MIT"
] | null | null | null | """Constants for the Matt's Gadgets Ceiling Fan integration."""
DOMAIN = "matts_gadgets_ceiling_fan"
| 25.5 | 63 | 0.77451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.882353 |
ae0070be3b3f3ac59a97d47087604c2b0da1ad24 | 393 | py | Python | src/spaceone/repository/manager/repository_manager/local_repository_manager.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | src/spaceone/repository/manager/repository_manager/local_repository_manager.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | src/spaceone/repository/manager/repository_manager/local_repository_manager.py | choonho/repository | 9522ecad06dd4e36c718e203864d1d58574cdbfc | [
"Apache-2.0"
] | null | null | null | from spaceone.repository.manager.repository_manager import RepositoryManager
class LocalRepositoryManager(RepositoryManager):
def register_repository(self, params):
"""
Args:
params:
- name
- repository_type: local
"""
# Assume there is ... | 24.5625 | 76 | 0.628499 | 313 | 0.796438 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.396947 |
ae03795c6c2f7e8cd5507cfab2b5d4572af1aac3 | 1,522 | py | Python | src/python/WMCore/WMBS/MySQL/Files/AddToFileset.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 21 | 2015-11-19T16:18:45.000Z | 2021-12-02T18:20:39.000Z | src/python/WMCore/WMBS/MySQL/Files/AddToFileset.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 5,671 | 2015-01-06T14:38:52.000Z | 2022-03-31T22:11:14.000Z | src/python/WMCore/WMBS/MySQL/Files/AddToFileset.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 67 | 2015-01-21T15:55:38.000Z | 2022-02-03T19:53:13.000Z | #!/usr/bin/env python
"""
_AddToFileset_
MySQL implementation of Files.AddToFileset
"""
import time
from WMCore.Database.DBFormatter import DBFormatter
class AddToFileset(DBFormatter):
sql = """INSERT IGNORE INTO wmbs_fileset_files (fileid, fileset, insert_time)
SELECT wmbs_file_details.id, :file... | 36.238095 | 84 | 0.580158 | 1,365 | 0.896846 | 0 | 0 | 0 | 0 | 0 | 0 | 782 | 0.513798 |
7ac3121e87d675bdde978afec9d75c5cc0beed90 | 537 | py | Python | geo/models/keras/evaluation.py | stefantaubert/life | 14fe8c0d631eb22f6c3f9e41430dbcfcd1718012 | [
"MIT"
] | 2 | 2018-06-28T13:02:35.000Z | 2018-12-25T08:58:26.000Z | geo/models/keras/evaluation.py | stefantaubert/life | 14fe8c0d631eb22f6c3f9e41430dbcfcd1718012 | [
"MIT"
] | null | null | null | geo/models/keras/evaluation.py | stefantaubert/life | 14fe8c0d631eb22f6c3f9e41430dbcfcd1718012 | [
"MIT"
] | null | null | null | import module_support_main
import pandas as pd
import mrr
import numpy as np
import settings_main as settings
import get_ranks
def evaluate_results_from_files(submission_path, gt_path, species_map_path):
print("Evaluate submission...")
print("Load data...")
df = pd.read_csv(submission_path, sep=';')
y ... | 29.833333 | 76 | 0.724395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.148976 |
7ac3b18e2b2f5eb9e5b456e6eaeeeea667be53a4 | 2,210 | py | Python | backend/src/Blueprints/Posts.py | mechaadi/OnlineLawyerSuite | a5debc337afe3f3693978177bf53d7646ae3536b | [
"MIT"
] | 3 | 2020-05-31T12:31:16.000Z | 2021-08-29T00:00:01.000Z | backend/src/Blueprints/Posts.py | mechaadi/OnlineLawyerSuite | a5debc337afe3f3693978177bf53d7646ae3536b | [
"MIT"
] | 21 | 2020-05-28T16:16:03.000Z | 2022-02-27T06:51:53.000Z | backend/src/Blueprints/Posts.py | mechaadi/OnlineLawyerSuite | a5debc337afe3f3693978177bf53d7646ae3536b | [
"MIT"
] | null | null | null | from flask import Flask, Blueprint, g, request
from src.model import Post, File
from src.db import db
from src.Middlewares.AuthMiddleware import *
from werkzeug.utils import secure_filename
import os
import dateutil.parser as dt
post_bp = Blueprint('post', __name__, url_prefix='/posts')
def respond(data, code):
... | 24.555556 | 95 | 0.609502 | 0 | 0 | 0 | 0 | 1,697 | 0.767873 | 0 | 0 | 263 | 0.119005 |
7ac6dc3dc3bb8ad5ce9781cd7166fbd71e9510f9 | 9,349 | py | Python | felpy/analysis/optics/complex/coherence.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 1 | 2021-03-15T14:04:19.000Z | 2021-03-15T14:04:19.000Z | felpy/analysis/optics/complex/coherence.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 2 | 2021-11-27T11:55:48.000Z | 2021-11-27T11:56:26.000Z | felpy/analysis/optics/complex/coherence.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 15 14:24:28 2020
@author: twguest
"""
import os
import numpy as np
from time import time
from wpg import srwlib
from felpy.model.tools import radial_profile
#from wpg.wpg_uti_wf import get_axis
from tqdm import tqdm
from felpy.utils.job_utils imp... | 27.578171 | 93 | 0.568403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,883 | 0.308375 |
7ac87bf72cc8a3c3039638b11a435af514a8fc27 | 911 | py | Python | training_program_2019/core_python/basic/threading_join.py | jeffrey-zhang/learn | 7d9d53f955f0424ad4c68f69d5538867e5b7fa98 | [
"Apache-2.0"
] | 1 | 2020-10-12T01:23:51.000Z | 2020-10-12T01:23:51.000Z | training_program_2019/core_python/basic/threading_join.py | jeffrey-zhang/learn | 7d9d53f955f0424ad4c68f69d5538867e5b7fa98 | [
"Apache-2.0"
] | 1 | 2020-10-11T10:38:21.000Z | 2020-10-11T10:38:21.000Z | training_program_2019/core_python/basic/threading_join.py | jeffrey-zhang/learn | 7d9d53f955f0424ad4c68f69d5538867e5b7fa98 | [
"Apache-2.0"
] | 1 | 2020-09-07T07:22:54.000Z | 2020-09-07T07:22:54.000Z | import threading
import time
products = []
condition = threading.Condition()
class consumer(threading.Thread):
def consume(self):
global condition
global products
condition.acquire()
if len(products) == 0:
condition.wait()
print('consumer is notified: no pr... | 24.621622 | 95 | 0.594951 | 830 | 0.911087 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.184413 |
7ac89552408a022b01f6bab28396624e4b438a5a | 2,168 | py | Python | tests/meltano/core/test_utils.py | Mu-L/meltano | 7bf8f370608ee9a8833b33ea94112c6e219c8161 | [
"MIT"
] | null | null | null | tests/meltano/core/test_utils.py | Mu-L/meltano | 7bf8f370608ee9a8833b33ea94112c6e219c8161 | [
"MIT"
] | null | null | null | tests/meltano/core/test_utils.py | Mu-L/meltano | 7bf8f370608ee9a8833b33ea94112c6e219c8161 | [
"MIT"
] | null | null | null | import pytest # noqa: F401
from meltano.core.utils import flatten, nest, pop_at_path, set_at_path
def test_nest():
subject = {}
one_deep = nest(subject, "a.b")
one_deep["val"] = 1
assert one_deep == {"val": 1}
two_deep = nest(subject, "a.b.c")
two_deep["val"] = 2
assert one_deep == {"v... | 27.1 | 72 | 0.565959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.249539 |
7ac9a5104e19b66025a9a8ecc99a6c8ec491db7d | 927 | py | Python | phc/easy/diagnostic_report.py | taylordeatri/phc-sdk-py | 8f3ec6ac44e50c7194f174fd0098de390886693d | [
"MIT"
] | 1 | 2020-07-22T12:46:58.000Z | 2020-07-22T12:46:58.000Z | phc/easy/diagnostic_report.py | taylordeatri/phc-sdk-py | 8f3ec6ac44e50c7194f174fd0098de390886693d | [
"MIT"
] | 54 | 2019-10-09T16:19:04.000Z | 2022-01-19T20:28:59.000Z | phc/easy/diagnostic_report.py | taylordeatri/phc-sdk-py | 8f3ec6ac44e50c7194f174fd0098de390886693d | [
"MIT"
] | 2 | 2019-10-30T19:54:43.000Z | 2020-12-03T18:57:15.000Z | import pandas as pd
from phc.easy.frame import Frame
from phc.easy.abstract.fhir_service_patient_item import FhirServicePatientItem
class DiagnosticReport(FhirServicePatientItem):
@staticmethod
def table_name():
return "diagnostic_report"
@staticmethod
def patient_id_prefixes():
retu... | 26.485714 | 78 | 0.638619 | 791 | 0.85329 | 0 | 0 | 715 | 0.771305 | 0 | 0 | 117 | 0.126214 |
7ac9c5a18f03b6f72c0a1607e900467a67c17aa0 | 1,048 | py | Python | tests/performance/test_mm_lazy_eval.py | varun19299/FeatherMap | a3991ce48eed98584bc12d6ddcb6409ef3db5d60 | [
"MIT"
] | 14 | 2020-11-05T00:24:40.000Z | 2022-03-30T15:22:31.000Z | tests/performance/test_mm_lazy_eval.py | varun19299/FeatherMap | a3991ce48eed98584bc12d6ddcb6409ef3db5d60 | [
"MIT"
] | 4 | 2020-10-01T00:46:39.000Z | 2021-02-26T23:38:09.000Z | tests/performance/test_mm_lazy_eval.py | varun19299/FeatherMap | a3991ce48eed98584bc12d6ddcb6409ef3db5d60 | [
"MIT"
] | 2 | 2020-11-09T13:09:10.000Z | 2021-02-18T11:09:32.000Z | import torch
from feathermap.utils import timed
from math import sqrt
dim_in = 2 ** 14
dim_out = 2 ** 4
A = torch.randn(dim_in, dim_out)
B = torch.randn(dim_out, dim_in)
C = torch.rand(dim_in, dim_in)
D = torch.rand(dim_in, dim_in)
E = torch.rand(1, dim_out)
F = torch.rand(dim_out, dim_in)
G = torch.rand(int(sqrt(dim... | 18.714286 | 52 | 0.578244 | 0 | 0 | 219 | 0.208969 | 205 | 0.195611 | 0 | 0 | 114 | 0.108779 |
7ad04a1e5c739e7d4690a2753dc470af7567beec | 785 | py | Python | PythonWeb/example/App/urls.py | JimouChen/python-application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | 1 | 2020-08-09T12:47:27.000Z | 2020-08-09T12:47:27.000Z | PythonWeb/example/App/urls.py | JimouChen/Python_Application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | null | null | null | PythonWeb/example/App/urls.py | JimouChen/Python_Application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.urls import path
from App import views
app_name = 'App'
urlpatterns = [
path('', views.home, name='home'),
# 增删改
path('cud/', views.handle_data, name='handle_data'),
# 查询
path('search/', views.find_data, name='search'),
# 使用原生sql
path('rawsql/',... | 27.068966 | 66 | 0.63949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 344 | 0.392246 |
7ad2462093f3bfe8307d27ce00eeee4b819dafcf | 5,098 | py | Python | carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py | umateusz/ros-bridge | e1a99d94eca9fa82c7bfb8417d2282ef6939d8fa | [
"MIT"
] | null | null | null | carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py | umateusz/ros-bridge | e1a99d94eca9fa82c7bfb8417d2282ef6939d8fa | [
"MIT"
] | null | null | null | carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py | umateusz/ros-bridge | e1a99d94eca9fa82c7bfb8417d2282ef6939d8fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
"""
Agent for Walker
"""
import math
from nav_msgs.msg import Path, Odometry
from std_msgs.msg import Float64
from geometry_msgs.msg imp... | 29.988235 | 92 | 0.594547 | 4,044 | 0.793252 | 0 | 0 | 0 | 0 | 0 | 0 | 1,094 | 0.214594 |
7ad29cf27964c995c953363ee94f815f643e4137 | 44 | py | Python | sdk/exception/exceed_limit_exception.py | CLG0125/elemesdk | 344466398bad7cf026e082e47c77d3ca98621ef3 | [
"MIT"
] | 1 | 2021-04-03T05:11:29.000Z | 2021-04-03T05:11:29.000Z | sdk/exception/exceed_limit_exception.py | CLG0125/elemesdk | 344466398bad7cf026e082e47c77d3ca98621ef3 | [
"MIT"
] | null | null | null | sdk/exception/exceed_limit_exception.py | CLG0125/elemesdk | 344466398bad7cf026e082e47c77d3ca98621ef3 | [
"MIT"
] | null | null | null |
class ExceedLimitException(Exception):pass
| 14.666667 | 42 | 0.863636 | 42 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ad5b9de70a9e9b65388bd37817ad835c2ba9f1f | 5,125 | py | Python | megyr/config_validation.py | ExcaliburZero/megyr | f5543cebe0562c78b5d3c710bd6f11c0efbff25b | [
"MIT"
] | 1 | 2020-11-17T20:35:09.000Z | 2020-11-17T20:35:09.000Z | megyr/config_validation.py | ExcaliburZero/megyr | f5543cebe0562c78b5d3c710bd6f11c0efbff25b | [
"MIT"
] | 17 | 2018-09-25T18:37:17.000Z | 2020-03-31T03:54:36.000Z | megyr/config_validation.py | ExcaliburZero/megyr | f5543cebe0562c78b5d3c710bd6f11c0efbff25b | [
"MIT"
] | null | null | null | from typing import Any, Dict, List
def validate_config(config: Dict[str, Any]) -> List[str]:
errors: List[str] = []
assert_to_list(
errors,
"input" in config,
'[no_input] Could not find "input" section in config. "input" section must be present in order to run MESA or GYRE.',
)
... | 33.717105 | 202 | 0.606244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,484 | 0.484683 |
7ad6399647944ee35628a46c260ef1d398254324 | 81 | py | Python | src/polytropon/__init__.py | xhlulu/polytropon | fd4df35a479f17ca1e3f568d96a95c1b8b5b518f | [
"MIT"
] | 14 | 2022-03-02T10:25:22.000Z | 2022-03-13T01:22:08.000Z | src/polytropon/__init__.py | xhlulu/polytropon | fd4df35a479f17ca1e3f568d96a95c1b8b5b518f | [
"MIT"
] | 2 | 2022-03-02T15:56:37.000Z | 2022-03-29T17:40:34.000Z | src/polytropon/__init__.py | xhlulu/polytropon | fd4df35a479f17ca1e3f568d96a95c1b8b5b518f | [
"MIT"
] | 2 | 2022-03-02T15:59:47.000Z | 2022-03-03T01:14:45.000Z | from . import adapters, utils
from .polytropon import VARIANT2CLASS, SkilledMixin | 40.5 | 51 | 0.839506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ad705963a4ae17d0227c03011bc22494dcbdf66 | 674 | py | Python | cdhweb/pages/tests/test_context_processors.py | bwhicks/cdh-web | d6002dc1933a4d6e97f5459aafc9ab92cb1f8050 | [
"Apache-2.0"
] | 1 | 2017-11-21T16:02:33.000Z | 2017-11-21T16:02:33.000Z | cdhweb/pages/tests/test_context_processors.py | bwhicks/cdh-web | d6002dc1933a4d6e97f5459aafc9ab92cb1f8050 | [
"Apache-2.0"
] | 367 | 2017-08-14T16:05:41.000Z | 2021-11-03T15:29:18.000Z | cdhweb/pages/tests/test_context_processors.py | bwhicks/cdh-web | d6002dc1933a4d6e97f5459aafc9ab92cb1f8050 | [
"Apache-2.0"
] | 5 | 2017-09-08T21:08:49.000Z | 2020-10-02T04:39:37.000Z | import pytest
from wagtail.core.models import Page
from cdhweb.pages.context_processors import page_intro
from cdhweb.pages.models import LinkPage, PageIntro
@pytest.mark.django_db
def test_page_intro(rf):
root = Page.objects.get(title="Root")
link_page = LinkPage(title="Students", link_url="people/students"... | 32.095238 | 75 | 0.718101 | 0 | 0 | 0 | 0 | 512 | 0.759644 | 0 | 0 | 173 | 0.256677 |
7ad8ae63fb76ddfd06eb6578ef0cef5a87d9b13a | 641 | py | Python | tri_selection.py | Erwanexyz/Python | 1197c0a27530b60e6cbe048758bfe86f0e159e95 | [
"MIT"
] | 1 | 2017-09-07T09:14:55.000Z | 2017-09-07T09:14:55.000Z | tri_selection.py | Erwanexyz/Python | 1197c0a27530b60e6cbe048758bfe86f0e159e95 | [
"MIT"
] | null | null | null | tri_selection.py | Erwanexyz/Python | 1197c0a27530b60e6cbe048758bfe86f0e159e95 | [
"MIT"
] | null | null | null | def tri_selection(tableau):
'''tri_selection (list(object) -> list(object)): trie un tableau'''
# Initialisation
'''taille (int) : taille du tableau'''
taille = len(tableau)
# Début du traitement
# Pour chaque élément tableau[i] du tableau
for i in range(taille):
# Pour chaque j... | 37.705882 | 79 | 0.609984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.473765 |
7ad8d19aeb7a5e334f966fd5933774700a903b04 | 5,297 | py | Python | main.py | AKBakshay/DCNet | 94d30ae44c95a8db7f7474fcf8cf63347271c1cb | [
"MIT"
] | 3 | 2021-04-18T07:56:18.000Z | 2021-08-15T11:30:25.000Z | main.py | AKBakshay/DCNet | 94d30ae44c95a8db7f7474fcf8cf63347271c1cb | [
"MIT"
] | null | null | null | main.py | AKBakshay/DCNet | 94d30ae44c95a8db7f7474fcf8cf63347271c1cb | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
import torch
import torch.utils.data
import yaml
from torchvision import transforms
import src.config.config as config
from src.model.nn.dcnet import DCNet
from src.test.predictor import Predictor
from src.test.tester import Tester
from src.train.trainer import Trainer
... | 32.496933 | 92 | 0.570512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,597 | 0.301491 |
7ada8d12418618cb46c91bcc7ce0df76b2c106a3 | 1,645 | py | Python | metagenscope_cli/cli/run_cli.py | LongTailBio/python-metagenscope | 0c29042774a09e832fcecd0662657ac6e4895dea | [
"MIT"
] | null | null | null | metagenscope_cli/cli/run_cli.py | LongTailBio/python-metagenscope | 0c29042774a09e832fcecd0662657ac6e4895dea | [
"MIT"
] | 6 | 2018-10-30T23:51:55.000Z | 2018-11-01T20:41:23.000Z | metagenscope_cli/cli/run_cli.py | LongTailBio/python-metagenscope | 0c29042774a09e832fcecd0662657ac6e4895dea | [
"MIT"
] | null | null | null | """CLI to run commands on MGS server."""
from sys import stderr
import click
from .utils import add_authorization
@click.group()
def run():
"""Run actions on the server."""
pass
@run.group()
def middleware():
"""Run middleware."""
pass
@middleware.command(name='group')
@add_authorization()
@clic... | 29.909091 | 90 | 0.646809 | 0 | 0 | 0 | 0 | 1,517 | 0.922188 | 0 | 0 | 565 | 0.343465 |
7adab11f81fe9641b079dc6d9cfecadb798ccba4 | 165 | py | Python | ergo/contrib/utils/utils.py | bmillwood/ergo | 34be736f1979ad7f1f130bb90728270cb58dbfe8 | [
"MIT"
] | 93 | 2020-04-16T03:49:55.000Z | 2022-03-26T14:56:29.000Z | ergo/contrib/utils/utils.py | bmillwood/ergo | 34be736f1979ad7f1f130bb90728270cb58dbfe8 | [
"MIT"
] | 326 | 2020-03-25T17:49:11.000Z | 2021-03-25T03:19:51.000Z | ergo/contrib/utils/utils.py | bmillwood/ergo | 34be736f1979ad7f1f130bb90728270cb58dbfe8 | [
"MIT"
] | 26 | 2020-03-25T03:18:58.000Z | 2022-03-18T21:19:11.000Z | from datetime import timedelta
def daterange(start_date, end_date):
for n in range(int((end_date - start_date).days)):
yield start_date + timedelta(n)
| 23.571429 | 54 | 0.715152 | 0 | 0 | 131 | 0.793939 | 0 | 0 | 0 | 0 | 0 | 0 |
7add913572dab6aa965813722b95547e25bae2fd | 248 | py | Python | uts/session_py/5.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/session_py/5.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/session_py/5.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | import sys
sys.stdin = open("input.txt", "r")
sys.stdout = open("output.txt", "w")
n, m = map(int, input().split())
n_mas = [0 for i in range(n)]
for i in range(m):
for j in list(map(int, input().split())):
n_mas[j-1] += 1
print(*n_mas) | 27.555556 | 45 | 0.584677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.116935 |
7addb1ac9be726107051f2594c1af6bf1d661239 | 9,183 | py | Python | nitroml/automl/ensemble_selection/subpipeline.py | google/nitroml | 5eabdbe6de85ff7fdae4fefda7547c0c031f9431 | [
"Apache-2.0"
] | 43 | 2020-09-13T18:07:15.000Z | 2022-01-05T19:05:28.000Z | nitroml/automl/ensemble_selection/subpipeline.py | google/nitroml | 5eabdbe6de85ff7fdae4fefda7547c0c031f9431 | [
"Apache-2.0"
] | 4 | 2020-09-14T13:15:09.000Z | 2021-11-21T11:21:13.000Z | nitroml/automl/ensemble_selection/subpipeline.py | google/nitroml | 5eabdbe6de85ff7fdae4fefda7547c0c031f9431 | [
"Apache-2.0"
] | 5 | 2020-09-14T13:03:04.000Z | 2021-10-21T01:55:48.000Z | # Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.453744 | 86 | 0.732658 | 3,969 | 0.432212 | 0 | 0 | 2,895 | 0.315256 | 0 | 0 | 3,154 | 0.343461 |
7ade72c37577df6464ca8dc5d4f8c8a62f6533b2 | 246 | py | Python | ndn_python_repo/handle/__init__.py | susmit85/ndn-python-repo | 45a76bd3e78b0157e364413d62d3aaa51cd20353 | [
"Apache-2.0"
] | 5 | 2020-03-23T01:32:12.000Z | 2020-10-03T14:36:19.000Z | ndn_python_repo/handle/__init__.py | susmit85/ndn-python-repo | 45a76bd3e78b0157e364413d62d3aaa51cd20353 | [
"Apache-2.0"
] | 48 | 2020-01-24T04:29:14.000Z | 2020-12-11T09:08:50.000Z | ndn_python_repo/handle/__init__.py | susmit85/ndn-python-repo | 45a76bd3e78b0157e364413d62d3aaa51cd20353 | [
"Apache-2.0"
] | 6 | 2020-02-20T00:05:33.000Z | 2020-11-27T05:27:14.000Z | from .read_handle import ReadHandle
from .command_handle_base import CommandHandle
from .write_command_handle import WriteCommandHandle
from .delete_command_handle import DeleteCommandHandle
from .tcp_bulk_insert_handle import TcpBulkInsertHandle | 49.2 | 55 | 0.902439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ade9e743940d11d6af70b1681562c89779125eb | 23,545 | py | Python | main/academy/views.py | UsamaKashif/studentutor | 7aa5407ac81134a49e474726220e48beaadc9390 | [
"MIT"
] | 7 | 2021-01-17T23:10:15.000Z | 2021-02-01T21:35:36.000Z | main/academy/views.py | DiveshTheReal/studentutor | 0d3ef57887bde4dd2ee40d68015598f9c8052ffd | [
"MIT"
] | 7 | 2021-01-17T15:10:47.000Z | 2022-03-12T00:53:49.000Z | main/academy/views.py | DiveshTheReal/studentutor | 0d3ef57887bde4dd2ee40d68015598f9c8052ffd | [
"MIT"
] | 3 | 2021-01-18T09:36:16.000Z | 2021-01-20T16:29:40.000Z | from django.shortcuts import render,redirect
from django.contrib.auth.models import Group
from .forms import AcademySignUpForm, AcademyProfile, ProfilePicture, PostAnAdForm, AboutAcademyForm
from django.contrib.auth.models import User
from django.views.generic import RedirectView
from .decorators import unauthentic... | 33.302687 | 149 | 0.615715 | 0 | 0 | 0 | 0 | 18,668 | 0.792865 | 0 | 0 | 3,862 | 0.164026 |
7adffba1ca679eea400ec7eeac7d960a50759561 | 1,019 | py | Python | exercises/Desafio042.py | zThiago15/Curso-em-Video | ef25e0497edb79bdfbe71fde485f4dafc0d2a0e6 | [
"MIT"
] | null | null | null | exercises/Desafio042.py | zThiago15/Curso-em-Video | ef25e0497edb79bdfbe71fde485f4dafc0d2a0e6 | [
"MIT"
] | null | null | null | exercises/Desafio042.py | zThiago15/Curso-em-Video | ef25e0497edb79bdfbe71fde485f4dafc0d2a0e6 | [
"MIT"
] | 1 | 2021-07-24T21:39:26.000Z | 2021-07-24T21:39:26.000Z | cores = {'limpar':'\033[m', 'vermelho':'\033[1;31m','ciano':'\033[1;36m','azul':'\033[1;34m','amarelo':'\033[1;33m','verde':'\033[1;32m'}
print('===== Tipo de Triângulo -> Aprimoramento do Desafio 35 =====')
print()
s1 = float(input('Primeiro segmento: '))
s2 = float(input('Segundo segmento: '))
s3 = float(input('Terc... | 48.52381 | 137 | 0.618253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 733 | 0.714425 |
7ae0cbb3da1cad9d593dd273b1430c763adce93f | 2,628 | py | Python | bin/Lib/tkinter/test/support.py | yousafsyed/casperjs | ed077ae9e42cf8fb9e023e9b6840d3cea11bac40 | [
"MIT"
] | 36 | 2015-02-04T10:43:31.000Z | 2022-03-30T13:01:12.000Z | bin/Lib/tkinter/test/support.py | yousafsyed/casperjs | ed077ae9e42cf8fb9e023e9b6840d3cea11bac40 | [
"MIT"
] | 9 | 2015-03-17T05:56:16.000Z | 2021-11-17T09:31:50.000Z | bin/Lib/tkinter/test/support.py | yousafsyed/casperjs | ed077ae9e42cf8fb9e023e9b6840d3cea11bac40 | [
"MIT"
] | 22 | 2015-05-13T17:37:35.000Z | 2022-01-25T06:24:42.000Z | import sys
import tkinter
import unittest
from test.support import requires
def get_tk_root():
requires('gui') # raise exception if tk unavailable
try:
root = tkinter._default_root
except AttributeError:
# it is possible to disable default root in Tkinter, although
# I h... | 28.565217 | 73 | 0.603501 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.183409 |
7ae53592b868323acd8715b4da2629ff4da665fd | 301 | py | Python | module08-mongodb.programming.using.pymongo/hr/domain.py | deepcloudlabs/dcl162-2020-sep-09 | dc05aa6e644610fe0cdb8f9de1074763fc77a3bb | [
"MIT"
] | null | null | null | module08-mongodb.programming.using.pymongo/hr/domain.py | deepcloudlabs/dcl162-2020-sep-09 | dc05aa6e644610fe0cdb8f9de1074763fc77a3bb | [
"MIT"
] | null | null | null | module08-mongodb.programming.using.pymongo/hr/domain.py | deepcloudlabs/dcl162-2020-sep-09 | dc05aa6e644610fe0cdb8f9de1074763fc77a3bb | [
"MIT"
] | 1 | 2020-10-04T10:58:31.000Z | 2020-10-04T10:58:31.000Z | class Employee():
def __init__(self,identity, fullname, salary, email, birth_year,iban):
self.identity = identity
self.fullname = fullname
self.salary = salary
self.email = email
self.birth_year = birth_year
self.iban = iban
self.version = 1 | 33.444444 | 74 | 0.621262 | 301 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ae5c9480c9d4736f4023646d3b8790e5fc94459 | 924 | py | Python | setup.py | impergator493/PySeus | faa7e5741acea9c3b8e0acad066905fa3b1c301b | [
"X11"
] | 2 | 2020-02-17T09:20:50.000Z | 2022-03-22T13:05:22.000Z | setup.py | impergator493/PySeus | faa7e5741acea9c3b8e0acad066905fa3b1c301b | [
"X11"
] | null | null | null | setup.py | impergator493/PySeus | faa7e5741acea9c3b8e0acad066905fa3b1c301b | [
"X11"
] | 1 | 2021-05-26T08:14:58.000Z | 2021-05-26T08:14:58.000Z | from io import open
from setuptools import setup, find_packages
setup(
name='pyseus',
version='0.1',
description='PySeus is a minimal viewer for medical imaging data.',
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
url='http://github... | 24.315789 | 71 | 0.58658 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 357 | 0.386364 |
7ae6eee9c017c38595289696d2aff8e25f24cb29 | 1,753 | py | Python | databricks/pixels/path_extractor.py | dmoore247/pixels | cf78ab016530c42bc36538a9b812fe23107f87d7 | [
"Apache-2.0"
] | 2 | 2021-03-28T18:50:50.000Z | 2021-08-09T02:06:15.000Z | databricks/pixels/path_extractor.py | dmoore247/pixels | cf78ab016530c42bc36538a9b812fe23107f87d7 | [
"Apache-2.0"
] | null | null | null | databricks/pixels/path_extractor.py | dmoore247/pixels | cf78ab016530c42bc36538a9b812fe23107f87d7 | [
"Apache-2.0"
] | null | null | null | from pyspark.ml.pipeline import Transformer
import pyspark.sql.functions as f
import pyspark.sql.types as t
from pyspark.sql import DataFrame
class PathExtractor(Transformer):
# Day extractor inherit of property of Transformer
def __init__(self, inputCol='path', tagsCol = "tags", basePath='dbfs:/'):
s... | 42.756098 | 111 | 0.557901 | 1,610 | 0.918426 | 0 | 0 | 773 | 0.440958 | 0 | 0 | 421 | 0.24016 |
7ae87b35274b2c9c47cbad11cf4cc8f53a9dfec9 | 9,371 | py | Python | microbenchmarks/sort2_20.py | jmgc/pyston | 9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | microbenchmarks/sort2_20.py | jmgc/pyston | 9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | microbenchmarks/sort2_20.py | jmgc/pyston | 9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | def f(l):
if l[0] > l[1]: l[0], l[1] = l[1], l[0]
if l[0] > l[2]: l[0], l[2] = l[2], l[0]
if l[0] > l[3]: l[0], l[3] = l[3], l[0]
if l[0] > l[4]: l[0], l[4] = l[4], l[0]
if l[0] > l[5]: l[0], l[5] = l[5], l[0]
if l[0] > l[6]: l[0], l[6] = l[6], l[0]
if l[0] > l[7]: l[0], l[7] = l[7], l[0]
if l[0] > l[8]... | 46.162562 | 79 | 0.384377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7ae91d54f6551b3200a7ad1c7b4b024eb589bb18 | 91 | py | Python | BackendBaggie/cartview/apps.py | Baggie-App/Updateapi | 80f200d7ffd4695e6348ce6bb9a7a31a6b821e77 | [
"MIT"
] | null | null | null | BackendBaggie/cartview/apps.py | Baggie-App/Updateapi | 80f200d7ffd4695e6348ce6bb9a7a31a6b821e77 | [
"MIT"
] | null | null | null | BackendBaggie/cartview/apps.py | Baggie-App/Updateapi | 80f200d7ffd4695e6348ce6bb9a7a31a6b821e77 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CartviewConfig(AppConfig):
name = 'cartview'
| 15.166667 | 33 | 0.758242 | 54 | 0.593407 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.10989 |
7aeb3ca58882967e00e1a0f51dac95fb61f266aa | 384 | py | Python | s04_variaveis_tipos_de_dados/s04_exercicios/s04_exercicio_07.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | s04_variaveis_tipos_de_dados/s04_exercicios/s04_exercicio_07.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | s04_variaveis_tipos_de_dados/s04_exercicios/s04_exercicio_07.py | adeogliari/GeekUniversity_Python | 1b6badc45ca1dfbaa2f42196fb2dedac417b866e | [
"MIT"
] | null | null | null | """
7) Leia uma temperatura em graus Fahrenheit e apresente-a convertida em graus Celsius. A fórmula de conversão é: C = (F-32.0)*5.0/9.0, sendo C a temperatura em Celsius e F a temperatura em Fahrenheit.
"""
fahrenheit = float(input('Digite a temperatura em graus Fahrenheit F: \n'))
print(f'A temperatura em graus Ce... | 48 | 200 | 0.716146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 350 | 0.899743 |
7aec73e5242fe246bd53368966dcb8b97fdec44b | 862 | py | Python | software/openvisualizer/openvisualizer/openType/typeRssi.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 26 | 2015-01-31T23:56:36.000Z | 2021-04-10T20:26:11.000Z | software/openvisualizer/openvisualizer/openType/typeRssi.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 33 | 2015-03-18T15:54:01.000Z | 2018-03-08T14:28:50.000Z | software/openvisualizer/openvisualizer/openType/typeRssi.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 80 | 2015-01-07T08:54:58.000Z | 2020-05-06T21:33:41.000Z | # Copyright (c) 2010-2013, Regents of the University of California.
# All rights reserved.
#
# Released under the BSD 3-Clause license as published at the link below.
# https://openwsn.atlassian.net/wiki/display/OW/License
import logging
log = logging.getLogger('typeRssi')
log.setLevel(logging.ERROR)
log.addHandler... | 27.806452 | 79 | 0.552204 | 495 | 0.574246 | 0 | 0 | 0 | 0 | 0 | 0 | 438 | 0.508121 |
7aec991a251b8b5ba72c6f603e780ca170fd3d9c | 16,092 | py | Python | SMI/pycopia/SMI/Compile.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | SMI/pycopia/SMI/Compile.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | SMI/pycopia/SMI/Compile.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | 35.135371 | 108 | 0.59222 | 10,108 | 0.628138 | 0 | 0 | 0 | 0 | 0 | 0 | 3,694 | 0.229555 |
7aed93f1001f0b20c9235af1ae0433ce9cdab764 | 960 | py | Python | burotel/indico_burotel/migrations/20211029_1202_564d660d4ddb_create_count_weekdays_function.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | burotel/indico_burotel/migrations/20211029_1202_564d660d4ddb_create_count_weekdays_function.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | burotel/indico_burotel/migrations/20211029_1202_564d660d4ddb_create_count_weekdays_function.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | """Create count_weekdays function
Revision ID: 564d660d4ddb
Revises:
Create Date: 2021-10-29 12:02:59.409012
"""
import textwrap
from alembic import op
from sqlalchemy.sql.ddl import CreateSchema, DropSchema
# revision identifiers, used by Alembic.
revision = '564d660d4ddb'
down_revision = None
branch_labels = Non... | 23.414634 | 91 | 0.730208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 580 | 0.604167 |
7aef5d12e97ce42126f8f1a2e3852a9ec848f12a | 354 | py | Python | pywinrt/winsdk/windows/graphics/capture/interop/__init__.py | pywinrt/python-winsdk | 1e2958a712949579f5e84d38220062b2cec12511 | [
"MIT"
] | 3 | 2022-02-14T14:53:08.000Z | 2022-03-29T20:48:54.000Z | pywinrt/winsdk/windows/graphics/capture/interop/__init__.py | pywinrt/python-winsdk | 1e2958a712949579f5e84d38220062b2cec12511 | [
"MIT"
] | 4 | 2022-01-28T02:53:52.000Z | 2022-02-26T18:10:05.000Z | pywinrt/winsdk/windows/graphics/capture/interop/__init__.py | pywinrt/python-winsdk | 1e2958a712949579f5e84d38220062b2cec12511 | [
"MIT"
] | null | null | null | # WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.4
import winsdk
_ns_module = winsdk._import_ns_module("Windows.Graphics.Capture.Interop")
try:
import winsdk.windows.graphics.capture
except Exception:
pass
create_for_monitor = _ns_module.create_for_monitor
create_for_wind... | 25.285714 | 86 | 0.805085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.338983 |
7aef5d40168535dab3efb9c32c0b60a29e7ae107 | 2,327 | py | Python | models/utils.py | ZephyrII/competitive_colaboration | a557d1e23ef2c0b8e3794f085a79bfffb860f9df | [
"MIT"
] | 357 | 2019-03-12T07:17:32.000Z | 2022-03-24T14:13:24.000Z | models/utils.py | DevLooptt/SJTU-CS386-2021Fall-DIP-Project | 2167e089be80ca01911ba55c07b83c9f26f147e7 | [
"MIT"
] | 27 | 2019-03-11T19:16:11.000Z | 2021-05-30T13:30:19.000Z | models/utils.py | DevLooptt/SJTU-CS386-2021Fall-DIP-Project | 2167e089be80ca01911ba55c07b83c9f26f147e7 | [
"MIT"
] | 66 | 2019-03-27T14:16:22.000Z | 2021-11-11T12:40:33.000Z | from __future__ import division
import math
import torch
import torch.nn as nn
def conv(in_planes, out_planes, stride=1, batch_norm=False):
if batch_norm:
return nn.Sequential(
nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False),
nn.BatchNorm2d(ou... | 34.220588 | 107 | 0.644177 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7af03651a5bc87d941460e143a24cf2c0a69bf1a | 516 | py | Python | seminar-roulette/backend/migrations/0017_auto_20201029_2151.py | olliegardner/seminar-roulette | c8330258778dd7f71b1289c5dfe611e5637cf71d | [
"MIT"
] | null | null | null | seminar-roulette/backend/migrations/0017_auto_20201029_2151.py | olliegardner/seminar-roulette | c8330258778dd7f71b1289c5dfe611e5637cf71d | [
"MIT"
] | null | null | null | seminar-roulette/backend/migrations/0017_auto_20201029_2151.py | olliegardner/seminar-roulette | c8330258778dd7f71b1289c5dfe611e5637cf71d | [
"MIT"
] | 1 | 2020-10-07T16:21:59.000Z | 2020-10-07T16:21:59.000Z | # Generated by Django 3.1.2 on 2020-10-29 21:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('backend', '0016_auto_20201029_2133'),
]
operations = [
migrations.AlterModelOptions(
name='seminarhistory',
options={'verbos... | 23.454545 | 65 | 0.606589 | 431 | 0.835271 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.360465 |
7af0730950718ad5e375da7065398646acf80fd5 | 1,005 | py | Python | saleor/graphql/shipping/resolvers.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2022-03-25T00:21:11.000Z | 2022-03-25T00:21:11.000Z | saleor/graphql/shipping/resolvers.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 86 | 2021-11-01T04:51:55.000Z | 2022-03-30T16:30:16.000Z | saleor/graphql/shipping/resolvers.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2021-12-28T18:02:49.000Z | 2021-12-28T18:02:49.000Z | from prices import MoneyRange
from ...shipping import models
from ...shipping.interface import ShippingMethodData
from ..channel import ChannelQsContext
from ..translations.resolvers import resolve_translation
def resolve_shipping_zones(channel_slug):
if channel_slug:
instances = models.ShippingZone.obje... | 32.419355 | 83 | 0.774129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.022886 |
7af19d3043c8b6728ea0912a528bf1eada7c558c | 2,806 | py | Python | scripts/simulator_experiments/real_government_strategy_experiments.py | alfred100p/PandemicSimulator | 2cb22c4b5c55d54a420fd104c74918d76189feb9 | [
"Apache-2.0"
] | null | null | null | scripts/simulator_experiments/real_government_strategy_experiments.py | alfred100p/PandemicSimulator | 2cb22c4b5c55d54a420fd104c74918d76189feb9 | [
"Apache-2.0"
] | null | null | null | scripts/simulator_experiments/real_government_strategy_experiments.py | alfred100p/PandemicSimulator | 2cb22c4b5c55d54a420fd104c74918d76189feb9 | [
"Apache-2.0"
] | null | null | null | # Confidential, Copyright 2020, Sony Corporation of America, All rights reserved.
from matplotlib import pyplot as plt
import pandemic_simulator as ps
def eval_government_strategies(experiment_name: str, opts: ps.sh.EvaluationOpts) -> None:
data_saver = ps.data.H5DataSaver(experiment_name, path=opts.data_saver_... | 45.258065 | 89 | 0.580542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.097648 |
7af2b9d69eec342a533a8a7c40f6317b22a86767 | 3,285 | py | Python | EGGS_labrad/clients/ARTIQ_client/DAC_client.py | EGGS-Experiment/EGGS_Control | c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b | [
"MIT"
] | 2 | 2021-12-26T05:00:54.000Z | 2021-12-30T17:15:49.000Z | EGGS_labrad/clients/ARTIQ_client/DAC_client.py | EGGS-Experiment/EGGS_Control | c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b | [
"MIT"
] | null | null | null | EGGS_labrad/clients/ARTIQ_client/DAC_client.py | EGGS-Experiment/EGGS_Control | c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b | [
"MIT"
] | null | null | null | from twisted.internet.defer import inlineCallbacks
from EGGS_labrad.clients import GUIClient
from EGGS_labrad.config.device_db import device_db
from EGGS_labrad.clients.ARTIQ_client.DAC_gui import DAC_gui
from copy import deepcopy
DACID = 659312
class DAC_client(GUIClient):
"""
Client for an ARTIQ Fastino/... | 37.758621 | 109 | 0.60274 | 2,932 | 0.892542 | 298 | 0.090715 | 319 | 0.097108 | 0 | 0 | 405 | 0.123288 |
7af6e15055517b76f8b5a8e5e342b76b70bd47f6 | 6,156 | py | Python | apps/profiles/views.py | ezl/hnofficehours | 3729eca064998bd2d0a9ba1b4fe7e56ccc57324b | [
"MIT"
] | 2 | 2015-11-05T13:47:44.000Z | 2020-07-20T19:57:45.000Z | apps/profiles/views.py | ezl/hnofficehours | 3729eca064998bd2d0a9ba1b4fe7e56ccc57324b | [
"MIT"
] | null | null | null | apps/profiles/views.py | ezl/hnofficehours | 3729eca064998bd2d0a9ba1b4fe7e56ccc57324b | [
"MIT"
] | null | null | null | from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response
from datetime import datetime, timedelta
from django.contrib.auth.models import User
from django.contrib import messages
from django.shortcuts import render_to_response, get_object_or_404
from django.template impo... | 39.210191 | 98 | 0.63564 | 0 | 0 | 0 | 0 | 2,147 | 0.348765 | 0 | 0 | 791 | 0.128493 |
7af7571d71981a894e8403a4dbebd261f79a20cf | 486 | py | Python | code/gits_version.py | ineelshah/GITS2.1-I.R.I.S | 12c4455ea55920e0de94a76f45b26e3e43cbcced | [
"MIT"
] | 1 | 2021-11-28T12:18:43.000Z | 2021-11-28T12:18:43.000Z | code/gits_version.py | ineelshah/GITS2.1-I.R.I.S | 12c4455ea55920e0de94a76f45b26e3e43cbcced | [
"MIT"
] | 20 | 2021-11-26T17:59:00.000Z | 2022-01-29T10:44:15.000Z | code/gits_version.py | jayrshah98/GITS2.1-I.R.I.S | 2891ba27b3309bbc7e8ff25ed221d3f1c78fb9d3 | [
"MIT"
] | 3 | 2021-11-28T21:48:50.000Z | 2022-01-05T15:44:06.000Z | import subprocess
from subprocess import PIPE
def gits_version(args):
try:
ver = list()
ver.append("git")
ver.append("--version")
process1 = subprocess.Popen(ver, stdout=PIPE, stderr=PIPE)
stdout, stderr = process1.communicate()
print(stdout.decode("UTF-8"))
ex... | 24.3 | 66 | 0.615226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.170782 |
7af766090d703b356c60d610ebbb2f0858967ab4 | 5,271 | py | Python | tests/data/rings_ringspecs.py | ArdanaCLM/swiftlm | a251c7fa4524bf35c95c15fcc21ec608780b07f4 | [
"Apache-2.0"
] | 1 | 2020-09-01T12:34:24.000Z | 2020-09-01T12:34:24.000Z | tests/data/rings_ringspecs.py | ArdanaCLM/swiftlm | a251c7fa4524bf35c95c15fcc21ec608780b07f4 | [
"Apache-2.0"
] | null | null | null | tests/data/rings_ringspecs.py | ArdanaCLM/swiftlm | a251c7fa4524bf35c95c15fcc21ec608780b07f4 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE 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... | 28.803279 | 75 | 0.540505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,117 | 0.970784 |
7af83d85dcf1ded1b08cade5086590e8e4f45487 | 254 | py | Python | Maze.py | rcpsilva/BCC740_2021_2_Artificial_Intelligence | fad7c02d155ae377e1f8c2a6c941ea45ec3c2fe6 | [
"MIT"
] | null | null | null | Maze.py | rcpsilva/BCC740_2021_2_Artificial_Intelligence | fad7c02d155ae377e1f8c2a6c941ea45ec3c2fe6 | [
"MIT"
] | null | null | null | Maze.py | rcpsilva/BCC740_2021_2_Artificial_Intelligence | fad7c02d155ae377e1f8c2a6c941ea45ec3c2fe6 | [
"MIT"
] | 5 | 2022-03-23T12:21:31.000Z | 2022-03-28T16:47:25.000Z | from pyamaze import maze,COLOR,agent
from environments import Maze
from agents import MazeAgentDFS, MazeAgentBranchAndBound, MazeAgentAStar
env = Maze(8,8)
ag = MazeAgentAStar(env)
#ag = MazeAgentBranchAndBound(env,40)
#ag = MazeAgentDFS(env)
ag.act()
| 23.090909 | 72 | 0.795276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.23622 |
7af95ca39bf7740aabcc3f766de8108b97e29b27 | 921 | py | Python | sourcecode/src/vx/spix/Util.py | ivarvb/SPIX | 6c757b69c266f738d66164fa643a09f77721880d | [
"MIT"
] | null | null | null | sourcecode/src/vx/spix/Util.py | ivarvb/SPIX | 6c757b69c266f738d66164fa643a09f77721880d | [
"MIT"
] | null | null | null | sourcecode/src/vx/spix/Util.py | ivarvb/SPIX | 6c757b69c266f738d66164fa643a09f77721880d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
import ujson
from datetime import datetime
class Util:
@staticmethod
def write(file, obj):
with open(file, "w") as filef:
filef.write(ujson.dumps(obj))
@sta... | 21.418605 | 54 | 0.591748 | 747 | 0.811075 | 0 | 0 | 697 | 0.756786 | 0 | 0 | 80 | 0.086862 |
7af9ce8ba99ab0024b0d79ef7600bd2202d6b9e4 | 41 | py | Python | packages/plugins/model-define/tensorflow-cycle-gan-model-define/CycleGAN/image_loader/__init__.py | CandyQiu/pipcook | 12d482d6dcfb828bf80fcf908aee2c8ba5e9bd8a | [
"Apache-2.0"
] | 2 | 2020-04-21T05:49:02.000Z | 2021-03-01T15:14:29.000Z | packages/plugins/model-define/tensorflow-cycle-gan-model-define/CycleGAN/image_loader/__init__.py | CandyQiu/pipcook | 12d482d6dcfb828bf80fcf908aee2c8ba5e9bd8a | [
"Apache-2.0"
] | null | null | null | packages/plugins/model-define/tensorflow-cycle-gan-model-define/CycleGAN/image_loader/__init__.py | CandyQiu/pipcook | 12d482d6dcfb828bf80fcf908aee2c8ba5e9bd8a | [
"Apache-2.0"
] | null | null | null | from .image_loader import ImageGenerator
| 20.5 | 40 | 0.878049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7afb55eccc74a4c6a98c9ac3dd757cd060175686 | 1,005 | py | Python | nmea_date_fix.py | hsur/NmeaDateFix | 4585dc9541bb2ae87dfc0160cc5006960813a0d3 | [
"BSD-2-Clause"
] | null | null | null | nmea_date_fix.py | hsur/NmeaDateFix | 4585dc9541bb2ae87dfc0160cc5006960813a0d3 | [
"BSD-2-Clause"
] | null | null | null | nmea_date_fix.py | hsur/NmeaDateFix | 4585dc9541bb2ae87dfc0160cc5006960813a0d3 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# vim:fenc=utf-8 ff=unix ft=python ts=4 sw=4 sts=4 noet :
import os
import sys
import datetime
from pynmea2 import NMEASentence, ParseError
if len(sys.argv) != 2:
print("Usage: %s nmeafile.nmea" % sys.argv[0] )
sys.exit(1)
file_path = os.path.abspath(sys.argv[1])
tmp_path = os.p... | 29.558824 | 91 | 0.649751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.206965 |
7afc056cd047372b424519a16da1dae8715cba34 | 1,103 | py | Python | coinkit/keyspace.py | mflaxman/coink | 8ce28ac4ff56e2320bf452d0559b83baf40b2b51 | [
"MIT"
] | 5 | 2017-09-06T11:59:50.000Z | 2019-02-17T21:02:47.000Z | coinkit/keyspace.py | shea256/coinkit | 81e86f4ea3dbf6622953c085016445fb4121fb44 | [
"MIT"
] | null | null | null | coinkit/keyspace.py | shea256/coinkit | 81e86f4ea3dbf6622953c085016445fb4121fb44 | [
"MIT"
] | 2 | 2015-01-23T03:10:25.000Z | 2021-11-18T01:58:31.000Z | # -*- coding: utf-8 -*-
"""
Coinkit
~~~~~
:copyright: (c) 2013 by Halfmoon Labs
:license: MIT, see LICENSE for more details.
"""
import re
def int_to_hex(i):
return re.sub(r'^0x|L$', '', hex(i))
def int_to_string(integer, keyspace_chars):
""" Turn a positive integer into a string. """
if... | 29.810811 | 74 | 0.668178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 324 | 0.293744 |
7afcbfcd3c3962e9a985188562c99110c3140f93 | 18,907 | py | Python | cinder/zonemanager/drivers/brocade/brcd_rest_fc_zone_client.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/zonemanager/drivers/brocade/brcd_rest_fc_zone_client.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/zonemanager/drivers/brocade/brcd_rest_fc_zone_client.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # (c) Copyright 2019 Brocade, a Broadcom Company
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | 45.779661 | 79 | 0.587825 | 17,784 | 0.940604 | 0 | 0 | 0 | 0 | 0 | 0 | 2,997 | 0.158513 |
7afd789557f9eb88e7608f59a30820ee3bb43296 | 4,233 | py | Python | main/models.py | mnecas/bpc_bds_web | 3c5d4289d74c053e1225e19cdcbb048994271f57 | [
"Apache-2.0"
] | null | null | null | main/models.py | mnecas/bpc_bds_web | 3c5d4289d74c053e1225e19cdcbb048994271f57 | [
"Apache-2.0"
] | null | null | null | main/models.py | mnecas/bpc_bds_web | 3c5d4289d74c053e1225e19cdcbb048994271f57 | [
"Apache-2.0"
] | null | null | null | from django.db import models
class PersonType(models.Model):
type = models.CharField(max_length=45)
def __str__(self):
return f"{self.type}"
class Address(models.Model):
city = models.CharField(max_length=45)
street = models.CharField(max_length=45)
street_number = models.IntegerField()... | 30.235714 | 94 | 0.697378 | 4,124 | 0.97425 | 0 | 0 | 0 | 0 | 0 | 0 | 608 | 0.143633 |
bb00617057f78b6193060f769f38f73ce61320ea | 1,232 | py | Python | eas_lookup/__init__.py | SFDigitalServices/address-microservice-fn-py | 37bba144df2cc5a95822ba79c90de48c9dc7beb1 | [
"MIT"
] | null | null | null | eas_lookup/__init__.py | SFDigitalServices/address-microservice-fn-py | 37bba144df2cc5a95822ba79c90de48c9dc7beb1 | [
"MIT"
] | null | null | null | eas_lookup/__init__.py | SFDigitalServices/address-microservice-fn-py | 37bba144df2cc5a95822ba79c90de48c9dc7beb1 | [
"MIT"
] | null | null | null | """ eas/lookup init file """
import os
import json
import logging
import requests
import azure.functions as func
from shared_code.common import func_json_response
def main(req: func.HttpRequest) -> func.HttpResponse:
""" main function for eas/lookup """
logging.info('EAS Lookup processed a request.')
try... | 30.8 | 95 | 0.602273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.361201 |
bb006a911bddb51da85b674ee0ef5ef33b604be7 | 2,228 | py | Python | recipes-bsp/polyos-setup/polyos-setup/polyaudio.py | PolyVection/meta-polyvection | a24fb91c4144e4d6e5fcaa73f456f805e30b751b | [
"MIT"
] | null | null | null | recipes-bsp/polyos-setup/polyos-setup/polyaudio.py | PolyVection/meta-polyvection | a24fb91c4144e4d6e5fcaa73f456f805e30b751b | [
"MIT"
] | null | null | null | recipes-bsp/polyos-setup/polyos-setup/polyaudio.py | PolyVection/meta-polyvection | a24fb91c4144e4d6e5fcaa73f456f805e30b751b | [
"MIT"
] | 1 | 2018-04-13T22:32:38.000Z | 2018-04-13T22:32:38.000Z | #!/usr/bin/python3
# Copyright (c) 2017, PolyVection UG.
#
# Based on configure-edison, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU Lesser General Public License,
# version 2.1, as published by the Free Software Foundation.
... | 27.170732 | 76 | 0.606373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,297 | 0.582136 |
bb015fa5e2c4d8430f9e89af39073bf40a1f5fc0 | 6,168 | py | Python | 3dcdrl/create_rollout_videos.py | NicholasSperryGrandhomme/Improving-RL-Navigation-using-TTA | 8e0a405589a9b0bd3bd543dda72bf2325ebc9126 | [
"MIT"
] | null | null | null | 3dcdrl/create_rollout_videos.py | NicholasSperryGrandhomme/Improving-RL-Navigation-using-TTA | 8e0a405589a9b0bd3bd543dda72bf2325ebc9126 | [
"MIT"
] | null | null | null | 3dcdrl/create_rollout_videos.py | NicholasSperryGrandhomme/Improving-RL-Navigation-using-TTA | 8e0a405589a9b0bd3bd543dda72bf2325ebc9126 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 21 09:19:33 2018
@author: anonymous
"""
import os
import torch
import numpy as np
from arguments import parse_a2c_args
from multi_env import MultiEnv
from models import CNNPolicy
from a2c_agent import *
from utils import initialize_logging
from doom... | 33.521739 | 130 | 0.600681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,097 | 0.177853 |
bb021a30b50060269f34e2949685cc9a7971c175 | 6,706 | py | Python | napi/tests.py | abakan-zz/napi | 314da65bd78e2c716b7efb6deaf3816d8f38f7fd | [
"MIT"
] | null | null | null | napi/tests.py | abakan-zz/napi | 314da65bd78e2c716b7efb6deaf3816d8f38f7fd | [
"MIT"
] | 1 | 2015-08-03T00:41:59.000Z | 2015-08-07T06:37:26.000Z | napi/tests.py | abakan/napi | 314da65bd78e2c716b7efb6deaf3816d8f38f7fd | [
"MIT"
] | null | null | null | from nose.tools import raises
import numpy as np
from napi import neval
from napi.transformers import NapiTransformer, LazyTransformer
from napi.transformers import short_circuit_and
TRANSFORMERS = [NapiTransformer]#, LazyTransformer]
randbools = lambda *n: np.random.randn(*n) < 0
def short_circuit_and_(arrays, sha... | 27.710744 | 82 | 0.53892 | 0 | 0 | 5,145 | 0.767223 | 199 | 0.029675 | 0 | 0 | 1,275 | 0.190128 |
bb037b1a6312e7d97680adcc0f7b31cd176631f1 | 8,621 | py | Python | src/api/impl/review.py | fekblom/critic | a6b60c9053e13d4c878d50531860d7389568626d | [
"Apache-2.0"
] | null | null | null | src/api/impl/review.py | fekblom/critic | a6b60c9053e13d4c878d50531860d7389568626d | [
"Apache-2.0"
] | null | null | null | src/api/impl/review.py | fekblom/critic | a6b60c9053e13d4c878d50531860d7389568626d | [
"Apache-2.0"
] | null | null | null | # -*- mode: python; encoding: utf-8 -*-
#
# Copyright 2014 the Critic contributors, Opera Software ASA
#
# 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/LI... | 43.540404 | 91 | 0.570931 | 5,714 | 0.6628 | 345 | 0.040019 | 0 | 0 | 0 | 0 | 3,434 | 0.39833 |
bb037e64dca2ed5aefee607b5004f9b5b50431d4 | 1,080 | py | Python | image_example.py | devonps/DearPyGui-Examples | 15093d53f90ec6a2f6a53b7dfc9e0e511e93e27a | [
"MIT"
] | null | null | null | image_example.py | devonps/DearPyGui-Examples | 15093d53f90ec6a2f6a53b7dfc9e0e511e93e27a | [
"MIT"
] | null | null | null | image_example.py | devonps/DearPyGui-Examples | 15093d53f90ec6a2f6a53b7dfc9e0e511e93e27a | [
"MIT"
] | null | null | null | from dearpygui.core import *
from dearpygui.simple import *
# callback
def update(sender, data):
uvmin = get_value("uv_min")
uvmax = get_value("uv_max")
uvminx = uvmin[0]
uvminy = uvmin[1]
uvmaxx = uvmax[0]
uvmaxy = uvmax[1]
add_data("TextureCoordinates", [uvminx, uvminy, uvmaxx, uvmaxy])... | 36 | 97 | 0.685185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.27963 |
bb03c2e16d10a68817b5577a1dbdeba0377e167e | 8,833 | py | Python | runner/runner/main.py | BinalModi/reproserver | 2c1f86b67ba57473b507217a3289d92697a09665 | [
"BSD-3-Clause"
] | null | null | null | runner/runner/main.py | BinalModi/reproserver | 2c1f86b67ba57473b507217a3289d92697a09665 | [
"BSD-3-Clause"
] | null | null | null | runner/runner/main.py | BinalModi/reproserver | 2c1f86b67ba57473b507217a3289d92697a09665 | [
"BSD-3-Clause"
] | null | null | null | from common import database
from common import TaskQueues, get_object_store
from common.utils import setup_logging, shell_escape
from hashlib import sha256
import logging
import os
import shutil
from sqlalchemy.orm import joinedload
from sqlalchemy.sql import functions
import subprocess
import tempfile
SQLSession = N... | 35.051587 | 78 | 0.551681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,897 | 0.214763 |
bb06b45e3723a9ef4facef11872ccca58b2eadb8 | 184 | py | Python | applications/ip2country/models/db_iptable.py | blazejkocon/csc438 | b06555a965d914ea599d3e6fc85780168486d90c | [
"BSD-3-Clause"
] | null | null | null | applications/ip2country/models/db_iptable.py | blazejkocon/csc438 | b06555a965d914ea599d3e6fc85780168486d90c | [
"BSD-3-Clause"
] | null | null | null | applications/ip2country/models/db_iptable.py | blazejkocon/csc438 | b06555a965d914ea599d3e6fc85780168486d90c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
db.define_table('ip2nation',
Field('code',type='integer', requires=IS_NOT_EMPTY()),
Field('country', requires= IS_NOT_EMPTY()))
| 36.8 | 70 | 0.570652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.315217 |
bb085c85e7782e1a789b1bec7a2c6a71e68ad8d9 | 4,574 | py | Python | tests/parser_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | 1 | 2021-04-01T20:22:36.000Z | 2021-04-01T20:22:36.000Z | tests/parser_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | 1 | 2020-11-20T22:24:38.000Z | 2020-11-20T22:24:38.000Z | tests/parser_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | null | null | null | from yalul.parser import Parser
from yalul.parsers.ast.nodes.statements.expressions.binary import Binary
from yalul.lex.token import Token
from yalul.lex.token_type import TokenType
from yalul.parsers.ast.nodes.statements.expressions.values.integer import Integer
class TestParserBinary:
"""Test parser generating ... | 34.134328 | 119 | 0.636205 | 4,298 | 0.939659 | 0 | 0 | 0 | 0 | 0 | 0 | 1,116 | 0.243988 |
bb0a2166fba41078615dd96cf7ca319832633515 | 4,036 | py | Python | tests/core/daemon/test_daemon_alerts.py | akubera/chia-blockchain | 91f038e2193755e2a6ca22e2160e2c8f547c23fe | [
"Apache-2.0"
] | 1 | 2021-05-28T01:38:23.000Z | 2021-05-28T01:38:23.000Z | tests/core/daemon/test_daemon_alerts.py | hoffmang9/chia-blockchain | edc5f1dfe57ecd81d00b5ba4477024309b1231de | [
"Apache-2.0"
] | null | null | null | tests/core/daemon/test_daemon_alerts.py | hoffmang9/chia-blockchain | edc5f1dfe57ecd81d00b5ba4477024309b1231de | [
"Apache-2.0"
] | null | null | null | import dataclasses
import pytest
from blspy import PrivateKey
from src.server.outbound_message import NodeType
from src.types.peer_info import PeerInfo
from src.util.block_tools import BlockTools
from src.util.hash import std_hash
from src.util.ints import uint16
from src.util.validate_alert import create_alert_file,... | 39.960396 | 112 | 0.745045 | 2,313 | 0.573092 | 352 | 0.087215 | 2,267 | 0.561695 | 2,128 | 0.527255 | 472 | 0.116947 |
bb0b659ef2cc14f0a9cf674d122a6ce8c529a3af | 8,196 | py | Python | words.py | GuyKabiri/language-models | 63b368aaee74ec077abcc8f66f0c8fbd4c712a07 | [
"MIT"
] | 41 | 2018-08-25T14:00:46.000Z | 2022-01-20T05:21:03.000Z | words.py | GuyKabiri/language-models | 63b368aaee74ec077abcc8f66f0c8fbd4c712a07 | [
"MIT"
] | 5 | 2018-07-06T11:34:22.000Z | 2021-11-15T20:32:34.000Z | words.py | GuyKabiri/language-models | 63b368aaee74ec077abcc8f66f0c8fbd4c712a07 | [
"MIT"
] | 17 | 2018-07-24T19:40:19.000Z | 2022-01-25T09:14:11.000Z | import keras
import keras.backend as K
from keras.datasets import imdb
from keras.layers import LSTM, Embedding, TimeDistributed, Input, Dense
from keras.models import Model
from tensorflow.python.client import device_lib
from tqdm import tqdm
import os, random
from argparse import ArgumentParser
import numpy as n... | 33.453061 | 120 | 0.571986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,522 | 0.307711 |
bb0cafc42dfe07c8f9f0ade59b4efb5599bbec9d | 979 | py | Python | synthdnm/backend.py | james-guevara/synthdnm | 8510cfd91438452da553d35894b63c5d75cdd47e | [
"MIT"
] | 6 | 2021-02-22T08:29:49.000Z | 2021-11-26T21:24:49.000Z | build/lib/synthdnm/backend.py | james-guevara/synthdnm | 8510cfd91438452da553d35894b63c5d75cdd47e | [
"MIT"
] | 1 | 2021-10-04T19:22:34.000Z | 2021-11-16T21:22:12.000Z | synthdnm/backend.py | james-guevara/synthdnm | 8510cfd91438452da553d35894b63c5d75cdd47e | [
"MIT"
] | 1 | 2020-11-06T18:57:57.000Z | 2020-11-06T18:57:57.000Z | import re
# Splits a line by spaces or tabs, returns a list object
def tokenize(line):
linesplit = line.rstrip().split("\t")
if len(linesplit) == 1: linesplit = line.rstrip().split(" ")
else: return linesplit
# Returns dictionary containing information of pedigree file
def process_ped(fam_filepath):
pe... | 40.791667 | 130 | 0.657814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.242084 |
bb0cd1bc006214dc6eb22b166f68a1596ea8baca | 1,925 | py | Python | ws/RLAgents/B_ValueBased/Bootstrapping/OnPolicy/sarsa/impl_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/RLAgents/B_ValueBased/Bootstrapping/OnPolicy/sarsa/impl_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/RLAgents/B_ValueBased/Bootstrapping/OnPolicy/sarsa/impl_mgt.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | from ws.RLAgents.B_ValueBased.Bootstrapping.qtable_mgt import qtable_mgt
def impl_mgt(app_info):
_env = app_info.ENV
Display = app_info.ENV.Display
fn_get_qval, fn_set_qval, fn_get_q_actions, fn_get_max_q_actions = qtable_mgt()
def _fn_update_knowledge(state, action, reward, next_state, next_action):... | 37.019231 | 89 | 0.652987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.035325 |