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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
695579af900de69250d3b0d15ec3f825c2990c7f | 18,839 | py | Python | PacELF_Phase3/scripts/csvColumnToXMLFile.py | pacelf/pacelf | cd9f3608843eaf7d9dff6e20e06ee4bf773467e3 | [
"MIT"
] | null | null | null | PacELF_Phase3/scripts/csvColumnToXMLFile.py | pacelf/pacelf | cd9f3608843eaf7d9dff6e20e06ee4bf773467e3 | [
"MIT"
] | 2 | 2021-10-06T01:58:48.000Z | 2022-02-18T04:52:34.000Z | PacELF_Phase3/scripts/csvColumnToXMLFile.py | pacelf/pacelf | cd9f3608843eaf7d9dff6e20e06ee4bf773467e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This program is designed to create XML sidecar files for harvesting metadata into Mediaflux.
#
# Author: Jay van Schyndel
# Date: 02 May 2017.
#
# Significant modifications done by: Daniel Baird
# Date: 2018 and early 2019
#
# Scenario. Metadata is stored in an MS Excel file in various colu... | 37.157791 | 197 | 0.49578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,056 | 0.427624 |
69566d12c06529c48fecd538d7a1ad6d03fffd43 | 1,147 | py | Python | authenticationCwProject/authenticationCwApp/views.py | cs-fullstack-2019-spring/django-authentication-cw-bettyjware11 | 0afa675b0b6602a89ecfff9ee29a62c95f677de6 | [
"Apache-2.0"
] | null | null | null | authenticationCwProject/authenticationCwApp/views.py | cs-fullstack-2019-spring/django-authentication-cw-bettyjware11 | 0afa675b0b6602a89ecfff9ee29a62c95f677de6 | [
"Apache-2.0"
] | null | null | null | authenticationCwProject/authenticationCwApp/views.py | cs-fullstack-2019-spring/django-authentication-cw-bettyjware11 | 0afa675b0b6602a89ecfff9ee29a62c95f677de6 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.shortcuts import HttpResponse
from .forms import FoodFitnessForm
from django.contrib.auth.models import User
# function to test with
def index(request):
return HttpResponse("You made it.")
# function to create new user
def createUser(request):
form = FoodFitness... | 28.675 | 107 | 0.70619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 325 | 0.283348 |
695785b2963244eb85ab885b374aa8c222d96191 | 98 | py | Python | ex.047.mostraNumerosPares.py | romulorm/cev-python | b5c6844956c131a9e4e02355459c218739ebf8c5 | [
"MIT"
] | null | null | null | ex.047.mostraNumerosPares.py | romulorm/cev-python | b5c6844956c131a9e4e02355459c218739ebf8c5 | [
"MIT"
] | null | null | null | ex.047.mostraNumerosPares.py | romulorm/cev-python | b5c6844956c131a9e4e02355459c218739ebf8c5 | [
"MIT"
] | null | null | null | # Conta somente números pares
for c in range(2, 51, 2):
print(c, end=' ')
print("Acabou!")
| 14 | 30 | 0.602041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.434343 |
695934996d2e79a5c72ef6834b5be0584eb22c99 | 4,763 | py | Python | csv-manipulation/csv-merge.py | bohnacker/data-manipulation | a46cdfdeca8d242038b118509c20b1eb39ea5b36 | [
"MIT"
] | 2 | 2020-06-05T15:57:50.000Z | 2020-06-30T12:59:00.000Z | csv-manipulation/csv-merge.py | bohnacker/data-manipulation | a46cdfdeca8d242038b118509c20b1eb39ea5b36 | [
"MIT"
] | null | null | null | csv-manipulation/csv-merge.py | bohnacker/data-manipulation | a46cdfdeca8d242038b118509c20b1eb39ea5b36 | [
"MIT"
] | null | null | null | from __future__ import print_function
# A script to help you with manipulating CSV-files. This is especially necessary when dealing with
# CSVs that have more than 65536 lines because those can not (yet) be opened in Excel or Numbers.
# This script works with two files from ourworldindata.org:
# https://ourworldindat... | 33.780142 | 131 | 0.618728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,834 | 0.595003 |
695982e3be224fdcb410f0b1f9e5e2d7fef87d2d | 1,713 | py | Python | crawler/configs.py | debasishbai/Tender-Crawler | b721f197236bee4a69e0f403101a159af5924dda | [
"MIT"
] | null | null | null | crawler/configs.py | debasishbai/Tender-Crawler | b721f197236bee4a69e0f403101a159af5924dda | [
"MIT"
] | 1 | 2021-06-30T07:28:21.000Z | 2021-06-30T07:28:21.000Z | crawler/configs.py | debasishbai/Tender-Crawler | b721f197236bee4a69e0f403101a159af5924dda | [
"MIT"
] | null | null | null | go_to_tender_page = "Live Tenders"
search_bar = "#sr_buyer_chzn > a > span"
all_dept_names = "#sr_buyer_chzn > div > ul > li:nth-of-type(n+1)"
search_button = '#frm_sr > div.actionBtn > input[type="button"]:nth-child(1)'
type_name = '#sr_buyer_chzn > div > div > input[type="text"]'
scroll_down = "window.scrollTo(0, doc... | 50.382353 | 150 | 0.683596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,306 | 0.762405 |
695a580d9dfe172ab929a611ecc5c4b39192aa4c | 2,590 | py | Python | authors/apps/profiles/serializers.py | andela/ah-jumanji- | a304718929936dd4a759d737fb3570d6cc25fb76 | [
"BSD-3-Clause"
] | 1 | 2018-12-23T15:31:54.000Z | 2018-12-23T15:31:54.000Z | authors/apps/profiles/serializers.py | andela/ah-jumanji- | a304718929936dd4a759d737fb3570d6cc25fb76 | [
"BSD-3-Clause"
] | 26 | 2018-11-27T09:13:15.000Z | 2021-06-10T20:58:57.000Z | authors/apps/profiles/serializers.py | andela/ah-jumanji- | a304718929936dd4a759d737fb3570d6cc25fb76 | [
"BSD-3-Clause"
] | 2 | 2019-01-10T22:14:28.000Z | 2019-11-04T07:33:43.000Z | """
Module serializes `Profile` model
:generates JSON from fields in `Profile` model
"""
import logging
from rest_framework import serializers
from authors.apps.authentication.serializers import UserSerializer
from authors.apps.profiles.models import Profile, Following
logger = logging.getLogger(__name__)
c... | 24.903846 | 71 | 0.62471 | 2,258 | 0.871815 | 0 | 0 | 0 | 0 | 0 | 0 | 849 | 0.327799 |
695aa8899e70c364dd37a9eae8fc436359e8c4b2 | 1,849 | py | Python | users/forms.py | hrbhat/twissandra | e2c16eac29b3c77065555da269b7974898e9f80e | [
"Apache-2.0"
] | 308 | 2015-01-04T20:05:10.000Z | 2022-03-09T17:15:52.000Z | users/forms.py | hrbhat/twissandra | e2c16eac29b3c77065555da269b7974898e9f80e | [
"Apache-2.0"
] | 10 | 2016-01-02T20:29:03.000Z | 2020-06-05T16:45:20.000Z | users/forms.py | hrbhat/twissandra | e2c16eac29b3c77065555da269b7974898e9f80e | [
"Apache-2.0"
] | 109 | 2015-02-01T11:25:24.000Z | 2022-03-18T12:18:13.000Z | from django import forms
import cass
class LoginForm(forms.Form):
username = forms.CharField(max_length=30)
password = forms.CharField(widget=forms.PasswordInput(render_value=False))
def clean(self):
username = self.cleaned_data['username']
password = self.cleaned_data['password']
... | 35.557692 | 83 | 0.663602 | 1,806 | 0.976744 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.137912 |
695b6b62546eaa04ce79f4261d88a6eb1b8a86ea | 16,047 | py | Python | script/python/assoc_sclrt_kernels_spliceai_eval_top_hits.py | HealthML/faatpipe | 8292df4f34c99f035756a1acbd2c79055f652958 | [
"Apache-2.0"
] | 2 | 2021-12-06T09:00:52.000Z | 2022-03-03T15:03:51.000Z | script/python/assoc_sclrt_kernels_spliceai_eval_top_hits.py | HealthML/faatpipe | 8292df4f34c99f035756a1acbd2c79055f652958 | [
"Apache-2.0"
] | null | null | null | script/python/assoc_sclrt_kernels_spliceai_eval_top_hits.py | HealthML/faatpipe | 8292df4f34c99f035756a1acbd2c79055f652958 | [
"Apache-2.0"
] | null | null | null | import os
# os.environ["OMP_NUM_THREADS"] = "16"
import logging
logging.basicConfig(filename=snakemake.log[0], level=logging.INFO)
import pandas as pd
import numpy as np
# seak imports
from seak.data_loaders import intersect_ids, EnsemblVEPLoader, VariantLoaderSnpReader, CovariatesLoaderCSV
from seak.scoretest impo... | 42.228947 | 271 | 0.645541 | 34 | 0.002119 | 0 | 0 | 0 | 0 | 0 | 0 | 5,143 | 0.320496 |
695bd5a3034969d8612674c32efea1218548dce0 | 4,741 | py | Python | animations/dafP1.py | TristanCacqueray/demo-render | 4c8403e684165e5e75c046ee023c1f794a6650a8 | [
"Apache-2.0"
] | 9 | 2018-02-19T14:17:12.000Z | 2021-03-27T14:46:28.000Z | animations/dafP1.py | TristanCacqueray/demo-render | 4c8403e684165e5e75c046ee023c1f794a6650a8 | [
"Apache-2.0"
] | null | null | null | animations/dafP1.py | TristanCacqueray/demo-render | 4c8403e684165e5e75c046ee023c1f794a6650a8 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 34.605839 | 75 | 0.607467 | 3,469 | 0.731702 | 0 | 0 | 0 | 0 | 0 | 0 | 1,542 | 0.325248 |
695c9b1e7ed238ec8d68378d50cb9434b9b47feb | 2,240 | py | Python | design-pattern/factory_method.py | twotwo/tools-python | b9e7a97e58fb0a3f3fb5e8b674e64a997669c2c4 | [
"MIT"
] | null | null | null | design-pattern/factory_method.py | twotwo/tools-python | b9e7a97e58fb0a3f3fb5e8b674e64a997669c2c4 | [
"MIT"
] | null | null | null | design-pattern/factory_method.py | twotwo/tools-python | b9e7a97e58fb0a3f3fb5e8b674e64a997669c2c4 | [
"MIT"
] | 1 | 2016-10-21T07:51:24.000Z | 2016-10-21T07:51:24.000Z | from abc import ABC, abstractmethod
class Pizza(ABC):
@abstractmethod
def prepare(self):
pass
def bake(self):
print("baking pizza for 12min in 400 degrees..")
def cut(self):
print("cutting pizza in pieces")
def box(self):
print("putting pizza in box")
class NY... | 23.092784 | 84 | 0.638839 | 1,997 | 0.891518 | 0 | 0 | 132 | 0.058929 | 0 | 0 | 636 | 0.283929 |
695cb03fad71e52d66b52655147eb22d30993c0d | 366 | py | Python | backup/server/__init__.py | TheSithPadawan/CSE222A-CourseProject | ded7232fa76a8c57e2355a6559573f71e6e63871 | [
"MIT"
] | 1 | 2019-02-17T06:41:59.000Z | 2019-02-17T06:41:59.000Z | backup/server/__init__.py | TheSithPadawan/CSE222A-CourseProject | ded7232fa76a8c57e2355a6559573f71e6e63871 | [
"MIT"
] | 1 | 2019-02-21T05:19:31.000Z | 2019-03-02T06:38:33.000Z | backup/server/__init__.py | TheSithPadawan/CSE222A-CourseProject | ded7232fa76a8c57e2355a6559573f71e6e63871 | [
"MIT"
] | 1 | 2022-02-12T05:18:49.000Z | 2022-02-12T05:18:49.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
db_url = 'postgresql://postgres:postgres@localhost:5432/postgres'
db = SQLAlchemy()
def create_app():
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = db_url
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# initialize ... | 22.875 | 65 | 0.743169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.36612 |
695d8b7488bd393e88af11f9dfa6cf05fcd29803 | 2,677 | py | Python | ics2csv.py | wikier/apachecon-tac-scripts | 8b58eb910990910ed113996c2662e2601bee0176 | [
"Apache-2.0"
] | null | null | null | ics2csv.py | wikier/apachecon-tac-scripts | 8b58eb910990910ed113996c2662e2601bee0176 | [
"Apache-2.0"
] | null | null | null | ics2csv.py | wikier/apachecon-tac-scripts | 8b58eb910990910ed113996c2662e2601bee0176 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf8 -*-
# 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 i... | 30.078652 | 109 | 0.637281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,134 | 0.423609 |
695e5925518853dabd7c44e5771ea4c0dcb5f954 | 1,925 | py | Python | ctci/p3_1.py | camirmas/ctci | d90ab6c296a18cba5eb1204e0569aff2c6795422 | [
"MIT"
] | null | null | null | ctci/p3_1.py | camirmas/ctci | d90ab6c296a18cba5eb1204e0569aff2c6795422 | [
"MIT"
] | null | null | null | ctci/p3_1.py | camirmas/ctci | d90ab6c296a18cba5eb1204e0569aff2c6795422 | [
"MIT"
] | null | null | null | """Describe how you could use a single array to implement three stacks."""
class StackManager:
def __init__(self):
self.stacks = []
self.top = {
1: None,
2: None,
3: None,
}
self.length = {
1: 0,
2: 0,
3: 0,
... | 25 | 74 | 0.404156 | 1,849 | 0.960519 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.038442 |
695eb2e49aac8f15bf80012509cf307d5b4f61f7 | 5,434 | py | Python | src/main/resources/basic.py | feng345fengcool/hellojava | efb1db4997d5e35572d69221b955e89f4ad84301 | [
"Apache-2.0"
] | null | null | null | src/main/resources/basic.py | feng345fengcool/hellojava | efb1db4997d5e35572d69221b955e89f4ad84301 | [
"Apache-2.0"
] | null | null | null | src/main/resources/basic.py | feng345fengcool/hellojava | efb1db4997d5e35572d69221b955e89f4ad84301 | [
"Apache-2.0"
] | null | null | null | __author__ = 'chenshuai'
cast = ["Cleese", "Plain", "Jones", "Idle"]
print cast
print len(cast)
print cast[1]
cast.append("Gilliam")
print cast
cast.pop()
print cast
cast.extend(["Gilliam", "Chapman"])
print cast
cast.remove("Chapman")
print cast
cast.insert(0, "Chapman")
print cast
movies = ["The Holy Grail", "The L... | 24.367713 | 99 | 0.602503 | 396 | 0.072874 | 0 | 0 | 0 | 0 | 0 | 0 | 1,665 | 0.306404 |
695ec52440fba379a30f79fa614d663b2b26c725 | 110 | py | Python | MiddleKit/Design/SQLitePythonGenerator.py | PeaceWorksTechnologySolutions/w4py | 74f5a03a63f1a93563502b908474aefaae2abda2 | [
"MIT"
] | 18 | 2016-08-01T20:15:59.000Z | 2019-12-24T16:00:03.000Z | MiddleKit/Design/SQLitePythonGenerator.py | WebwareForPython/w4py | bba08f5974d49f5da7e88abe3eeda1037d0824a3 | [
"MIT"
] | 6 | 2016-09-13T05:48:45.000Z | 2020-01-09T18:29:12.000Z | MiddleKit/Design/SQLitePythonGenerator.py | WebwareForPython/w4py | bba08f5974d49f5da7e88abe3eeda1037d0824a3 | [
"MIT"
] | 6 | 2016-09-16T14:32:29.000Z | 2020-01-03T18:52:16.000Z | from SQLPythonGenerator import SQLPythonGenerator
class SQLitePythonGenerator(SQLPythonGenerator):
pass
| 18.333333 | 49 | 0.854545 | 57 | 0.518182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
69606e8d600007b6ed1a1fe06f495e08cc77f964 | 994 | py | Python | Spell Compendium/scr/Spell1108 - Dirge.py | Sagenlicht/ToEE_Mods | a4b07f300df6067f834e09fcbc4c788f1f4e417b | [
"MIT"
] | 1 | 2021-04-26T08:03:56.000Z | 2021-04-26T08:03:56.000Z | Spell Compendium/scr/Spell1108 - Dirge.py | Sagenlicht/ToEE_Mods | a4b07f300df6067f834e09fcbc4c788f1f4e417b | [
"MIT"
] | 2 | 2021-06-11T05:55:01.000Z | 2021-08-03T23:41:02.000Z | Spell Compendium/scr/Spell1108 - Dirge.py | Sagenlicht/ToEE_Mods | a4b07f300df6067f834e09fcbc4c788f1f4e417b | [
"MIT"
] | 1 | 2021-05-17T15:37:58.000Z | 2021-05-17T15:37:58.000Z | from toee import *
def OnBeginSpellCast(spell):
print "Dirge OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
def OnSpellEffect(spell):
print "Dirge OnSpellEffect"
targetsToRemove = []
spell.duration... | 30.121212 | 87 | 0.740443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.22334 |
6961424e888d8e63d731e6c1e71ebfa8b2d27d7f | 468 | py | Python | OMIEData/Downloaders/marginal_price_downloader.py | acruzgarcia/OMIEData | e4f8d8b8d7b5a8351a65c32e86f1a798f968cc6c | [
"MIT"
] | 9 | 2021-02-14T19:47:18.000Z | 2022-03-25T14:03:04.000Z | OMIEData/Downloaders/marginal_price_downloader.py | acruzgarcia/OMIEData | e4f8d8b8d7b5a8351a65c32e86f1a798f968cc6c | [
"MIT"
] | 2 | 2022-03-09T15:45:05.000Z | 2022-03-25T11:02:46.000Z | OMIEData/Downloaders/marginal_price_downloader.py | acruzgarcia/OMIEData | e4f8d8b8d7b5a8351a65c32e86f1a798f968cc6c | [
"MIT"
] | null | null | null |
from OMIEData.Downloaders.general_omie_downloader import GeneralOMIEDownloader
class MarginalPriceDownloader(GeneralOMIEDownloader):
url_year = 'AGNO_YYYY'
url_month = '/MES_MM/TXT/'
url_name = 'INT_PBC_EV_H_1_DD_MM_YYYY_DD_MM_YYYY.TXT'
output_mask = 'PMD_YYYYMMDD.txt'
def __init__(self):
... | 29.25 | 89 | 0.762821 | 385 | 0.82265 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.181624 |
6962fbbf3e083926d0de2767052362c19acba0b1 | 5,556 | py | Python | 054-asong/code.py | Life4gal/adworld.xctf-REVERSE | 5e552de6cf1f5fccdcba40d26ecf7060f5e782da | [
"MIT"
] | 14 | 2020-09-01T03:43:48.000Z | 2021-09-10T15:43:33.000Z | 054-asong/code.py | Life4gal/adworld.xctf-REVERSE | 5e552de6cf1f5fccdcba40d26ecf7060f5e782da | [
"MIT"
] | null | null | null | 054-asong/code.py | Life4gal/adworld.xctf-REVERSE | 5e552de6cf1f5fccdcba40d26ecf7060f5e782da | [
"MIT"
] | 3 | 2021-03-04T12:22:46.000Z | 2021-07-30T03:25:44.000Z | from struct import unpack
from os.path import getsize
# 第一步 读取 out 文件的 二进制 内容
def un_sub_400CC0() -> tuple:
"""
:return: 返回一个元祖,内容是从 out 文件中读取的内容
"""
# 读取 out 文件
outFilePath = "./out"
outLength = getsize(outFilePath)
with open(outFilePath, 'rb') as outFile:
# B = unsigned char
... | 28.639175 | 95 | 0.415767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,584 | 0.579373 |
69652dfb803516a28321ac437986a8a9c6bc0aa9 | 1,345 | py | Python | textblob.py | usmanhaider1995/TextBlob | d609fe58b1e581bc8055d61bbefc7d20ef5ce388 | [
"BSD-3-Clause"
] | null | null | null | textblob.py | usmanhaider1995/TextBlob | d609fe58b1e581bc8055d61bbefc7d20ef5ce388 | [
"BSD-3-Clause"
] | null | null | null | textblob.py | usmanhaider1995/TextBlob | d609fe58b1e581bc8055d61bbefc7d20ef5ce388 | [
"BSD-3-Clause"
] | null | null | null | from textblob import TextBlob
from textblob import Word
import nltk
nltk.download('punkt')
nltk.download('wordnet')
#getting correct sentences
words = ['Machin','Learnin','corect']
corrected_words = []
for i in words:
corrected_words.append(TextBlob(i))
print('worng words :', words)
print('Corrected words :')
for... | 23.596491 | 97 | 0.719703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 648 | 0.481784 |
696b0fe7fb16a5ee74d9c65d62711192a825d49b | 942 | py | Python | loop_fix_sample_rate.py | Crystalwarrior/AO2-Scripts | acbabc64706374362bd93662d9ce1e2cf8eb35fb | [
"MIT"
] | 1 | 2020-11-21T14:27:27.000Z | 2020-11-21T14:27:27.000Z | loop_fix_sample_rate.py | Crystalwarrior/AO2-Scripts | acbabc64706374362bd93662d9ce1e2cf8eb35fb | [
"MIT"
] | null | null | null | loop_fix_sample_rate.py | Crystalwarrior/AO2-Scripts | acbabc64706374362bd93662d9ce1e2cf8eb35fb | [
"MIT"
] | 1 | 2020-08-14T02:44:46.000Z | 2020-08-14T02:44:46.000Z | import os
from os import path
old_sample_rate = float(input("What was the original sample rate? "))
new_sample_rate = float(input("What is the new sample rate? "))
for file in os.listdir(os.getcwd()):
name = file.rsplit(".",1)[0]
if file.rsplit(".",1)[-1] == "opus" and path.exists(name + ".opus.txt"):
... | 36.230769 | 76 | 0.549894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.218684 |
696b8fef41b6b27dc44ddf7473367dc19aba29de | 2,221 | py | Python | reviewboard/extensions/templatetags/rb_extensions.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | 1 | 2015-09-11T15:50:17.000Z | 2015-09-11T15:50:17.000Z | reviewboard/extensions/templatetags/rb_extensions.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | null | null | null | reviewboard/extensions/templatetags/rb_extensions.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | null | null | null | from django import template
from django.conf import settings
from django.template.loader import render_to_string
from djblets.util.decorators import basictag
from reviewboard.extensions.hooks import DiffViewerActionHook, \
NavigationBarHook, \
... | 30.847222 | 78 | 0.641603 | 0 | 0 | 0 | 0 | 1,224 | 0.551103 | 0 | 0 | 430 | 0.193606 |
696c68c8ad6875cf4824c538720ffa0e9657eb27 | 8,671 | py | Python | opengnn/models/model.py | CoderPat/OpenGNN | bc54328ad4aa034098073c72153eed361b4266ce | [
"MIT"
] | 32 | 2019-01-28T13:38:21.000Z | 2022-03-29T08:39:00.000Z | opengnn/models/model.py | CoderPat/OpenGNN | bc54328ad4aa034098073c72153eed361b4266ce | [
"MIT"
] | 1 | 2020-01-16T03:09:18.000Z | 2020-01-16T03:44:20.000Z | opengnn/models/model.py | CoderPat/OpenGNN | bc54328ad4aa034098073c72153eed361b4266ce | [
"MIT"
] | 7 | 2019-03-07T14:13:15.000Z | 2022-03-15T10:40:41.000Z | from abc import ABC, abstractmethod
from typing import Dict, Any
import tensorflow as tf
import numpy as np
from opengnn.utils.data import diverse_batch, batch_and_bucket_by_size
from opengnn.utils.data import filter_examples_by_size, truncate_examples_by_size
def optimize(loss: tf.Tensor, params: Dict[st... | 39.958525 | 93 | 0.587937 | 7,211 | 0.831623 | 0 | 0 | 359 | 0.041402 | 0 | 0 | 915 | 0.105524 |
696cdcbe00ab21ab20807832ccc7573329262037 | 894 | py | Python | pyopendds/dev/itl2py/Output.py | jwillemsen/pyopendds | fd025416a02433dd42eeaf1ae449b6c1e19d177e | [
"MIT"
] | 19 | 2020-03-10T22:23:00.000Z | 2022-03-30T01:18:56.000Z | pyopendds/dev/itl2py/Output.py | jwillemsen/pyopendds | fd025416a02433dd42eeaf1ae449b6c1e19d177e | [
"MIT"
] | 28 | 2020-02-15T18:07:08.000Z | 2022-03-31T18:38:57.000Z | pyopendds/dev/itl2py/Output.py | jwillemsen/pyopendds | fd025416a02433dd42eeaf1ae449b6c1e19d177e | [
"MIT"
] | 6 | 2021-04-29T07:39:11.000Z | 2022-01-21T13:38:13.000Z | from pathlib import Path
from .ast import NodeVisitor
class Output(NodeVisitor):
def __init__(self, context: dict, path: Path, templates: dict):
self.context = context
self.path = path
self.templates = {}
for filename, template in templates.items():
self.templates[pat... | 33.111111 | 85 | 0.530201 | 836 | 0.935123 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.146532 |
696d1b5afd422299951b5f3ee0a8a3483cf6d75d | 2,449 | py | Python | ansible/plugins/connection/multi_passwd_ssh.py | shubav/sonic-mgmt | 0ff71b907a55489bb4ed7d17b1682380fd459bf2 | [
"Apache-2.0"
] | 132 | 2016-10-19T12:34:44.000Z | 2022-03-16T09:00:39.000Z | ansible/plugins/connection/multi_passwd_ssh.py | shubav/sonic-mgmt | 0ff71b907a55489bb4ed7d17b1682380fd459bf2 | [
"Apache-2.0"
] | 3,152 | 2016-09-21T23:05:58.000Z | 2022-03-31T23:29:08.000Z | ansible/plugins/connection/multi_passwd_ssh.py | shubav/sonic-mgmt | 0ff71b907a55489bb4ed7d17b1682380fd459bf2 | [
"Apache-2.0"
] | 563 | 2016-09-20T01:00:15.000Z | 2022-03-31T22:43:54.000Z | import imp
import os
from functools import wraps
from ansible.errors import AnsibleAuthenticationFailure
from ansible.plugins import connection
# HACK: workaround to import the SSH connection plugin
_ssh_mod = os.path.join(os.path.dirname(connection.__file__), "ssh.py")
_ssh = imp.load_source("_ssh", _ssh_mod)
# Us... | 34.985714 | 113 | 0.660269 | 312 | 0.127399 | 0 | 0 | 1,344 | 0.548795 | 0 | 0 | 910 | 0.37158 |
696db1e4a92f0d0e222cee7bcee91e0fd0798929 | 218 | py | Python | tests/helpers.py | shanedabes/sputils | 396fda1932e2a1ae4a602e9d2bc8238f0f6fecd9 | [
"Apache-2.0"
] | 1 | 2019-05-29T23:49:38.000Z | 2019-05-29T23:49:38.000Z | tests/helpers.py | shanedabes/sputils | 396fda1932e2a1ae4a602e9d2bc8238f0f6fecd9 | [
"Apache-2.0"
] | 33 | 2019-06-04T15:14:10.000Z | 2021-11-15T17:48:40.000Z | tests/helpers.py | shanedabes/sputils | 396fda1932e2a1ae4a602e9d2bc8238f0f6fecd9 | [
"Apache-2.0"
] | null | null | null | import os
import json
def rel_fn(fn):
dir_name = os.path.dirname(os.path.realpath(__file__))
return os.path.join(dir_name, fn)
def mock_json(fn):
with open(rel_fn(fn)) as f:
return json.load(f)
| 16.769231 | 58 | 0.669725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
696f6073b8eafcb697b67113138ad0cec4dabea2 | 3,423 | py | Python | Lab7/Q3.py | fancent/PHY407 | 38ce8badb9537060becc255ec64e6de2968ca73c | [
"MIT"
] | 1 | 2020-12-20T17:30:06.000Z | 2020-12-20T17:30:06.000Z | Lab7/Q3.py | fancent/PHY407 | 38ce8badb9537060becc255ec64e6de2968ca73c | [
"MIT"
] | null | null | null | Lab7/Q3.py | fancent/PHY407 | 38ce8badb9537060becc255ec64e6de2968ca73c | [
"MIT"
] | 1 | 2021-06-12T14:21:13.000Z | 2021-06-12T14:21:13.000Z | """
This file aims to simulate the Belousov–Zhabotinsky reaction,
is a chemical mixture which, when heated, undergoes a series
of reactions that cause the chemical concentrations in the
mixture to oscillate between two extremes (x, y).
"""
import numpy as np
import matplotlib.pyplot as plt
## Constants
a = 1
b = 3
... | 31.990654 | 101 | 0.532282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,462 | 0.426115 |
69708664ff337e44ffae2d3817c35e032d51bec6 | 2,747 | py | Python | tests/solr_tests/tests/management_commands.py | kmgroup/django-haystack-1.2.x-for-d1.8 | b9368f169eec06e78131e81d6968cc6580d6ddee | [
"BSD-3-Clause"
] | 1 | 2016-02-24T19:40:05.000Z | 2016-02-24T19:40:05.000Z | tests/solr_tests/tests/management_commands.py | kmgroup/django-haystack-1.2.x-for-d1.8 | b9368f169eec06e78131e81d6968cc6580d6ddee | [
"BSD-3-Clause"
] | null | null | null | tests/solr_tests/tests/management_commands.py | kmgroup/django-haystack-1.2.x-for-d1.8 | b9368f169eec06e78131e81d6968cc6580d6ddee | [
"BSD-3-Clause"
] | null | null | null | import pysolr
from django.conf import settings
from django.core.management import call_command
from django.test import TestCase
from haystack import indexes
from haystack.sites import SearchSite
from core.models import MockModel
class SolrMockSearchIndex(indexes.SearchIndex):
text = indexes.CharField(document=Tru... | 36.626667 | 73 | 0.650528 | 2,512 | 0.914452 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.140881 |
6971294bf9fe140162bcbb44e819402a23fefea8 | 15,633 | py | Python | cons3rt/models/user.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | cons3rt/models/user.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | cons3rt/models/user.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | """
Copyright 2020 Jackpine Technologies Corporation
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 ... | 27.966011 | 382 | 0.602827 | 14,544 | 0.93034 | 0 | 0 | 8,652 | 0.553445 | 0 | 0 | 7,545 | 0.482633 |
69716928cf6a5af476069ffd69aec9842674f683 | 1,703 | py | Python | Topics/6_Compute/files/lambda_keepsecret.py | nsvijay04b1/AWS_Certified_Solutions_Architect_Professional | f141b9a64b652ffa9496ff47d527e7eaf4df006d | [
"Apache-2.0"
] | 1 | 2022-03-10T18:38:54.000Z | 2022-03-10T18:38:54.000Z | Topics/6_Compute/files/lambda_keepsecret.py | nsvijay04b1/AWS_Certified_Solutions_Architect_Professional | f141b9a64b652ffa9496ff47d527e7eaf4df006d | [
"Apache-2.0"
] | null | null | null | Topics/6_Compute/files/lambda_keepsecret.py | nsvijay04b1/AWS_Certified_Solutions_Architect_Professional | f141b9a64b652ffa9496ff47d527e7eaf4df006d | [
"Apache-2.0"
] | 1 | 2022-03-10T18:38:56.000Z | 2022-03-10T18:38:56.000Z | from __future__ import print_function
import json
import boto3
print('Loading function')
s3 = boto3.client('s3')
bucket_of_interest = "secretcatpics"
# For a PutObjectAcl API Event, gets the bucket and key name from the event
# If the object is not private, then it makes the object private by making a
# PutObjectA... | 32.132075 | 84 | 0.704052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 942 | 0.553142 |
15c48e2d345be8eb45daabb4d97935eaab12b990 | 17,156 | py | Python | tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 41 | 2018-05-08T11:54:37.000Z | 2022-02-09T21:19:17.000Z | tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 139 | 2018-06-07T13:45:21.000Z | 2021-04-30T20:44:06.000Z | tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py | Morgenz/bbq | f0fd3f626841c610aee80ad08a61123b7cccb775 | [
"Apache-2.0"
] | 5 | 2019-09-11T12:28:24.000Z | 2022-02-04T21:38:29.000Z | import unittest
from apiclient.errors import HttpError
from google.appengine.ext import testbed, ndb
from mock import patch, Mock
from src.commons.big_query.copy_job_async.copy_job.copy_job_request \
import CopyJobRequest
from src.commons.big_query.copy_job_async.copy_job.copy_job_service \
import CopyJobServ... | 42.152334 | 124 | 0.570354 | 16,348 | 0.952903 | 0 | 0 | 15,339 | 0.89409 | 0 | 0 | 2,794 | 0.162858 |
15c53f273bb229773a9dd501a2ed7fb628ef13eb | 399 | py | Python | solutions/dog_muffin.py | attawesome/Computer-Vision-with-OpenCV | 1198bfee8683f6b5c415e07e085fa528e00ecd0a | [
"MIT"
] | 6 | 2020-04-30T21:46:13.000Z | 2021-02-15T21:32:50.000Z | solutions/dog_muffin.py | attawesome/Computer-Vision-with-OpenCV | 1198bfee8683f6b5c415e07e085fa528e00ecd0a | [
"MIT"
] | null | null | null | solutions/dog_muffin.py | attawesome/Computer-Vision-with-OpenCV | 1198bfee8683f6b5c415e07e085fa528e00ecd0a | [
"MIT"
] | 6 | 2020-04-27T17:59:50.000Z | 2020-12-13T16:10:09.000Z | import cv2
import numpy as np
import matplotlib.pyplot as plt
image = np.flip(cv2.imread('../img/dog_muffin.jpg'), axis=2)
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (90, 120), (160, 190), 255, -1)
masked = cv2.bitwise_and(image, image, mask=mask)
plt.figure(figsize=(20, 10))
plt.imshow(np.fl... | 30.692308 | 60 | 0.691729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.110276 |
15c8d860e73304bf40bd4b99e9d98b1c9921b456 | 2,676 | py | Python | jetavator/schema_registry/VaultObject.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | null | null | null | jetavator/schema_registry/VaultObject.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | 86 | 2020-04-11T18:03:32.000Z | 2021-06-15T14:48:45.000Z | jetavator/schema_registry/VaultObject.py | jetavator/jetavator | 6edc7b57532809f9903735c333544658631252b5 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import Any, Dict, List
from abc import ABC, abstractmethod
from datetime import datetime
from collections import namedtuple
from lazy_property import LazyProperty
from .sqlalchemy_tables import ObjectDefinition
import wysdom
from jetavator.services import ComputeServ... | 26.49505 | 72 | 0.65284 | 2,181 | 0.815022 | 0 | 0 | 1,189 | 0.44432 | 0 | 0 | 188 | 0.070254 |
15caae15c5cee5107dd04fd63976ca50c1febedb | 79 | py | Python | braandket/kernel/__init__.py | ZhengKeli/BraAndKet | f47cdbdb4c5040dd071815378138ac376c205f14 | [
"MIT"
] | 1 | 2022-01-13T13:18:41.000Z | 2022-01-13T13:18:41.000Z | braandket/kernel/__init__.py | ZhengKeli/BraAndKet | f47cdbdb4c5040dd071815378138ac376c205f14 | [
"MIT"
] | null | null | null | braandket/kernel/__init__.py | ZhengKeli/BraAndKet | f47cdbdb4c5040dd071815378138ac376c205f14 | [
"MIT"
] | 2 | 2020-11-06T20:16:13.000Z | 2020-12-01T12:56:03.000Z | from .abstract import Kernel
from .auto import AutoKernel
from .numpy import *
| 19.75 | 28 | 0.797468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15cdcd4087b753790bc8fb71c6e5d7a167674399 | 1,500 | py | Python | CourseOnline/MainProject/forms.py | smygt/DjangoSchoolSystem. | 6ddbef118ed7a2bb77192f96fc888a36ad4831ed | [
"MIT"
] | null | null | null | CourseOnline/MainProject/forms.py | smygt/DjangoSchoolSystem. | 6ddbef118ed7a2bb77192f96fc888a36ad4831ed | [
"MIT"
] | null | null | null | CourseOnline/MainProject/forms.py | smygt/DjangoSchoolSystem. | 6ddbef118ed7a2bb77192f96fc888a36ad4831ed | [
"MIT"
] | null | null | null | from django import forms
from .models import Announcement
# from .models import Role
from .models import Assignment
from .models import CourseMaterial
from .models import Grade
from .models import StudentUploadFile
from .models import Syllabus
from .models import Assistant
from django.forms import ClearableFileInput
#... | 22.38806 | 76 | 0.685333 | 940 | 0.626667 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.256667 |
15ced209f13f0b2a1de3e15ddd92542a87b54d79 | 29,172 | py | Python | ginga/canvas/types/plots.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 76 | 2015-01-05T14:46:14.000Z | 2022-03-23T04:10:54.000Z | ginga/canvas/types/plots.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 858 | 2015-01-17T01:55:12.000Z | 2022-03-08T20:20:31.000Z | ginga/canvas/types/plots.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 60 | 2015-01-14T21:59:07.000Z | 2022-02-13T03:38:49.000Z | #
# plots.py -- classes for plots added to Ginga canvases.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import sys
import numpy as np
from ginga.canvas.CanvasObject import (CanvasObjectBase, _color,
register_canva... | 35.189385 | 80 | 0.547614 | 28,536 | 0.978198 | 0 | 0 | 746 | 0.025572 | 0 | 0 | 7,101 | 0.243418 |
15d0460d3097f204a84b42c16fe07a92ea6eb177 | 8,305 | py | Python | process_disqualified_directors_data.py | Global-Witness/uk-companies-house-parsers-public | e33a3a7791d6565638e2f3c0fd1233a909d983f2 | [
"MIT"
] | 2 | 2019-08-03T16:58:43.000Z | 2022-01-23T16:57:52.000Z | process_disqualified_directors_data.py | Global-Witness/uk-companies-house-parsers-public | e33a3a7791d6565638e2f3c0fd1233a909d983f2 | [
"MIT"
] | 1 | 2019-06-18T10:10:20.000Z | 2019-06-18T10:10:20.000Z | process_disqualified_directors_data.py | Global-Witness/uk-companies-house-parsers-public | e33a3a7791d6565638e2f3c0fd1233a909d983f2 | [
"MIT"
] | 1 | 2020-11-01T10:21:03.000Z | 2020-11-01T10:21:03.000Z | import csv
import os
import sys
from collections import defaultdict
PERSONS_OUTPUT_FILENAME_TEMPLATE = "persons_data_%s.csv"
DISQUALIFICATIONS_FILENAME_TEMPLATE = "disqualifications_data_%s.csv"
EXEMPTIONS_FILENAME_TEMPLATE = 'exemptions_data_%s.csv'
SNAPSHOT_HEADER_IDENTIFIER = "DISQUALS"
TRAILER_RECORD_IDENTIFIER = ... | 41.318408 | 162 | 0.706562 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,379 | 0.166045 |
15d05a5b381b6c77c32c1817ba56017e005be78f | 2,875 | py | Python | myPackage/tools.py | marcgonzmont/ML_Challenge | ed9767689064a941c2db7642fc499828d0ad1326 | [
"CC0-1.0"
] | null | null | null | myPackage/tools.py | marcgonzmont/ML_Challenge | ed9767689064a941c2db7642fc499828d0ad1326 | [
"CC0-1.0"
] | null | null | null | myPackage/tools.py | marcgonzmont/ML_Challenge | ed9767689064a941c2db7642fc499828d0ad1326 | [
"CC0-1.0"
] | null | null | null | from os import makedirs, errno
from os.path import exists, join
import numpy as np
from matplotlib import pyplot as plt
import itertools
from sklearn import preprocessing
def makeDir(path):
'''
To create output path if doesn't exist
see: https://stackoverflow.com/questions/273192/how-can-i-create... | 31.593407 | 102 | 0.619826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 971 | 0.337739 |
15d0b4957b2e9a69a93ba4e15d527f629984be60 | 9,802 | py | Python | maskrcnn_benchmark/data/datasets/kitti.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 78 | 2020-03-02T12:00:57.000Z | 2022-02-21T09:48:08.000Z | maskrcnn_benchmark/data/datasets/kitti.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 19 | 2020-03-02T12:07:18.000Z | 2022-03-30T08:04:06.000Z | maskrcnn_benchmark/data/datasets/kitti.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 14 | 2020-06-14T03:29:47.000Z | 2021-07-21T06:30:08.000Z | import os
import torch
import torch.utils.data
from PIL import Image
import sys
import numpy as np
if sys.version_info[0] == 2:
import xml.etree.cElementTree as ET
else:
import xml.etree.ElementTree as ET
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_benchmark.structures.bound... | 36.169742 | 89 | 0.576515 | 9,129 | 0.931341 | 0 | 0 | 0 | 0 | 0 | 0 | 1,091 | 0.111304 |
15d22cd4619c04c4fa2d8d4c420166060bc9ee2a | 25,744 | py | Python | escriptcore/py_src/faultsystems.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | escriptcore/py_src/faultsystems.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | escriptcore/py_src/faultsystems.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2003-2020 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unti... | 37.803231 | 305 | 0.595284 | 24,397 | 0.947677 | 0 | 0 | 0 | 0 | 0 | 0 | 11,291 | 0.438588 |
15d2546aeaf271239203d19ad3ebcd6e67edaf83 | 9,680 | py | Python | acs/acs/Core/FileParsingManager.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | acs/acs/Core/FileParsingManager.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | acs/acs/Core/FileParsingManager.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | """
:copyright: (c)Copyright 2013, Intel Corporation All Rights Reserved.
The source code contained or described here in and all documents related
to the source code ("Material") are owned by Intel Corporation or its
suppliers or licensors. Title to the Material remains with Intel Corporation
or its suppliers and lic... | 36.946565 | 119 | 0.630785 | 8,243 | 0.85155 | 0 | 0 | 0 | 0 | 0 | 0 | 4,233 | 0.437293 |
15d53e64696bdcd31c356310ca351fd13adec82e | 2,256 | py | Python | Chapter 16/excel_to_csv.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | 4 | 2021-06-14T10:37:58.000Z | 2021-12-30T17:49:17.000Z | Chapter 16/excel_to_csv.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | null | null | null | Chapter 16/excel_to_csv.py | ostin-r/automate-boring-stuff-solutions | 78f0a2981e6520ff2907285e666168a0f35eba02 | [
"FTL"
] | 1 | 2021-07-29T15:26:54.000Z | 2021-07-29T15:26:54.000Z | '''
Austin Richards 4/14/21
excel_to_csv.py automates the conversion of many xlsx
files into csv files. This program names the csv file
in the format <filename>_<sheetname>.csv
'''
import logging
import os, csv, openpyxl
from pathlib import Path
from openpyxl.utils import get_column_letter
logging.basicConfig(level=... | 35.25 | 98 | 0.649379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 716 | 0.317376 |
15d571532daed68e7ee3f7aca094467594fa8bdd | 2,041 | py | Python | kg/diff/templates/real_abs_rel_template.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | kg/diff/templates/real_abs_rel_template.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | kg/diff/templates/real_abs_rel_template.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | # Checks for an XXX error ### @replace "XXX", ('absolute/relative' if has_rel else 'absolute')
# with an error of at most 1e-XXX ### @replace "XXX", prec
# Don't edit this file. Edit real_abs_rel_template.py instead, and then run _real_check_gen.py
# Oh, actually, you're editing the correct file. Go on. ... | 52.333333 | 123 | 0.588437 | 0 | 0 | 0 | 0 | 1,094 | 0.536012 | 0 | 0 | 1,075 | 0.526703 |
15d5daf61123ba5cf4f2cb454d6eaf622ef68705 | 1,099 | py | Python | osspeak/recognition/actions/library/process.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | 1 | 2020-03-17T10:24:41.000Z | 2020-03-17T10:24:41.000Z | osspeak/recognition/actions/library/process.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | 12 | 2016-09-28T05:16:00.000Z | 2020-11-27T22:32:40.000Z | osspeak/recognition/actions/library/process.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | null | null | null | import time
import os
import subprocess
import threading
class ProcessHandler:
def __init__(self, *args, on_output=None):
self.process = subprocess.Popen(args, stdin=subprocess.PIPE,
stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
self.on_output = on_output
self.sta... | 28.179487 | 78 | 0.626934 | 917 | 0.834395 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.049136 |
15d6695d5c93e5916f4ed45db19a2876ea82e9ee | 977 | py | Python | setup.py | haaspt/whatsnew | 0524ad2b6132593282946073f2d647ea0ce960e8 | [
"MIT"
] | 2 | 2015-09-02T21:14:26.000Z | 2015-09-02T22:23:04.000Z | setup.py | haaspt/whatsnew | 0524ad2b6132593282946073f2d647ea0ce960e8 | [
"MIT"
] | 2 | 2018-01-02T00:54:49.000Z | 2018-01-02T00:56:01.000Z | setup.py | haaspt/whatsnew | 0524ad2b6132593282946073f2d647ea0ce960e8 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
readme = open('README.md').read()
requirements = ['click', 'feedparser', 'beautifulsoup4']
setup(
name = "whatsnew",
version = "0.13",
author = "Patrick Tyler Haas",
author_email = "[email protected]",
description = ("A lightweight, convenient too... | 29.606061 | 125 | 0.602866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 510 | 0.522006 |
15da0373b1191b0c411cc06fa6774cfb3700fb3a | 2,880 | py | Python | Flask-Server/timeswitch/server.py | weichweich/pi-timeswitch | c4428783fbf8b2294f7a6f55c312beeabae94d6f | [
"MIT"
] | 4 | 2015-10-12T19:13:22.000Z | 2018-07-18T17:55:48.000Z | Flask-Server/timeswitch/server.py | weichweich/pi-timeswitch | c4428783fbf8b2294f7a6f55c312beeabae94d6f | [
"MIT"
] | null | null | null | Flask-Server/timeswitch/server.py | weichweich/pi-timeswitch | c4428783fbf8b2294f7a6f55c312beeabae94d6f | [
"MIT"
] | 2 | 2017-04-25T16:19:09.000Z | 2022-01-24T08:15:12.000Z | import argparse
import logging
import sys
from timeswitch.switch.manager import SwitchManager
from timeswitch.app import setup_app
from timeswitch.api import setup_api
from timeswitch.model import setup_model
# ######################################
# # parsing commandline args
# #####################################... | 32 | 94 | 0.601389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,055 | 0.366319 |
15db2920ca4b3d1d42695dca0b6816fa94b0f30d | 12,055 | py | Python | utils/videoloader.py | mie-lab/traffic4cast | aea6f90e8884c01689c84255c99e96d2b58dc470 | [
"Apache-2.0"
] | 8 | 2020-07-26T20:54:58.000Z | 2022-03-01T14:36:13.000Z | utils/videoloader.py | mie-lab/traffic4cast | aea6f90e8884c01689c84255c99e96d2b58dc470 | [
"Apache-2.0"
] | null | null | null | utils/videoloader.py | mie-lab/traffic4cast | aea6f90e8884c01689c84255c99e96d2b58dc470 | [
"Apache-2.0"
] | 5 | 2019-11-05T09:46:01.000Z | 2021-01-24T04:42:53.000Z | import sys, os, time
from pathlib import Path
import pickle
import datetime as dt
import glob
import h5py
import numpy as np
from matplotlib import pyplot as plt
from multiprocessing import Pool
from functools import partial
import torch
from torchvision import datasets, transforms
def subsample(x, n=0, m=200):
... | 34.942029 | 132 | 0.555454 | 11,367 | 0.942615 | 0 | 0 | 0 | 0 | 0 | 0 | 3,619 | 0.300108 |
15dd1eeb2fac5589a59d8aeda6e5e6d37752563e | 2,369 | py | Python | foundation/correspondence/views/letter.py | pilnujemy/foundation-manager | 1f1d6afcbb408c87a171bcbe3f9e58570eb478b6 | [
"BSD-3-Clause"
] | 1 | 2016-01-04T06:30:24.000Z | 2016-01-04T06:30:24.000Z | foundation/correspondence/views/letter.py | pilnujemy/foundation-manager | 1f1d6afcbb408c87a171bcbe3f9e58570eb478b6 | [
"BSD-3-Clause"
] | 36 | 2015-11-27T14:17:34.000Z | 2016-07-14T10:23:52.000Z | foundation/correspondence/views/letter.py | pilnujemy/foundation-manager | 1f1d6afcbb408c87a171bcbe3f9e58570eb478b6 | [
"BSD-3-Clause"
] | 1 | 2016-05-14T01:11:28.000Z | 2016-05-14T01:11:28.000Z | from django.views.generic import DeleteView, DetailView, UpdateView, CreateView
from django.forms.models import BaseInlineFormSet
from django.forms.models import inlineformset_factory
from braces.views import LoginRequiredMixin, UserFormKwargsMixin, SelectRelatedMixin
from ..models import Letter, Attachment
from ..form... | 34.333333 | 95 | 0.765724 | 1,305 | 0.550865 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.073449 |
15de738d2ebcbbe25e92a2d8f2d43e4cb6af3d82 | 1,760 | py | Python | pychunkedgraph/ingest/ingestion_utils.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | pychunkedgraph/ingest/ingestion_utils.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | pychunkedgraph/ingest/ingestion_utils.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | import numpy as np
from pychunkedgraph.backend import chunkedgraph, chunkedgraph_utils
import cloudvolume
def initialize_chunkedgraph(cg_table_id, ws_cv_path, chunk_size, cg_mesh_dir,
fan_out=2, instance_id=None, project_id=None):
""" Initalizes a chunkedgraph on BigTable
:param ... | 30.877193 | 84 | 0.64375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.400568 |
15dec2f55095e3b6ec802c41f0cedadb58146312 | 2,691 | py | Python | brew_gui.py | mburgess00/brew_controller | 913e3b37b9421759db5186e5f0e44cf8f4fd7f6a | [
"Apache-2.0"
] | null | null | null | brew_gui.py | mburgess00/brew_controller | 913e3b37b9421759db5186e5f0e44cf8f4fd7f6a | [
"Apache-2.0"
] | null | null | null | brew_gui.py | mburgess00/brew_controller | 913e3b37b9421759db5186e5f0e44cf8f4fd7f6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from guizero import App, Text, Slider, Combo, PushButton, Box, Picture
pause = True
def readsensors():
return {"hlt" : 160, "rims" : 152, "bk" : 75}
def handlepause():
global pause
global pauseState
print("Pause Button pressed")
if pause:
print("running")
pa... | 37.901408 | 91 | 0.670011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.149387 |
15e018d003308b6e32514ff4f0cb219f8f099c3b | 2,498 | py | Python | tests/integration/test_integration.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-11-30T06:47:24.000Z | 2021-11-30T06:47:24.000Z | tests/integration/test_integration.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-04-08T12:56:39.000Z | 2021-04-08T12:56:39.000Z | tests/integration/test_integration.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from resolos.interface import (
res_remote_add,
res_remote_remove,
res_init,
res_sync,
res
)
from resolos.remote import read_remote_db, list_remote_ids, delete_remote
from tests.common import verify_result
import logging
from pathlib import Path
import os
log... | 43.068966 | 219 | 0.601281 | 2,053 | 0.821857 | 0 | 0 | 0 | 0 | 0 | 0 | 748 | 0.29944 |
15e034a0325db7cea2ebf82178c6ea8ad80d5cda | 946 | py | Python | test/test_add_group.py | romanovaes/python_training | 5df3a9b716e7659fb8f61e0b55e5217cc6a1a89e | [
"Apache-2.0"
] | null | null | null | test/test_add_group.py | romanovaes/python_training | 5df3a9b716e7659fb8f61e0b55e5217cc6a1a89e | [
"Apache-2.0"
] | null | null | null | test/test_add_group.py | romanovaes/python_training | 5df3a9b716e7659fb8f61e0b55e5217cc6a1a89e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from builtins import *
from model.group import Group
import pytest
import allure
#@pytest.mark.parametrize("group", testdata, ids=[repr(x) for x in testdata])
@allure.step('test_add_group')
def test_add_group(app, db, json_groups, check_ui):
group=json_groups
#with pytest.allu... | 35.037037 | 153 | 0.689218 | 0 | 0 | 0 | 0 | 755 | 0.798097 | 0 | 0 | 327 | 0.345666 |
15e04aa4840a7e7977d248d10cc55f54658702cd | 753 | py | Python | examples/Genius/Python/GeniusCancel/GeniusCancel/GeniusCancel.py | sfmwright/developer-docs | 160c7c9d8b1f75964ed2615373516361564cac82 | [
"Apache-2.0"
] | 4 | 2019-08-20T03:06:43.000Z | 2021-11-09T18:18:31.000Z | examples/Genius/Python/GeniusCancel/GeniusCancel/GeniusCancel.py | sfmwright/developer-docs | 160c7c9d8b1f75964ed2615373516361564cac82 | [
"Apache-2.0"
] | 1 | 2020-01-28T11:26:32.000Z | 2020-03-09T11:06:26.000Z | examples/Genius/Python/GeniusCancel/GeniusCancel/GeniusCancel.py | sfmwright/developer-docs | 160c7c9d8b1f75964ed2615373516361564cac82 | [
"Apache-2.0"
] | 8 | 2019-04-20T00:16:26.000Z | 2020-12-29T20:48:14.000Z | import urllib3
import lxml.etree as etree
import lxml.objectify as objectify
# Declare IP Address
ip_address = "192.168.0.123"
# Generate XML and XSD Validation
genius_schema = etree.XMLSchema(file='Genius.xsd')
xml_parser = objectify.makeparser(schema=genius_schema)
# Send Status Request
genius_comm = urllib3.PoolMan... | 39.631579 | 82 | 0.802125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 260 | 0.345286 |
15e0c5cedcaca764ffdaedc7f69b8b05a55711fa | 6,270 | py | Python | editNames.py | harmsm/phylo_tools | 470873a6decd8c9ca6f66308eeb53f7f6627115b | [
"Unlicense"
] | null | null | null | editNames.py | harmsm/phylo_tools | 470873a6decd8c9ca6f66308eeb53f7f6627115b | [
"Unlicense"
] | 1 | 2015-07-22T15:53:11.000Z | 2015-07-22T16:49:54.000Z | editNames.py | harmsm/phylo_tools | 470873a6decd8c9ca6f66308eeb53f7f6627115b | [
"Unlicense"
] | 3 | 2015-07-01T22:39:55.000Z | 2019-08-13T21:23:20.000Z | #!/usr/bin/env python
__description__ =\
"""
editNames.py
Goes through a file looking for a set of strings, replacing each one with a
specific counterpart. The strings are defined in a delimited text file
with columns naemd "key" and "value".
"""
__author__ = "Michael J. Harms"
__date__ = "091205"
__usage__ = "editT... | 32.319588 | 82 | 0.612919 | 1,585 | 0.252791 | 0 | 0 | 0 | 0 | 0 | 0 | 2,381 | 0.379745 |
15e3d38045eea34ae5ee1b0e2ce54a0a8b72223a | 3,988 | py | Python | test/test_docx_context.py | ieric2/docx2python | 4a1266811f9bd71f5eea5e0d458a391fd9eb4f73 | [
"MIT"
] | 52 | 2019-07-08T19:37:45.000Z | 2022-03-30T11:36:08.000Z | test/test_docx_context.py | ieric2/docx2python | 4a1266811f9bd71f5eea5e0d458a391fd9eb4f73 | [
"MIT"
] | 29 | 2019-08-29T09:48:24.000Z | 2022-03-13T13:58:58.000Z | test/test_docx_context.py | ieric2/docx2python | 4a1266811f9bd71f5eea5e0d458a391fd9eb4f73 | [
"MIT"
] | 23 | 2019-08-29T11:33:13.000Z | 2022-03-03T17:22:35.000Z | #!/usr/bin/env python3
# _*_ coding: utf-8 _*_
"""Test docx2python.docx_context.py
author: Shay Hill
created: 6/26/2019
"""
import os
import shutil
import zipfile
from collections import defaultdict
from typing import Any, Dict
import pytest
from docx2python.docx_context import (
collect_docProps,
collect_nu... | 33.79661 | 87 | 0.658977 | 3,391 | 0.850301 | 0 | 0 | 186 | 0.04664 | 0 | 0 | 1,738 | 0.435807 |
15e42de122c93447226408dd404b3ccbe892d9e6 | 1,022 | py | Python | src/transporters/approximator/transporter.py | mucharafal/optics_generator_python | c14d4e5f19f921f4dc0a98129bca9d31754b72ad | [
"MIT"
] | null | null | null | src/transporters/approximator/transporter.py | mucharafal/optics_generator_python | c14d4e5f19f921f4dc0a98129bca9d31754b72ad | [
"MIT"
] | null | null | null | src/transporters/approximator/transporter.py | mucharafal/optics_generator_python | c14d4e5f19f921f4dc0a98129bca9d31754b72ad | [
"MIT"
] | null | null | null | import transporters.approximator.runner as ra
from data.parameters_names import ParametersNames as Parameters
def transport(approximator, particles):
"""matrix in format returned by data.particles_generator functions"""
segments = dict()
segments["start"] = particles
matrix_for_transporter = partic... | 28.388889 | 113 | 0.683953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.079256 |
15e6039e8fc572eeaac3ad290d2bd1f836aa300b | 183 | py | Python | vega/modules/tensformers/__init__.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | 724 | 2020-06-22T12:05:30.000Z | 2022-03-31T07:10:54.000Z | vega/modules/tensformers/__init__.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | 147 | 2020-06-30T13:34:46.000Z | 2022-03-29T11:30:17.000Z | vega/modules/tensformers/__init__.py | jie311/vega | 1bba6100ead802697e691403b951e6652a99ccae | [
"MIT"
] | 160 | 2020-06-29T18:27:58.000Z | 2022-03-23T08:42:21.000Z | from .embeddings import BertEmbeddings
from .encoder import BertEncoder
from .pooler import Pooler
from .pertrained_hooks import pretrained_bert_hook, pretrained_bert_classifier_hook
| 36.6 | 83 | 0.879781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15e6149aa17b64d559de3c4f55ed8ff3fa679352 | 666 | py | Python | postgresqleu/confsponsor/migrations/0008_class_params_json.py | bradfordboyle/pgeu-system | bbe70e7a94092c10f11a0f74fda23079532bb018 | [
"MIT"
] | 11 | 2020-08-20T11:16:02.000Z | 2022-03-12T23:25:04.000Z | postgresqleu/confsponsor/migrations/0008_class_params_json.py | bradfordboyle/pgeu-system | bbe70e7a94092c10f11a0f74fda23079532bb018 | [
"MIT"
] | 71 | 2019-11-18T10:11:22.000Z | 2022-03-27T16:12:57.000Z | postgresqleu/confsponsor/migrations/0008_class_params_json.py | bradfordboyle/pgeu-system | bbe70e7a94092c10f11a0f74fda23079532bb018 | [
"MIT"
] | 18 | 2019-11-18T09:56:31.000Z | 2022-01-08T03:16:43.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-06-26 20:22
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('confsponsor', '0007_contract_per_conference'),
]
... | 28.956522 | 119 | 0.686186 | 471 | 0.707207 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.366366 |
15e6a04a8da0e44c61254eaa10ce768020d0ae51 | 186 | py | Python | example_problem/dialogue/dialogue_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | example_problem/dialogue/dialogue_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | example_problem/dialogue/dialogue_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | import example_problem.analyst.dialogue_functions as analyst
import example_problem.engineer.dialogue_functions as engineer
import example_problem.critic.dialogue_functions as critic
| 26.571429 | 62 | 0.887097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15e96ef0984aad80cae6e556037214dc416821d1 | 9,077 | py | Python | hack/make-rules/generate-notice.py | dingfeng/galaxykube | f5ea5cf40c957358e2bc5b14eabc9dea2ec93ad2 | [
"Apache-2.0"
] | 29 | 2021-10-16T06:01:53.000Z | 2022-03-31T02:37:30.000Z | hack/make-rules/generate-notice.py | dingfeng/galaxykube | f5ea5cf40c957358e2bc5b14eabc9dea2ec93ad2 | [
"Apache-2.0"
] | null | null | null | hack/make-rules/generate-notice.py | dingfeng/galaxykube | f5ea5cf40c957358e2bc5b14eabc9dea2ec93ad2 | [
"Apache-2.0"
] | 11 | 2021-10-18T02:26:32.000Z | 2022-01-11T12:06:03.000Z | #!/usr/bin/env python3
# Copyright 2021 Alibaba Group Holding Limited.
#
# 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... | 46.311224 | 755 | 0.736036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,893 | 0.649223 |
15f0c68253b44fcf807be3d2c13c0296e0b8bc18 | 47 | py | Python | python/graph/__init__.py | advaithm582/algorithms | 9a5261b69ea7bc84afb9f8561c1d497a799733f9 | [
"MIT"
] | 2 | 2021-11-17T07:48:34.000Z | 2021-12-10T03:09:00.000Z | python/graph/__init__.py | advaithm582/algorithms | 9a5261b69ea7bc84afb9f8561c1d497a799733f9 | [
"MIT"
] | null | null | null | python/graph/__init__.py | advaithm582/algorithms | 9a5261b69ea7bc84afb9f8561c1d497a799733f9 | [
"MIT"
] | null | null | null | import graph.bfs as bfs
import graph.dfs as dfs | 23.5 | 23 | 0.808511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15f328ce83cf7262e3a2711b251f951f5f5aef7e | 1,542 | py | Python | src/hydratk/core/eventhandler.py | hydratk/hydratk | 54f64df2a68f49ba4ce564bf102824cc33dbe6c8 | [
"BSD-3-Clause"
] | null | null | null | src/hydratk/core/eventhandler.py | hydratk/hydratk | 54f64df2a68f49ba4ce564bf102824cc33dbe6c8 | [
"BSD-3-Clause"
] | null | null | null | src/hydratk/core/eventhandler.py | hydratk/hydratk | 54f64df2a68f49ba4ce564bf102824cc33dbe6c8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""HydraTK core event handling implementation class
.. module:: core.eventhandler
:platform: Unix
:synopsis: HydraTK core event handling implementation class
.. moduleauthor:: Petr Czaderna <[email protected]>
"""
from hydratk.core import hsignal
class EventHandler(object):
"""Class ... | 27.052632 | 66 | 0.662776 | 1,262 | 0.818418 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.214008 |
15f34bffaf876f6f6a2e7f2b53d0bff13ac885d0 | 13,660 | py | Python | charon/saver.py | Galithil/charon | 7b11780b8275d775c467e7ebd4a99a9d6bb77ee4 | [
"MIT"
] | 3 | 2015-11-18T06:20:56.000Z | 2017-09-20T14:44:45.000Z | charon/saver.py | Galithil/charon | 7b11780b8275d775c467e7ebd4a99a9d6bb77ee4 | [
"MIT"
] | 25 | 2015-02-20T15:13:27.000Z | 2018-11-06T14:17:17.000Z | charon/saver.py | Galithil/charon | 7b11780b8275d775c467e7ebd4a99a9d6bb77ee4 | [
"MIT"
] | 8 | 2015-05-22T14:16:05.000Z | 2022-03-22T07:55:25.000Z | " Charon: Context handler for saving an entity. "
import logging
import couchdb
from . import constants
from . import utils
class Field(object):
"Specification of a data field for an entity."
type ='text'
def __init__(self, key, title=None, description=None,
mandatory=False, editable... | 35.572917 | 82 | 0.544583 | 13,508 | 0.988873 | 0 | 0 | 0 | 0 | 0 | 0 | 2,758 | 0.201903 |
15f39d0f421f2c653443422d6ac14afb93981bf5 | 5,264 | py | Python | app/projects/tests/test_portfolio_api.py | nestor-san/cooperation-fit | 1a922233345698970c7e18e6213ad0320de70cce | [
"MIT"
] | null | null | null | app/projects/tests/test_portfolio_api.py | nestor-san/cooperation-fit | 1a922233345698970c7e18e6213ad0320de70cce | [
"MIT"
] | null | null | null | app/projects/tests/test_portfolio_api.py | nestor-san/cooperation-fit | 1a922233345698970c7e18e6213ad0320de70cce | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import PortfolioItem
from projects.serializers import PortfolioItemSerializer
PORTFOLIO_URL = reverse('project... | 38.992593 | 78 | 0.644187 | 4,758 | 0.903875 | 0 | 0 | 0 | 0 | 0 | 0 | 1,064 | 0.202128 |
15f3b785cb9961fa87557827d4473398f7509cf4 | 3,662 | py | Python | msc_CollectData.py | waldu/AdPExT | 99238119d170ead8cfc0fe5a5ff163d1fc0e9dbb | [
"MIT"
] | null | null | null | msc_CollectData.py | waldu/AdPExT | 99238119d170ead8cfc0fe5a5ff163d1fc0e9dbb | [
"MIT"
] | null | null | null | msc_CollectData.py | waldu/AdPExT | 99238119d170ead8cfc0fe5a5ff163d1fc0e9dbb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on: Sun May 21 05:09:40 2017
Author: Waldu Woensdregt
Description: Code uses OpenWPM package to extract HTTPS responses from
selected set of URLs (defined in GetListOfSiteURLsToExtract)
and then splits the resulting data into individual ... | 43.082353 | 118 | 0.66521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,311 | 0.631076 |
15f3e6d11f8953cc11ced404d841621499083f56 | 2,545 | py | Python | utils/generateLocation.py | mie-lab/change-detection | 53f44d1e39405ab56be4e24da9e40cca31af8908 | [
"MIT"
] | null | null | null | utils/generateLocation.py | mie-lab/change-detection | 53f44d1e39405ab56be4e24da9e40cca31af8908 | [
"MIT"
] | null | null | null | utils/generateLocation.py | mie-lab/change-detection | 53f44d1e39405ab56be4e24da9e40cca31af8908 | [
"MIT"
] | null | null | null | import pandas as pd
import datetime
import geopandas as gpd
import os
from tqdm import tqdm
from shapely import wkt
from config import config
import trackintel as ti
def generate_Location(df, epsilon, user):
"""Cluster staypoints to locations, with different parameters and distinguish 'user' and 'dataset'"""
... | 35.84507 | 111 | 0.667191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,199 | 0.47112 |
15f6ebf3d219ce6b1cd4eb680d9639aa61bcb259 | 369 | py | Python | test.py | liyao001/EVBUS | 8730ce6b062bc31df27506a06723dee3b5ab511a | [
"Apache-2.0"
] | null | null | null | test.py | liyao001/EVBUS | 8730ce6b062bc31df27506a06723dee3b5ab511a | [
"Apache-2.0"
] | null | null | null | test.py | liyao001/EVBUS | 8730ce6b062bc31df27506a06723dee3b5ab511a | [
"Apache-2.0"
] | null | null | null | from EVBUS import EVBUS
from sklearn.datasets import load_boston
import sklearn.model_selection as xval
boston = load_boston()
Y = boston.data[:, 12]
X = boston.data[:, 0:12]
bos_X_train, bos_X_test, bos_y_train, bos_y_test = xval.train_test_split(X, Y, test_size=0.3)
evbus = EVBUS.varU(bos_X_train, bos_y_train, bos_... | 26.357143 | 93 | 0.772358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15f8928949b14c3be24585b15f6516fd3a9db474 | 7,226 | py | Python | tests/listings/test_views.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/listings/test_views.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/listings/test_views.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils.translation import ugettext as _
from bazaar.listings.models import Listing
from rest_framework... | 44.604938 | 119 | 0.691392 | 6,781 | 0.938417 | 0 | 0 | 0 | 0 | 0 | 0 | 2,033 | 0.281345 |
15f98430ae44305a9e31a13aeb782706e3a1fd29 | 2,141 | py | Python | aws/olympic-api/olympic/app.py | kevinle-1/olympic-api | c341328eb9c4ce26fcd08199abf1fb996deebbbf | [
"MIT"
] | 4 | 2021-07-29T06:29:33.000Z | 2021-08-31T22:38:21.000Z | aws/olympic-api/olympic/app.py | kevinle-1/olympic-api | c341328eb9c4ce26fcd08199abf1fb996deebbbf | [
"MIT"
] | null | null | null | aws/olympic-api/olympic/app.py | kevinle-1/olympic-api | c341328eb9c4ce26fcd08199abf1fb996deebbbf | [
"MIT"
] | 2 | 2021-07-25T08:51:52.000Z | 2021-07-25T18:06:24.000Z | import json
import requests
from bs4 import BeautifulSoup
PAGE_URL = 'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/medal-standings.htm'
def get_table(html=None):
if not html: html = requests.get(PAGE_URL).content
site = BeautifulSoup(html, 'html.parser')
table = site.find('table', ... | 30.15493 | 225 | 0.601588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 755 | 0.352639 |
15fb00a29a6af7f533e2efe7c7832130560820ef | 5,348 | py | Python | crawlers/core/thread_types.py | nonemaw/YeTi | 92a3ba89f5b7fd8b2d5d3f5929ade0bf0b9e5cbe | [
"MIT"
] | 1 | 2017-10-04T12:21:20.000Z | 2017-10-04T12:21:20.000Z | crawlers/core/thread_types.py | nonemaw/YeTi | 92a3ba89f5b7fd8b2d5d3f5929ade0bf0b9e5cbe | [
"MIT"
] | null | null | null | crawlers/core/thread_types.py | nonemaw/YeTi | 92a3ba89f5b7fd8b2d5d3f5929ade0bf0b9e5cbe | [
"MIT"
] | null | null | null | import queue
import json
import logging
import threading
from crawlers.core.flags import FLAGS
class BaseThread(threading.Thread):
def __init__(self, name: str, worker, pool):
threading.Thread.__init__(self, name=name)
self._worker = worker # can be a Fetcher/Parser/Saver instance
self... | 35.184211 | 130 | 0.583209 | 5,241 | 0.979993 | 0 | 0 | 0 | 0 | 0 | 0 | 1,565 | 0.292633 |
15fb43831ed30c20a10a9d980a0fdb47897df9ba | 30 | py | Python | SampleAIs/Sample_Sophie/__init__.py | YSabarad/monopyly | 0460f2452c83846b6b9e3b234be411e12a86d69c | [
"MIT"
] | 4 | 2015-11-04T21:18:40.000Z | 2020-12-26T21:15:23.000Z | SampleAIs/Sample_Sophie/__init__.py | YSabarad/monopyly | 0460f2452c83846b6b9e3b234be411e12a86d69c | [
"MIT"
] | 2 | 2021-08-09T18:19:58.000Z | 2021-08-10T14:44:54.000Z | SampleAIs/Sample_Sophie/__init__.py | YSabarad/monopyly | 0460f2452c83846b6b9e3b234be411e12a86d69c | [
"MIT"
] | 6 | 2015-08-01T17:54:17.000Z | 2022-02-28T00:00:21.000Z | from .sophie import SophieAI
| 10 | 28 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15fb6a076074eb470434200bde6610f2e5b3ecae | 1,848 | py | Python | develop/tools/import-prep.py | Gautamverma66/pycon | 1ca95727619dbbe82483227e0964402b433131ee | [
"BSD-3-Clause"
] | null | null | null | develop/tools/import-prep.py | Gautamverma66/pycon | 1ca95727619dbbe82483227e0964402b433131ee | [
"BSD-3-Clause"
] | null | null | null | develop/tools/import-prep.py | Gautamverma66/pycon | 1ca95727619dbbe82483227e0964402b433131ee | [
"BSD-3-Clause"
] | 1 | 2020-09-30T18:09:16.000Z | 2020-09-30T18:09:16.000Z | #!/usr/bin/env python2.7
#
# Take various CSV inputs and produce a read-to-import conference schedule.
import pandas as pd
from datetime import date
def main():
dfs = []
t = pd.read_csv('talks.csv')
t['kind_slug'] = 'talk'
t['proposal_id'] = t.pop('proposal')
t['day'] = date(2016, 5, 30) + pd.t... | 28.875 | 75 | 0.566017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 918 | 0.496753 |
15fc22916a07202affa161b6e886fa7702bd9a42 | 2,468 | py | Python | 2020/05/05.py | nhtsai/advent-of-code | d79ec16eb9014acc766805e9d922168aaa2809de | [
"MIT"
] | null | null | null | 2020/05/05.py | nhtsai/advent-of-code | d79ec16eb9014acc766805e9d922168aaa2809de | [
"MIT"
] | null | null | null | 2020/05/05.py | nhtsai/advent-of-code | d79ec16eb9014acc766805e9d922168aaa2809de | [
"MIT"
] | null | null | null | NUM_ROWS = 128
NUM_COLS = 8
"""
Cool solution:
https://github.com/tymofij/advent-of-code-2020/blob/master/05/seats.py
Cool solution using str.translate:
def seat_id(s, t=str.maketrans("FBLR", "0101")):
return int(s.translate(t), 2)
def max_seat_id(boarding_passes):
return max(map(seat_id,... | 25.443299 | 90 | 0.47812 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 754 | 0.305511 |
15fdf4924a3b098bc325a7b35edf84b4ae175290 | 997 | py | Python | utilities/resize_images.py | bmhopkinson/Marsh_Ann | 7d1baaa444392622967dd1ed12f9c7a23c5fb018 | [
"MIT"
] | null | null | null | utilities/resize_images.py | bmhopkinson/Marsh_Ann | 7d1baaa444392622967dd1ed12f9c7a23c5fb018 | [
"MIT"
] | null | null | null | utilities/resize_images.py | bmhopkinson/Marsh_Ann | 7d1baaa444392622967dd1ed12f9c7a23c5fb018 | [
"MIT"
] | null | null | null | import os
import cv2
import numpy as np
import re
path_regex = re.compile('^.+?/(.*)')
def resize_image(im, factor):
row, col, chan = im.shape
col_re = np.rint(col*factor).astype(int)
row_re = np.rint(row*factor).astype(int)
im = cv2.resize(im, (col_re, row_re)) #resize patch
return im
imdir = ... | 27.694444 | 64 | 0.636911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.099298 |
15fe23beb9c7568305a1094a355c8b8ff59b537e | 294 | py | Python | arc/setupc.py | m-schleier/ARC-Alkali-Rydberg-Calculator | eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd | [
"BSD-3-Clause"
] | 53 | 2016-12-13T11:57:07.000Z | 2022-03-23T20:25:36.000Z | arc/setupc.py | m-schleier/ARC-Alkali-Rydberg-Calculator | eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd | [
"BSD-3-Clause"
] | 78 | 2016-12-21T11:56:03.000Z | 2022-03-15T21:01:30.000Z | arc/setupc.py | m-schleier/ARC-Alkali-Rydberg-Calculator | eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd | [
"BSD-3-Clause"
] | 39 | 2016-12-20T07:17:50.000Z | 2022-03-02T17:27:44.000Z | from distutils.core import setup, Extension
from numpy.distutils.misc_util import get_numpy_include_dirs
setup(ext_modules=[Extension("arc_c_extensions", ["arc_c_extensions.c"],
extra_compile_args = ['-Wall', '-O3'],
include_dirs=get_numpy_include_dirs())])
| 42 | 72 | 0.707483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.170068 |
15fe4d22550f5d656a8766cbb160d9cad971c027 | 5,133 | py | Python | load.py | OdysseyScorpio/FactionGist | a3af4b52557890cb9c2cad20a740545917db7ec4 | [
"MIT"
] | 3 | 2019-10-17T08:28:55.000Z | 2020-06-02T15:43:32.000Z | load.py | OdysseyScorpio/FactionGist | a3af4b52557890cb9c2cad20a740545917db7ec4 | [
"MIT"
] | 11 | 2019-10-17T08:32:09.000Z | 2019-10-21T07:14:13.000Z | load.py | OdysseyScorpio/FactionGist | a3af4b52557890cb9c2cad20a740545917db7ec4 | [
"MIT"
] | 3 | 2019-10-17T08:33:51.000Z | 2021-07-05T18:05:38.000Z | import sys
import os
import ttk
import Tkinter as tk
import tkMessageBox
from ttkHyperlinkLabel import HyperlinkLabel
from config import applongname, appversion
import myNotebook as nb
import json
import requests
import zlib
import re
import webbrowser
this = sys.modules[__name__]
this.apiURL = "http://factiongist.her... | 36.147887 | 130 | 0.653029 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,072 | 0.208845 |
15ff229d57bd444a73d08386dd948e890ca375a0 | 12,542 | py | Python | hexa/plugins/connector_s3/models.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 4 | 2021-07-19T12:53:21.000Z | 2022-01-26T17:45:02.000Z | hexa/plugins/connector_s3/models.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 20 | 2021-05-17T12:27:06.000Z | 2022-03-30T11:35:26.000Z | hexa/plugins/connector_s3/models.py | qgerome/openhexa-app | 8c9377b2ad972121d8e9575f5d52420212b52ed4 | [
"MIT"
] | 2 | 2021-09-07T04:19:59.000Z | 2022-02-08T15:33:29.000Z | import os
from logging import getLogger
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.template.defaultfilters import filesizeformat, pluralize
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import gettext_lazy a... | 32.492228 | 112 | 0.603253 | 11,755 | 0.937251 | 0 | 0 | 2,432 | 0.193908 | 0 | 0 | 1,661 | 0.132435 |
15ff677f5997837a0bb374dc2d35fd4c8a6040d2 | 301 | py | Python | Curso de Python Completo e Proficional/Aulas/Aula 28 - Operadores de identidade Python.py | MauriSdL/Programs-in-Python | 79e35bc9488fdd377f161b0faf573b2df765fdb3 | [
"MIT"
] | null | null | null | Curso de Python Completo e Proficional/Aulas/Aula 28 - Operadores de identidade Python.py | MauriSdL/Programs-in-Python | 79e35bc9488fdd377f161b0faf573b2df765fdb3 | [
"MIT"
] | null | null | null | Curso de Python Completo e Proficional/Aulas/Aula 28 - Operadores de identidade Python.py | MauriSdL/Programs-in-Python | 79e35bc9488fdd377f161b0faf573b2df765fdb3 | [
"MIT"
] | null | null | null |
# Operadores de identidade
# serve para compara objetos não somente se eles sao iguais , mas sim se estao no mesmo local de memoria(na mesma variavel)
x = ["apple", "banana"]
y = ["apple", "banana"]
z = x
print(x is z)
print(x is y)
print(x == y)
print(x is not z)
print(x is not y)
print(x != y) | 20.066667 | 123 | 0.667774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.596026 |
c600a7c769c43dfaa68adc940ed5418cbaa4e03b | 121 | py | Python | treasureisland/Parameters.py | idoerg/GenomicIslandPrediction | c50edd0c280efca3fac90674a9695cb763c27e31 | [
"MIT"
] | null | null | null | treasureisland/Parameters.py | idoerg/GenomicIslandPrediction | c50edd0c280efca3fac90674a9695cb763c27e31 | [
"MIT"
] | null | null | null | treasureisland/Parameters.py | idoerg/GenomicIslandPrediction | c50edd0c280efca3fac90674a9695cb763c27e31 | [
"MIT"
] | null | null | null | WINDOW_SIZE = 8000
KMER_SIZE = 6
UPPER_THRESHOLD = 0.75
LOWER_THRESHOLD = 0.5
TUNE_METRIC = 1000
MINIMUM_GI_SIZE = 10000
| 17.285714 | 23 | 0.785124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c6013d78d67df4cefccabade66230bcf85da9cde | 343 | py | Python | ex109/teste.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex109/teste.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex109/teste.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | import moeda
n = float(input('Digite o preço: R$'))
print (f'O dobro de {moeda.moeda(n)} é {moeda.dobro(n, True)}')
print (f'A metade de {moeda.moeda(n)} é {moeda.metade(n, True)}')
print (f'O aumento de 10% de {moeda.moeda(n)} é {moeda.aumento(n, 10, True)}')
print (f'O desconto de 13% de {moeda.moeda(n)} é {moeda.de... | 42.875 | 80 | 0.650146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.801724 |
c60143a70f259a4e959098d87fdd7674fa7e33dc | 1,618 | py | Python | vi/vi/csp/backtrack_search.py | pveierland/permve-ntnu-it3105 | 6a7e4751de47b091c1c9c59560c19a8452698d81 | [
"CC0-1.0"
] | null | null | null | vi/vi/csp/backtrack_search.py | pveierland/permve-ntnu-it3105 | 6a7e4751de47b091c1c9c59560c19a8452698d81 | [
"CC0-1.0"
] | null | null | null | vi/vi/csp/backtrack_search.py | pveierland/permve-ntnu-it3105 | 6a7e4751de47b091c1c9c59560c19a8452698d81 | [
"CC0-1.0"
] | null | null | null | import vi.csp
import collections
import operator
BacktrackStatistics = collections.namedtuple(
'BacktrackStatistics', ['calls', 'failures'])
def backtrack_search(network):
statistics = BacktrackStatistics(calls=0, failures=0)
# Ensure arc consistency before making any assumptions:
return backtrack(vi... | 32.36 | 77 | 0.644623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.082818 |
c601aedeadeb98d2c741f809b0374722d418f823 | 1,377 | py | Python | k_means.py | lgq9220/easy12306 | e31abd1c7675e2acb37f4653ab88cae49d2317cc | [
"Artistic-2.0"
] | null | null | null | k_means.py | lgq9220/easy12306 | e31abd1c7675e2acb37f4653ab88cae49d2317cc | [
"Artistic-2.0"
] | null | null | null | k_means.py | lgq9220/easy12306 | e31abd1c7675e2acb37f4653ab88cae49d2317cc | [
"Artistic-2.0"
] | null | null | null | #! env python
# coding: utf-8
# 功能:对文字部分使用k-means算法进行聚类
import os
import time
import sys
import cv2
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
from sklearn.externals import joblib
def get_img_as_vector(fn):
im = cv2.imread(fn)
im = im[:, :, 0]
retval, dst = cv2.threshold(im,... | 27.54 | 71 | 0.647785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 325 | 0.225851 |
c60244641d848895dbb47d903f04c522a8e5355d | 14,735 | py | Python | datasets/blender_efficient_sm.py | ktiwary2/nerf_pl | 99d40cba3a2d9a11d6988cb1a74cf29035a1ab5e | [
"MIT"
] | null | null | null | datasets/blender_efficient_sm.py | ktiwary2/nerf_pl | 99d40cba3a2d9a11d6988cb1a74cf29035a1ab5e | [
"MIT"
] | null | null | null | datasets/blender_efficient_sm.py | ktiwary2/nerf_pl | 99d40cba3a2d9a11d6988cb1a74cf29035a1ab5e | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
import json
import numpy as np
import os
from PIL import Image, ImageFilter
from torchvision import transforms as T
from models.camera import Camera
from tqdm import tqdm
from .ray_utils import *
class BlenderEfficientShadows(Dataset):
def __init__(self, root_dir,... | 44.651515 | 120 | 0.498812 | 14,487 | 0.983169 | 0 | 0 | 0 | 0 | 0 | 0 | 4,539 | 0.308042 |
c60337a0cc834ad033d09738b410868a1fcb6ef6 | 625 | py | Python | python_submission/5.longest-palindromic-substring.197920566.notac.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python_submission/5.longest-palindromic-substring.197920566.notac.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python_submission/5.longest-palindromic-substring.197920566.notac.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | class Solution(object):
def longestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
if len(s) == 1:
return s
start = 0
end = len(s)
maxlength = 0
longest = ""
while(start < len(s)):
substring = s[start:end]
... | 26.041667 | 75 | 0.4192 | 624 | 0.9984 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.0928 |
c604f6057b5dbbc4327c8b89a1889d99d12111c1 | 10,410 | py | Python | pysnmp/RBN-ICR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/RBN-ICR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/RBN-ICR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module RBN-ICR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-ICR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:44:25 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 131.772152 | 1,175 | 0.747166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,037 | 0.291739 |
c6074a650ad47398b9b59002465392e2c249c2e3 | 14,325 | py | Python | data-preprocess/ice-vision-data-merger-pipeline.py | jingwoo4710/mmdetection-icevision | da82741b29fdd1eb77b4e7483ff2a515d43d1760 | [
"Apache-2.0"
] | 4 | 2020-03-13T00:12:44.000Z | 2021-06-25T07:54:17.000Z | data-preprocess/ice-vision-data-merger-pipeline.py | jingwoo4710/mmdetection-icevision | da82741b29fdd1eb77b4e7483ff2a515d43d1760 | [
"Apache-2.0"
] | 4 | 2020-03-13T00:24:15.000Z | 2022-03-12T00:19:03.000Z | data-preprocess/ice-vision-data-merger-pipeline.py | jingwoo4710/mmdetection-icevision | da82741b29fdd1eb77b4e7483ff2a515d43d1760 | [
"Apache-2.0"
] | 1 | 2021-03-07T06:24:08.000Z | 2021-03-07T06:24:08.000Z | #!/usr/bin/env python
# coding: utf-8
# In[93]:
import os
from shutil import copyfile
import json
print("cwd = ", os.getcwd())
current_folder = os.getcwd()
#extracted_train_data = os.path.join(current_folder, "extracted_train_data")
extracted_train_data = "/dataset/training/"
#annotations_dir = '/data/annotations'... | 35.02445 | 194 | 0.585829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,657 | 0.394904 |
c6093977665e22ed8590c36fa4cf3dd81037f912 | 4,721 | py | Python | second_childwin.py | liwy27/similation_experiment_qt | 20c0b7e9f2777fb828bf5b596985121ef517823a | [
"MIT"
] | null | null | null | second_childwin.py | liwy27/similation_experiment_qt | 20c0b7e9f2777fb828bf5b596985121ef517823a | [
"MIT"
] | null | null | null | second_childwin.py | liwy27/similation_experiment_qt | 20c0b7e9f2777fb828bf5b596985121ef517823a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'second_childwin.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 i... | 42.918182 | 76 | 0.644779 | 4,417 | 0.925026 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.137592 |
c609dcc818d4247b3e931541707e6e65fd9fc433 | 1,683 | py | Python | osu/graph_metadata.py | brandondong/osu-beatmap-generator | 7ca14793ef6a48a65cfd1a564f3b24d940a6051a | [
"MIT"
] | null | null | null | osu/graph_metadata.py | brandondong/osu-beatmap-generator | 7ca14793ef6a48a65cfd1a564f3b24d940a6051a | [
"MIT"
] | 1 | 2021-06-01T23:50:59.000Z | 2021-06-01T23:50:59.000Z | osu/graph_metadata.py | brandondong/osu-beatmap-generator | 7ca14793ef6a48a65cfd1a564f3b24d940a6051a | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
from models import models_util
DIFFICULTY_LABEL = "Star Difficulty"
BPM_LABEL = "BPM"
LENGTH_LABEL = "Length"
CS_LABEL = "Circle Size"
DRAIN_LABEL = "HP Drain"
ACCURACY_LABEL = "Accuracy"
AR_LABEL = "Approach Rate"
SAVE_FOLDER = "visualization/"
def prin... | 28.525424 | 103 | 0.734403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.283422 |
c60b950c7ec0457cb6e2c5b50e37bb91e2cf7ca7 | 2,327 | py | Python | tests/test_zad02.py | TestowanieAutomatyczneUG/laboratorium-12-SzymonWilczewski | 18f0a6c8f5f4c304ef1497907edeb53a470dcf58 | [
"MIT"
] | null | null | null | tests/test_zad02.py | TestowanieAutomatyczneUG/laboratorium-12-SzymonWilczewski | 18f0a6c8f5f4c304ef1497907edeb53a470dcf58 | [
"MIT"
] | null | null | null | tests/test_zad02.py | TestowanieAutomatyczneUG/laboratorium-12-SzymonWilczewski | 18f0a6c8f5f4c304ef1497907edeb53a470dcf58 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import *
from src.zad02.main import Subscriber
class SubscriberTest(unittest.TestCase):
def setUp(self):
self.subscriber = Subscriber()
def test_add_client(self):
self.subscriber.add_client = MagicMock(return_value=["Andrzej"])
self.assertEqual(["An... | 45.627451 | 119 | 0.72067 | 2,241 | 0.963043 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.169746 |
c60bdc534000a18e4fc655a5cff50a94af3d4302 | 2,077 | py | Python | ADE/train.py | BinahHu/ADE-Longtail | 4aabf1cbf50746e610b91362c40cbcb7884dd170 | [
"Apache-2.0"
] | null | null | null | ADE/train.py | BinahHu/ADE-Longtail | 4aabf1cbf50746e610b91362c40cbcb7884dd170 | [
"Apache-2.0"
] | null | null | null | ADE/train.py | BinahHu/ADE-Longtail | 4aabf1cbf50746e610b91362c40cbcb7884dd170 | [
"Apache-2.0"
] | null | null | null | # import some common libraries
# import some common detectron2 utilities
from detectron2.config import get_cfg
from detectron2.data import (
build_detection_test_loader,
build_detection_train_loader,
)
from detectron2.engine import default_argument_parser, default_setup, launch, DefaultTrainer
# import ADE ... | 26.628205 | 107 | 0.703418 | 498 | 0.239769 | 0 | 0 | 463 | 0.222918 | 0 | 0 | 485 | 0.23351 |
c60d16dc84b1f51d0fe6d4f73e98b08bb5beed06 | 146 | py | Python | VacationPy/api_keys.py | jagfinancial/python-api-challenge | 3b15bdd8389dd208efc2fecce6a681ccde54ef6d | [
"ADSL"
] | null | null | null | VacationPy/api_keys.py | jagfinancial/python-api-challenge | 3b15bdd8389dd208efc2fecce6a681ccde54ef6d | [
"ADSL"
] | null | null | null | VacationPy/api_keys.py | jagfinancial/python-api-challenge | 3b15bdd8389dd208efc2fecce6a681ccde54ef6d | [
"ADSL"
] | null | null | null | # OpenWeatherMap API Key
weather_api_key = "3796d9507516315ec2ebdc39473cc6ea"
# Google API Key
g_key = "AIzaSyDQ3DTH86ntlGML7QCVhKWSocZX8Cb4yBA"
| 24.333333 | 52 | 0.842466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.787671 |
c60dde17e3e2f4dd2320cb3a7f244103bed46b66 | 2,411 | py | Python | src/messages.py | Colk-tech/gcpdiscord | b2a43dca8db5a17e6e72f36c7e895db19b836067 | [
"MIT"
] | 4 | 2020-12-31T09:41:09.000Z | 2022-02-20T14:13:41.000Z | src/messages.py | Colk-tech/gcpdiscord | b2a43dca8db5a17e6e72f36c7e895db19b836067 | [
"MIT"
] | 3 | 2020-12-28T18:19:44.000Z | 2021-01-03T14:51:59.000Z | src/messages.py | Colk-tech/gcpdiscord | b2a43dca8db5a17e6e72f36c7e895db19b836067 | [
"MIT"
] | 2 | 2020-12-31T05:42:57.000Z | 2022-03-24T07:54:25.000Z | PERMISSION_DENIED_MESSAGE: str = "***PERMISSION DENIED!*** \n" \
"You are not permitted to use this command. \n" \
"Please contact to your server master. \n."
ERROR_OCCURRED_MESSAGE: str = "***ERROR OCCURRED!*** \n" \
"Error has occu... | 70.911765 | 109 | 0.517628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,365 | 0.566155 |
c60e59d24506527b02637849c4f5442ee5efa5c7 | 4,035 | py | Python | util/SR2SC.py | lorteddie/dcmqi | 4f668745f4f8b2a67e6dcfdee187ac7793e07116 | [
"BSD-3-Clause"
] | null | null | null | util/SR2SC.py | lorteddie/dcmqi | 4f668745f4f8b2a67e6dcfdee187ac7793e07116 | [
"BSD-3-Clause"
] | null | null | null | util/SR2SC.py | lorteddie/dcmqi | 4f668745f4f8b2a67e6dcfdee187ac7793e07116 | [
"BSD-3-Clause"
] | null | null | null | from pydicom.sr import _snomed_dict
import os
import re
import pydicom.sr._snomed_dict
folder = "E:\\work\\QIICR\\dcmqi"
Out_Folder = "E:\\work\\QIICR\\renamed_dcmqi"
def recursive_file_find(address, regexp):
filelist = os.listdir(address)
approvedlist=[]
for filename in filelist:
fullpath = os.p... | 32.28 | 95 | 0.603965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.13829 |
c60ef77ba35cbe6b2d5368873bee63645c0514b7 | 9,417 | py | Python | disentanglement_lib/visualize/visualize_util.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | disentanglement_lib/visualize/visualize_util.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | disentanglement_lib/visualize/visualize_util.py | erow/disentanglement_lib | c875207fdeadc44880277542447544941bc0bd0a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The DisentanglementLib Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 34.119565 | 84 | 0.653818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,224 | 0.236169 |
c60efc48bff6adf1e39c4b9e35874cde0aa11abd | 6,515 | py | Python | Lab/Lab5/lab5_group12_server.py | Zhuoyue-Xing/IOT---INTELLIG-CONNECTED-SYS | 09111380e5ad36663e90de5bcd22691619c9a2f1 | [
"Apache-2.0"
] | 1 | 2020-03-04T21:51:42.000Z | 2020-03-04T21:51:42.000Z | Lab/Lab5/lab5_group12_server.py | Zhuoyue-Xing/IOT---INTELLIG-CONNECTED-SYS | 09111380e5ad36663e90de5bcd22691619c9a2f1 | [
"Apache-2.0"
] | null | null | null | Lab/Lab5/lab5_group12_server.py | Zhuoyue-Xing/IOT---INTELLIG-CONNECTED-SYS | 09111380e5ad36663e90de5bcd22691619c9a2f1 | [
"Apache-2.0"
] | null | null | null | # Created by Chenye Yang, Haokai Zhao, Zhuoyue Xing on 2019/10/13.
# Copyright © 2019 Chenye Yang, Haokai Zhao, Zhuoyue Xing . All rights reserved.
from machine import Pin, I2C, RTC, Timer
import socket
import ssd1306
import time
import network
import urequests
import json
# ESP8266 connects to a router
def ConnectWIF... | 35.601093 | 132 | 0.701765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,629 | 0.556937 |
c60efea748edd359a502e1515888c7b36fe55c0f | 1,397 | py | Python | Util/Validation.py | SkyfallenHQ/CoProvider-Daemon | 57cc2eb44f21c053db39313840c23c754a0143be | [
"MIT"
] | 1 | 2021-03-01T07:43:32.000Z | 2021-03-01T07:43:32.000Z | Util/Validation.py | SkyfallenHQ/CoProvider-Daemon | 57cc2eb44f21c053db39313840c23c754a0143be | [
"MIT"
] | null | null | null | Util/Validation.py | SkyfallenHQ/CoProvider-Daemon | 57cc2eb44f21c053db39313840c23c754a0143be | [
"MIT"
] | null | null | null | # ____ _ __ _ _ #
# / ___|| | ___ _ / _| __ _| | | ___ _ __ #
# \___ \| |/ / | | | |_ / _` | | |/ _ \ '_ \ #
# ___) | <| |_| | _| (_| | | | __/ | | |#
# |____/|_|\_\\__, |_| \__,_|_|_|\___|_| |_|#
# |___/ #########
# ____ ____ ... | 45.064516 | 76 | 0.286328 | 243 | 0.173944 | 0 | 0 | 0 | 0 | 0 | 0 | 1,136 | 0.813171 |
c60fff305331c5af7ece82691a51268226e5c661 | 453 | py | Python | cord19/scripts/metadata/prefixes.py | udel-cbcb/covid19kg_rdf | 3cd8dd6c4654333777db6127f2a3f2e01b92b0ac | [
"CC-BY-4.0"
] | null | null | null | cord19/scripts/metadata/prefixes.py | udel-cbcb/covid19kg_rdf | 3cd8dd6c4654333777db6127f2a3f2e01b92b0ac | [
"CC-BY-4.0"
] | null | null | null | cord19/scripts/metadata/prefixes.py | udel-cbcb/covid19kg_rdf | 3cd8dd6c4654333777db6127f2a3f2e01b92b0ac | [
"CC-BY-4.0"
] | null | null | null | from rdflib import Namespace, XSD
from rdflib.namespace import DC, DCTERMS
FHIRCAT_CORD = Namespace("http://fhircat.org/cord-19/")
SSO = Namespace("http://semanticscholar.org/cv-research/")
DOI = Namespace("https://doi.org/")
PUBMED = Namespace("https://www.ncbi.nlm.nih.gov/pubmed/")
PMC = Namespace("https://www.ncbi.... | 45.3 | 64 | 0.735099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.509934 |
c6111b7e68c98d9dc89d8452745da9d3fb412b2a | 6,568 | py | Python | pbutils/argparsers.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | pbutils/argparsers.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | pbutils/argparsers.py | phonybone/phonybone_utils | d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9 | [
"MIT"
] | null | null | null | import sys
import os
import argparse
from types import MethodType
from importlib import import_module
from argparse import RawTextHelpFormatter # Note: this applies to all options, might not always be what we want...
from pbutils.configs import get_config, get_config_from_data, to_dict, inject_opts, CP
from .strings ... | 34.568421 | 115 | 0.622259 | 1,064 | 0.161998 | 0 | 0 | 0 | 0 | 0 | 0 | 2,527 | 0.384744 |
c612683f9e5f1b8a554762571a5c3752edd3f4c6 | 513 | py | Python | api/management/commands/user_stats.py | kopf/zzzz | eeaebc24c7c2c290e167dcf1a74c18586a3a75a7 | [
"BSD-3-Clause"
] | 10 | 2019-04-16T18:08:55.000Z | 2022-03-17T21:30:47.000Z | api/management/commands/user_stats.py | kopf/zzzz | eeaebc24c7c2c290e167dcf1a74c18586a3a75a7 | [
"BSD-3-Clause"
] | 3 | 2019-04-16T18:26:41.000Z | 2021-06-10T21:22:13.000Z | api/management/commands/user_stats.py | kopf/zzzz | eeaebc24c7c2c290e167dcf1a74c18586a3a75a7 | [
"BSD-3-Clause"
] | 1 | 2021-05-23T07:10:04.000Z | 2021-05-23T07:10:04.000Z | #!/usr/bin/env python3
import json
from django.core.management.base import BaseCommand
from api.models import User
class Command(BaseCommand):
help = 'Print a dict of user status (number of users signed up per day) to stdout'
def handle(self, *args, **options):
stats = {}
for user in User.o... | 27 | 86 | 0.639376 | 393 | 0.766082 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.208577 |
c614a1664f6bdf152a7894bbff6e36ef78258fe0 | 1,234 | py | Python | tests/test_asdf_schema.py | WilliamJamieson/asdf-standard | d0934b2abd95507e5d5f79ed69782d5b6b24eadd | [
"BSD-3-Clause"
] | 47 | 2015-04-21T10:03:44.000Z | 2020-06-16T12:02:35.000Z | tests/test_asdf_schema.py | WilliamJamieson/asdf-standard | d0934b2abd95507e5d5f79ed69782d5b6b24eadd | [
"BSD-3-Clause"
] | 120 | 2015-01-12T23:45:17.000Z | 2020-06-06T17:20:28.000Z | tests/test_asdf_schema.py | WilliamJamieson/asdf-standard | d0934b2abd95507e5d5f79ed69782d5b6b24eadd | [
"BSD-3-Clause"
] | 22 | 2015-04-21T10:14:44.000Z | 2020-06-16T08:55:17.000Z | import pytest
from common import SCHEMAS_PATH, assert_yaml_header_and_footer, load_yaml
from jsonschema import ValidationError
@pytest.mark.parametrize("path", SCHEMAS_PATH.glob("asdf-schema-*.yaml"))
def test_asdf_schema(path):
assert_yaml_header_and_footer(path)
# Asserting no exceptions here
load_yaml... | 33.351351 | 108 | 0.67342 | 0 | 0 | 0 | 0 | 1,101 | 0.89222 | 0 | 0 | 395 | 0.320097 |
c61593afa95fc30a19ca5363d13b5db09015e8fd | 5,552 | py | Python | retinanet/dataloader/label_encoder.py | lchen-wyze/retinanet-tensorflow2.x | 86404a2da6ec636d4b1aef768ac52f018c127798 | [
"Apache-2.0"
] | 36 | 2020-09-23T13:32:47.000Z | 2022-03-29T18:53:58.000Z | retinanet/dataloader/label_encoder.py | lchen-wyze/retinanet-tensorflow2.x | 86404a2da6ec636d4b1aef768ac52f018c127798 | [
"Apache-2.0"
] | 12 | 2020-10-25T09:07:58.000Z | 2021-11-17T12:53:50.000Z | retinanet/dataloader/label_encoder.py | lchen-wyze/retinanet-tensorflow2.x | 86404a2da6ec636d4b1aef768ac52f018c127798 | [
"Apache-2.0"
] | 9 | 2020-11-12T20:03:06.000Z | 2022-01-03T12:40:48.000Z | import tensorflow as tf
from retinanet.dataloader.anchor_generator import AnchorBoxGenerator
from retinanet.dataloader.preprocessing_pipeline import PreprocessingPipeline
from retinanet.dataloader.utils import compute_iou
class LabelEncoder:
def __init__(self, params):
self.input_shape = params.input.inp... | 44.063492 | 79 | 0.608249 | 5,326 | 0.959294 | 0 | 0 | 341 | 0.061419 | 0 | 0 | 158 | 0.028458 |