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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
daa23b88ceb8bf087be4f6e681687b1a4883adc2 | 636 | py | Python | beep_alarm.py | XC-Li/Raspberry_Projects | 48b61832641fea1dcbd24b651266fe767d8cd254 | [
"MIT"
] | null | null | null | beep_alarm.py | XC-Li/Raspberry_Projects | 48b61832641fea1dcbd24b651266fe767d8cd254 | [
"MIT"
] | null | null | null | beep_alarm.py | XC-Li/Raspberry_Projects | 48b61832641fea1dcbd24b651266fe767d8cd254 | [
"MIT"
] | null | null | null | from time import ctime
from time import sleep
from sakshat import SAKSHAT
from sakspins import SAKSPins as Pins
saks = SAKSHAT()
alarm = [2011]
def tact_event_handler(pin, status):
global alarm_run
if pin == Pins.TACT_RIGHT:
print("Stop timer")
alarm_run = False
try:
while ... | 23.555556 | 65 | 0.625786 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.02673 |
daa528c94b1125fa8f5f9603f88f3f3061379760 | 18,429 | py | Python | ntopo/train.py | JonasZehn/ntopo | d3e17ca4cfb1d7a71c4c4f0c965cfcdc67d53fa9 | [
"MIT"
] | 4 | 2021-10-30T15:10:31.000Z | 2021-12-27T08:56:17.000Z | ntopo/train.py | liyuesolo/ntopo-1 | d3e17ca4cfb1d7a71c4c4f0c965cfcdc67d53fa9 | [
"MIT"
] | null | null | null | ntopo/train.py | liyuesolo/ntopo-1 | d3e17ca4cfb1d7a71c4c4f0c965cfcdc67d53fa9 | [
"MIT"
] | 1 | 2022-01-02T13:09:15.000Z | 2022-01-02T13:09:15.000Z |
import os
import time
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from ntopo.monitors import SimulationMonitor
from ntopo.physics import compute_elasticity_energies, compute_opt_energy, compute_volume_penalty
from ntopo.filter import apply_sensitivity_filter
from ntopo.utils import write_to_file... | 44.514493 | 169 | 0.675566 | 0 | 0 | 0 | 0 | 3,204 | 0.173856 | 0 | 0 | 782 | 0.042433 |
daa5d4cc65519f90d470b60fa1a16f721ffb4184 | 8,019 | py | Python | appointment/views.py | aksheus/patient_appointment_system | d718f676e5b20197c8629e9eb9f9a47eb94b3ffe | [
"Apache-2.0"
] | null | null | null | appointment/views.py | aksheus/patient_appointment_system | d718f676e5b20197c8629e9eb9f9a47eb94b3ffe | [
"Apache-2.0"
] | null | null | null | appointment/views.py | aksheus/patient_appointment_system | d718f676e5b20197c8629e9eb9f9a47eb94b3ffe | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse,Http404,HttpResponseRedirect
from appointment.models import Patient,Appointment
from django.template import RequestContext,loader
from django.core.urlresolvers import reverse
from django.utils import timezone
from datetime import... | 41.765625 | 120 | 0.529118 | 7,516 | 0.937274 | 0 | 0 | 0 | 0 | 0 | 0 | 2,209 | 0.275471 |
daa650264ca8e83a7c86604ab68eff2fe2f3357c | 357 | py | Python | casepro/msgs/migrations/0054_auto_20161201_1454.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | 21 | 2015-07-21T15:57:49.000Z | 2021-11-04T18:26:35.000Z | casepro/msgs/migrations/0054_auto_20161201_1454.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | 357 | 2015-05-22T07:26:45.000Z | 2022-03-12T01:08:28.000Z | casepro/msgs/migrations/0054_auto_20161201_1454.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | 24 | 2015-05-28T12:30:25.000Z | 2021-11-19T01:57:38.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-12-01 14:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("msgs", "0053_faq")]
operations = [migrations.AlterField(model_name="outgoing", name="text", fiel... | 27.461538 | 116 | 0.731092 | 199 | 0.557423 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.288515 |
daa71efd1db40a31c64d874f50729bf5397d345d | 1,906 | py | Python | tests/tableTests.py | AlexImmer/WikitablesToTriples | 5d86489483ca32d19fc11c48707b671fb9dbfcb1 | [
"MIT"
] | 3 | 2015-09-10T15:18:53.000Z | 2016-06-18T14:12:36.000Z | tests/tableTests.py | AlexImmer/WikitablesToTriples | 5d86489483ca32d19fc11c48707b671fb9dbfcb1 | [
"MIT"
] | 2 | 2020-05-28T11:08:30.000Z | 2021-03-31T18:40:30.000Z | tests/tableTests.py | AlexImmer/WikitablesToTriples | 5d86489483ca32d19fc11c48707b671fb9dbfcb1 | [
"MIT"
] | 1 | 2020-01-29T09:20:11.000Z | 2020-01-29T09:20:11.000Z | import unittest
from wikitables.table import Table
from testClasses import TestPage
with open ("tests/data/List_of_national_parks_of_the_United_States.html", "r") as html_page:
text = html_page.read().replace('\n', '')
class TestTableInit(unittest.TestCase):
def setUp(self):
self.page = TestPage(tex... | 32.862069 | 109 | 0.675236 | 1,675 | 0.878804 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.157922 |
daa7627c934e5e470f68c42789921d00362402ef | 2,395 | py | Python | terraform-provider-hpam/mock-hpam-server/fake_hpam.py | f-guichard/terraform-provider-examples | cbef217eb82df1f1c8798af2eebc065f2357b1a7 | [
"Apache-2.0"
] | null | null | null | terraform-provider-hpam/mock-hpam-server/fake_hpam.py | f-guichard/terraform-provider-examples | cbef217eb82df1f1c8798af2eebc065f2357b1a7 | [
"Apache-2.0"
] | null | null | null | terraform-provider-hpam/mock-hpam-server/fake_hpam.py | f-guichard/terraform-provider-examples | cbef217eb82df1f1c8798af2eebc065f2357b1a7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
#Othello.java style : single file program
import os
import time
from flask import Flask
from flask import jsonify
from flask import request
# Global variables section
_CREATE_DELAY = 2
PORT = 30026 # Affectation port a updater pour CloudFoundry
CONTROLLER_VERSION = "v1"
_CONTROL... | 24.947917 | 89 | 0.604175 | 0 | 0 | 0 | 0 | 1,055 | 0.440501 | 0 | 0 | 669 | 0.279332 |
daaa7152b73fa0a13aa5df80e0a7b9ce4f28141b | 1,489 | py | Python | setup.py | OpenMindInnovation/quetzal | 3940dfe8e3d2a1060ec89ba4e575365563042bf9 | [
"BSD-3-Clause"
] | null | null | null | setup.py | OpenMindInnovation/quetzal | 3940dfe8e3d2a1060ec89ba4e575365563042bf9 | [
"BSD-3-Clause"
] | null | null | null | setup.py | OpenMindInnovation/quetzal | 3940dfe8e3d2a1060ec89ba4e575365563042bf9 | [
"BSD-3-Clause"
] | null | null | null | # http://flask.pocoo.org/docs/1.0/patterns/packages/
from setuptools import setup, find_packages
import versioneer
authors = [
('David Ojeda', 'david@dojeda.com'),
]
author_names = ', '.join(tup[0] for tup in authors)
author_emails = ', '.join(tup[1] for tup in authors)
setup(
name='quetzal',
packages=... | 25.672414 | 68 | 0.577569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.44728 |
daad3d4644a92884bdcd19bcc887b15d6229fc69 | 849 | py | Python | mundo3-EstruturasCompostas/102-funcaoFatorial.py | jonasht/CursoEmVideo-CursoDePython3 | a1bbf1fe4226b1828213742ee5a440278d903fd1 | [
"MIT"
] | null | null | null | mundo3-EstruturasCompostas/102-funcaoFatorial.py | jonasht/CursoEmVideo-CursoDePython3 | a1bbf1fe4226b1828213742ee5a440278d903fd1 | [
"MIT"
] | null | null | null | mundo3-EstruturasCompostas/102-funcaoFatorial.py | jonasht/CursoEmVideo-CursoDePython3 | a1bbf1fe4226b1828213742ee5a440278d903fd1 | [
"MIT"
] | null | null | null | #Exercício Python 102:
# Crie um programa que tenha uma função fatorial()
# que receba dois parâmetros:
# o primeiro que indique o número a calcular e
# outro chamado show, que será um valor lógico (opcional)
# indicando se será mostrado ou não na tela o processo de
# cálculo do fatorial.
def fatorial(n, show=False)... | 28.3 | 61 | 0.632509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.616279 |
daadc2cf5cec9fff6add080dc7c4dc6375da7cf0 | 3,732 | py | Python | ergasia4tel.py | nantinkpsl/Ergasies.python | 160c8367a87903f6b444323f117351822bd62aa3 | [
"CC0-1.0"
] | null | null | null | ergasia4tel.py | nantinkpsl/Ergasies.python | 160c8367a87903f6b444323f117351822bd62aa3 | [
"CC0-1.0"
] | null | null | null | ergasia4tel.py | nantinkpsl/Ergasies.python | 160c8367a87903f6b444323f117351822bd62aa3 | [
"CC0-1.0"
] | null | null | null | f = open("two_cities_ascii.txt", "r")#Άνοιγμα αρχείου για διάβασμα
text=f.read()#Εκχώρηση του περιεχόμενου του αρχείου στηνν μεταβλητή text ως string
f.close()#Κλείσιμο του αρχείου
L = []#Δημιουργία κενής λίστας με σκοπό να βάλουμε ΄όλες τις λέξεις χωρίς τα σύμβολα
"""Καθάρισμα του κειμένου από όλους τους χαρακ... | 27.850746 | 270 | 0.521704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,662 | 0.389136 |
daae9df32d246183515db8e74d555c8793c010e1 | 488 | py | Python | shop/migrations/0014_auto_20200120_2035.py | rafkolacz/PodajLape | be7358ffa6c6e5e6f6fe4bc7ada46f0d7df055d6 | [
"PostgreSQL"
] | null | null | null | shop/migrations/0014_auto_20200120_2035.py | rafkolacz/PodajLape | be7358ffa6c6e5e6f6fe4bc7ada46f0d7df055d6 | [
"PostgreSQL"
] | null | null | null | shop/migrations/0014_auto_20200120_2035.py | rafkolacz/PodajLape | be7358ffa6c6e5e6f6fe4bc7ada46f0d7df055d6 | [
"PostgreSQL"
] | null | null | null | # Generated by Django 3.0.1 on 2020-01-20 19:35
from django.db import migrations, models
import shop.models
class Migration(migrations.Migration):
dependencies = [
('shop', '0013_auto_20200120_1949'),
]
operations = [
migrations.AlterField(
model_name='product',
... | 24.4 | 136 | 0.639344 | 376 | 0.770492 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.252049 |
daaeb5f227baa564bbc4e4ee7a2ab88b1d145fb1 | 416 | py | Python | users/migrations/0007_alter_starred_concerts_id.py | MorganRoberts00/MyConcerts | 650185a8421d52d052763fbf03ec046583863632 | [
"MIT"
] | 1 | 2022-01-12T23:08:39.000Z | 2022-01-12T23:08:39.000Z | users/migrations/0007_alter_starred_concerts_id.py | Zachhi/MyConcerts | 650185a8421d52d052763fbf03ec046583863632 | [
"MIT"
] | null | null | null | users/migrations/0007_alter_starred_concerts_id.py | Zachhi/MyConcerts | 650185a8421d52d052763fbf03ec046583863632 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-01 16:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0006_auto_20211117_2144'),
]
operations = [
migrations.AlterField(
model_name='starred_concerts',
name='id'... | 21.894737 | 76 | 0.620192 | 323 | 0.776442 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.242788 |
daaeeb623720fda94eff96a09b813f98fd47e55e | 4,048 | py | Python | facebook_data_analysis/conversation_analysis/friends_network.py | Anogio/facebook_data_analysis | a43a64bf4892e8bb705a96805912f726f194f319 | [
"MIT"
] | null | null | null | facebook_data_analysis/conversation_analysis/friends_network.py | Anogio/facebook_data_analysis | a43a64bf4892e8bb705a96805912f726f194f319 | [
"MIT"
] | null | null | null | facebook_data_analysis/conversation_analysis/friends_network.py | Anogio/facebook_data_analysis | a43a64bf4892e8bb705a96805912f726f194f319 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import networkx as nx
import pandas as pd
from facebook_data_analysis.conversation_analysis.activity_graphs import save_graph
from facebook_data_analysis.global_vars import messages_cols
from facebook_data_analysis.tools.helpers import cached
from sklearn.manifold import MDS
from tqdm im... | 38.552381 | 87 | 0.704298 | 0 | 0 | 0 | 0 | 3,706 | 0.915514 | 0 | 0 | 294 | 0.072628 |
daaf9ad2bbd982879bb0f1d6c500eb2886d1827f | 18,405 | py | Python | sdk/python/pulumi_buildkite/team.py | grapl-security/pulumi-buildkite | f801ecb661d82da6b939b13f5520038e3b6e891f | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_buildkite/team.py | grapl-security/pulumi-buildkite | f801ecb661d82da6b939b13f5520038e3b6e891f | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_buildkite/team.py | grapl-security/pulumi-buildkite | f801ecb661d82da6b939b13f5520038e3b6e891f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 38.34375 | 134 | 0.629394 | 17,995 | 0.977723 | 0 | 0 | 15,270 | 0.829666 | 0 | 0 | 7,135 | 0.387666 |
dab0e6323421a3aea4c254b4a72550f557156f41 | 56 | py | Python | myself.py | febycloud/PROG8420 | 147b4877a33221b93c9a74f90819c397179f7332 | [
"MIT"
] | null | null | null | myself.py | febycloud/PROG8420 | 147b4877a33221b93c9a74f90819c397179f7332 | [
"MIT"
] | null | null | null | myself.py | febycloud/PROG8420 | 147b4877a33221b93c9a74f90819c397179f7332 | [
"MIT"
] | null | null | null | import sample
print('what is your name')
print(sample.d) | 18.666667 | 26 | 0.767857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.339286 |
dab0f9b97d8498de478ba17e126e3ab6a3a5d932 | 3,739 | py | Python | profiles_api/migrations/0002_category_course_image_instructor_review_video.py | MohamedAboubasha/profiles-rest-api | 0e5ede6b4771396c9f3399d05be06c19b9ac1530 | [
"MIT"
] | null | null | null | profiles_api/migrations/0002_category_course_image_instructor_review_video.py | MohamedAboubasha/profiles-rest-api | 0e5ede6b4771396c9f3399d05be06c19b9ac1530 | [
"MIT"
] | null | null | null | profiles_api/migrations/0002_category_course_image_instructor_review_video.py | MohamedAboubasha/profiles-rest-api | 0e5ede6b4771396c9f3399d05be06c19b9ac1530 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2022-01-08 21:51
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles_api', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 47.935897 | 133 | 0.581171 | 3,582 | 0.95801 | 0 | 0 | 0 | 0 | 0 | 0 | 679 | 0.181599 |
dab15481ef318e82c0705f93a221be1485c98088 | 616 | py | Python | src/backends/python/flask/core/repos.py | ferlikh/many-backends | 933b94e13e368b9d73936e006f26d33aec7212b7 | [
"MIT"
] | null | null | null | src/backends/python/flask/core/repos.py | ferlikh/many-backends | 933b94e13e368b9d73936e006f26d33aec7212b7 | [
"MIT"
] | null | null | null | src/backends/python/flask/core/repos.py | ferlikh/many-backends | 933b94e13e368b9d73936e006f26d33aec7212b7 | [
"MIT"
] | null | null | null | from core import (
config, db
)
class Repo():
def __init__(self, table):
self.table = table
def create_one(self, model):
return db.create_one(self.table, model)
def update_one(self, model):
return db.update_one(self.table, model)
def delete_one(self, id):
return db.d... | 30.8 | 65 | 0.660714 | 511 | 0.829545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dab23516379326ead1d968570c74ed69eecbf055 | 2,863 | py | Python | frictionless/settings.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 247 | 2020-08-04T16:42:09.000Z | 2022-03-30T11:54:54.000Z | frictionless/settings.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 444 | 2020-07-29T09:13:59.000Z | 2022-03-31T14:54:57.000Z | frictionless/settings.py | Grandient/frictionless-py | 8c41b96f2047d573702fe7b34ff7ffbd32c3d815 | [
"MIT"
] | 60 | 2020-09-04T11:39:34.000Z | 2022-03-23T18:59:51.000Z | import os
import json
import gzip
import zipfile
# Helpers
def read_asset(*paths):
dirname = os.path.dirname(__file__)
with open(os.path.join(dirname, "assets", *paths)) as file:
return file.read().strip()
# General
UNDEFINED = object()
VERSION = read_asset("VERSION")
COMPRESSION_FORMATS = ["zip... | 29.515464 | 89 | 0.71219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 888 | 0.310164 |
dab536d1d9d21df99c2db8bf403753c5070c87f7 | 4,747 | py | Python | A_gen_literal_po.py | Dharma-Sagar/tx-template | 93a3005445a21a249107e01c446c9237e886de8e | [
"Apache-2.0"
] | null | null | null | A_gen_literal_po.py | Dharma-Sagar/tx-template | 93a3005445a21a249107e01c446c9237e886de8e | [
"Apache-2.0"
] | null | null | null | A_gen_literal_po.py | Dharma-Sagar/tx-template | 93a3005445a21a249107e01c446c9237e886de8e | [
"Apache-2.0"
] | 1 | 2022-03-25T15:25:00.000Z | 2022-03-25T15:25:00.000Z | from pathlib import Path
import re
import sys
from uuid import uuid4
import polib
from antx import transfer
from botok import Text
class Po:
def __init__(self):
self.transfer = Transfer()
self.file = polib.POFile()
self.file.metadata = {
'MIME-Version': '1.0',
'Cont... | 31.026144 | 97 | 0.540552 | 4,251 | 0.888773 | 0 | 0 | 722 | 0.150951 | 0 | 0 | 882 | 0.184403 |
dab78841b63bd54072dd390557aad814bcd2c522 | 2,845 | py | Python | cvm/tests/test_trec.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 6 | 2019-07-04T09:42:53.000Z | 2021-12-28T13:19:48.000Z | cvm/tests/test_trec.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | 4 | 2019-06-27T08:05:18.000Z | 2021-09-09T18:59:11.000Z | cvm/tests/test_trec.py | CortexFoundation/tvm-cvm | d8941dc60a51dd27a6d2accc1eff2eced3b3640d | [
"Apache-2.0"
] | null | null | null | import gluon_zoo as gz
import mxnet as mx
from mxnet import ndarray as nd
from mxnet import gluon
import tvm
from tvm.contrib import graph_runtime
import nnvm
import pickle
import sym_pass as spass
import dataset as ds
import sym_calib as calib
import sim_quant_helper as sim
import ops_generator as opg
import utils
im... | 30.265957 | 83 | 0.693497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.14833 |
dab7892075e86447b7eb58c074c9b44136134f5d | 9,856 | py | Python | public/scripts/node_process_scripts/vamps_script_parse.py | avoorhis/vamps-node.js | 7071da6e569a669a06a6d21c23cc9c667ec49250 | [
"MIT"
] | 1 | 2015-10-28T14:48:38.000Z | 2015-10-28T14:48:38.000Z | public/scripts/node_process_scripts/vamps_script_parse.py | avoorhis/vamps-node.js | 7071da6e569a669a06a6d21c23cc9c667ec49250 | [
"MIT"
] | 48 | 2015-10-23T16:02:14.000Z | 2022-02-15T00:46:39.000Z | public/scripts/node_process_scripts/vamps_script_parse.py | avoorhis/vamps-node.js | 7071da6e569a669a06a6d21c23cc9c667ec49250 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011, Marine Biological Laboratory
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your o... | 32.104235 | 138 | 0.542106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,849 | 0.491985 |
dab7ff6f7d5580767751c098903a37a2703ecd3c | 468 | py | Python | Google It-Cert-Automation/f-Automating-Real-World-Tasks-with-Python/W1/os_walk_three_genx_fail.py | JAL-code/google | 3989af94bb72b6fabde95ed50bac1493640d4cf6 | [
"MIT"
] | null | null | null | Google It-Cert-Automation/f-Automating-Real-World-Tasks-with-Python/W1/os_walk_three_genx_fail.py | JAL-code/google | 3989af94bb72b6fabde95ed50bac1493640d4cf6 | [
"MIT"
] | null | null | null | Google It-Cert-Automation/f-Automating-Real-World-Tasks-with-Python/W1/os_walk_three_genx_fail.py | JAL-code/google | 3989af94bb72b6fabde95ed50bac1493640d4cf6 | [
"MIT"
] | null | null | null | import os
import os.path
def get_location_for_code():
# :releative location
access_area = '/home/joseph/Desktop'
# access_area = os.getcwd()
return access_area
def select_case():
case = 4
return case
home_address = get_location_for_code()
case = select_case()
os.walk(home_address).next()[0] ... | 23.4 | 81 | 0.707265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.324786 |
dab8d7a585af5b87de622c04d5bf382bd3e38332 | 2,755 | py | Python | tests/test_cliently.py | elcaceres/cliently | 5bb03f9c4c1dcd59d17c2bcb830a501a7215aca8 | [
"MIT"
] | null | null | null | tests/test_cliently.py | elcaceres/cliently | 5bb03f9c4c1dcd59d17c2bcb830a501a7215aca8 | [
"MIT"
] | 3 | 2018-04-04T18:55:16.000Z | 2018-04-04T18:57:09.000Z | tests/test_cliently.py | elcaceres/cliently | 5bb03f9c4c1dcd59d17c2bcb830a501a7215aca8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `cliently` package."""
import unittest
from cliently import client
import os
# TODO: This hard coding needs to be fixed with a sandbox when doing things for realsies
ACCESS_TOKEN=os.getenv("FEEDLY_ACCESS_TOKEN")
UID = os.getenv("FEEDLY_UID")
BASE_URL = "http... | 39.927536 | 124 | 0.692922 | 2,265 | 0.822142 | 0 | 0 | 0 | 0 | 0 | 0 | 828 | 0.300544 |
dab962fd7005a682b3d02a7ad6700beb39520d3f | 3,907 | py | Python | pyArango/validation.py | NeilduToit13/pyArango | 75a883c073ee9b00ff4754139b823dd0df498036 | [
"Apache-2.0"
] | null | null | null | pyArango/validation.py | NeilduToit13/pyArango | 75a883c073ee9b00ff4754139b823dd0df498036 | [
"Apache-2.0"
] | null | null | null | pyArango/validation.py | NeilduToit13/pyArango | 75a883c073ee9b00ff4754139b823dd0df498036 | [
"Apache-2.0"
] | null | null | null | from .theExceptions import ValidationError
class Validator(object):
"""
All validators must inherit from this class
"""
def __init__(self, *args, **kwrags):
pass
def validate(self, value):
"""
The only function that a validator must implement.
Must return True if er... | 28.940741 | 131 | 0.600973 | 3,837 | 0.982083 | 0 | 0 | 0 | 0 | 0 | 0 | 1,240 | 0.317379 |
dab9da99251eb13cbf19a332bec3cc7115eec8f3 | 859 | py | Python | yahoo_nsfw.py | m0r13/tensorflow-open_nsfw | 35da5a6eb71ad5490b25ad433cfee02986f123eb | [
"BSD-2-Clause"
] | null | null | null | yahoo_nsfw.py | m0r13/tensorflow-open_nsfw | 35da5a6eb71ad5490b25ad433cfee02986f123eb | [
"BSD-2-Clause"
] | null | null | null | yahoo_nsfw.py | m0r13/tensorflow-open_nsfw | 35da5a6eb71ad5490b25ad433cfee02986f123eb | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import tensorflow as tf
from image_utils import create_raw_image_loader
from model import OpenNsfwModel, InputType
class YahooNSFWClassifier:
def __init__(self, weights_path):
self.session = tf.Session()
self.model = OpenNsfwModel()
self.model.build(weights... | 33.038462 | 99 | 0.718277 | 506 | 0.589057 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.087311 |
dabd1be8c1b91392a0032b7379bdd13519e05e0b | 4,823 | py | Python | crazyflie-lib-python/cflib/crazyflie/localization.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | crazyflie-lib-python/cflib/crazyflie/localization.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | crazyflie-lib-python/cflib/crazyflie/localization.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | 33.262069 | 79 | 0.609579 | 3,120 | 0.6469 | 0 | 0 | 0 | 0 | 0 | 0 | 2,217 | 0.459672 |
dabfe56a60fe696acd94d21ad2b11875bcc6001b | 1,396 | py | Python | uibcdf_stdlib/exceptions.py | uibcdf/UIBCDF-Standard-Library | 16665d12d94c8d82b17356f79795d3741cc86324 | [
"MIT"
] | 1 | 2021-07-06T18:51:45.000Z | 2021-07-06T18:51:45.000Z | uibcdf_stdlib/exceptions.py | dprada/UIBCDF-Standard-Library | 96906e631623ff8de59bd5e15fe25d87a9d2a4f4 | [
"MIT"
] | null | null | null | uibcdf_stdlib/exceptions.py | dprada/UIBCDF-Standard-Library | 96906e631623ff8de59bd5e15fe25d87a9d2a4f4 | [
"MIT"
] | 1 | 2021-07-06T18:51:48.000Z | 2021-07-06T18:51:48.000Z | class BadCallError(ValueError):
def __init__(self, message=None, documentation_web=None):
if message is None:
message = ('Wrong way of invoking this method. Check the online documentation for'
'more information.')
if documentation_web is not None:
... | 31.022222 | 96 | 0.637536 | 1,387 | 0.993553 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.237106 |
dac5823dc3e2b862d786e19df82399b8a50a961d | 2,757 | py | Python | feature-detection.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 7 | 2021-07-08T14:57:22.000Z | 2022-01-12T09:15:01.000Z | feature-detection.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 1 | 2021-08-18T20:15:44.000Z | 2022-02-04T18:04:39.000Z | feature-detection.py | ronheywood/opencv | 664de6f5b3708af6c00348a31a37db484137bb8d | [
"MIT"
] | 2 | 2021-10-14T18:40:26.000Z | 2022-01-10T00:36:29.000Z | # import the necessary packages
import cv2
import sys
import os
import numpy as np
import argparse
sys.path.append(os.path.abspath('./modules/'))
import detection
import helpers
ap = argparse.ArgumentParser()
ap.add_argument("-d", "--debug", type=bool, default=False,
help="experiment with different image filters")... | 32.05814 | 122 | 0.629307 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.145811 |
dac5b2ff80767ae00c126aba31c2851cfe3769ef | 7,538 | py | Python | loopy/execution.py | xywei/loopy | f176bc70ef52862ee0dfcc661fbe4b86b1726f55 | [
"MIT"
] | null | null | null | loopy/execution.py | xywei/loopy | f176bc70ef52862ee0dfcc661fbe4b86b1726f55 | [
"MIT"
] | null | null | null | loopy/execution.py | xywei/loopy | f176bc70ef52862ee0dfcc661fbe4b86b1726f55 | [
"MIT"
] | null | null | null | from __future__ import division, with_statement, absolute_import
__copyright__ = "Copyright (C) 2012-16 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software withou... | 32.076596 | 79 | 0.648183 | 5,791 | 0.768241 | 0 | 0 | 620 | 0.08225 | 0 | 0 | 2,135 | 0.283232 |
dac7f27abecc653f42dd61c7ee788bece9231835 | 3,419 | py | Python | rebound/python_examples/megno_interactive/problem.py | rodluger/ttv-devil | e534e4f3cd75db951cba54441f7a5458c87e0cf9 | [
"MIT"
] | null | null | null | rebound/python_examples/megno_interactive/problem.py | rodluger/ttv-devil | e534e4f3cd75db951cba54441f7a5458c87e0cf9 | [
"MIT"
] | null | null | null | rebound/python_examples/megno_interactive/problem.py | rodluger/ttv-devil | e534e4f3cd75db951cba54441f7a5458c87e0cf9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import rebound
from rebound.interruptible_pool import InterruptiblePool
# Import other modules
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
from matplotlib.colors import LogNorm
# Runs one simulation.
def simulation(par):
saturn_a, saturn_e = par
sim = rebound.Simulation()
... | 31.953271 | 162 | 0.64434 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 876 | 0.256215 |
dac8c3ed489595ae8af03592386194327a0affcc | 257 | py | Python | Exercicios/Ex23.py | angeloridolfi/Python-CEV | fd11b7ea0725f83c84336b99304c50f183514245 | [
"MIT"
] | null | null | null | Exercicios/Ex23.py | angeloridolfi/Python-CEV | fd11b7ea0725f83c84336b99304c50f183514245 | [
"MIT"
] | null | null | null | Exercicios/Ex23.py | angeloridolfi/Python-CEV | fd11b7ea0725f83c84336b99304c50f183514245 | [
"MIT"
] | null | null | null | num = int(input('Digite um número de 0 a 9999:\n'))
u = num // 1 % 10
d = num // 10 % 10
c = num // 100 % 100
m = num // 1000 % 1000
print(f'Analisando o número {num}')
print(f'Unidade:{u}')
print(f'Dezena:{d}')
print(f'Centena:{c}')
print(f'Milhar:{m}')
| 19.769231 | 51 | 0.587549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.451737 |
dacba558be9c5556dc97deb7330b68ccc601680a | 167 | py | Python | Diena_13_Visualization/random/miss_num.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 8 | 2020-08-31T16:10:54.000Z | 2021-11-24T06:37:37.000Z | Diena_13_Visualization/random/miss_num.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 8 | 2021-06-08T22:30:29.000Z | 2022-03-12T00:48:55.000Z | Diena_13_Visualization/random/miss_num.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 12 | 2020-09-28T17:06:52.000Z | 2022-02-17T12:12:46.000Z | import random
nums = [str(n)+"\n" for n in range(1, 51)]
random.shuffle(nums)
print(nums)
nums.pop()
with open("missing_number.txt", "w") as f:
f.writelines(nums)
| 20.875 | 42 | 0.670659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.161677 |
dacc0afe8e6fcaa1fdee48ff089bcf82ca383f60 | 1,926 | py | Python | code/eval_tsd.py | YJiangcm/COMP_5222_Project | 18afd92af6f38c9410d711fa9448b7a03507e0ac | [
"Apache-2.0"
] | null | null | null | code/eval_tsd.py | YJiangcm/COMP_5222_Project | 18afd92af6f38c9410d711fa9448b7a03507e0ac | [
"Apache-2.0"
] | null | null | null | code/eval_tsd.py | YJiangcm/COMP_5222_Project | 18afd92af6f38c9410d711fa9448b7a03507e0ac | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import sys
import argparse
def f1(predictions, gold):
"""
F1 (a.k.a. DICE) operating on two lists of offsets (e.g., character).
>>> assert f1([0, 1, 4, 5], [0, 1, 6]) == 0.5714285714285714
:param predictions: a list of predicted offsets
:param gold:... | 28.746269 | 94 | 0.600727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.331776 |
daccefc813bcf6533f739ab7e77855039705a38d | 1,963 | py | Python | Trie/634.Word Squares/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | Trie/634.Word Squares/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | Trie/634.Word Squares/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | class TrieNode:
def __init__(self):
self.children = {}
self.is_word = False
self.word_list = []
class Trie:
def __init__(self):
self.root = TrieNode()
def add(self, word):
node = self.root
for ch in word:
if ch not in node.children:
... | 24.848101 | 77 | 0.538971 | 1,956 | 0.996434 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.068263 |
dace81c02ecfe88dcde9a79af889af15ed3ee59f | 63 | py | Python | pyschism/io/__init__.py | pmav99/pyschism | b533d29b881da6cd4f408e91a4749f86451c042a | [
"Apache-2.0"
] | null | null | null | pyschism/io/__init__.py | pmav99/pyschism | b533d29b881da6cd4f408e91a4749f86451c042a | [
"Apache-2.0"
] | null | null | null | pyschism/io/__init__.py | pmav99/pyschism | b533d29b881da6cd4f408e91a4749f86451c042a | [
"Apache-2.0"
] | null | null | null | from pyschism.io.bctides import Bctides
__all__ = ['Bctides']
| 15.75 | 39 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.142857 |
dacf5473b855ccb8326cf4f486426fd5801c552b | 83 | py | Python | run_bot.py | minproton/ReVot | 077457a66fb476cf11622ee9ff29494695a84fc6 | [
"Unlicense"
] | 3 | 2020-10-06T16:34:15.000Z | 2021-04-17T18:10:33.000Z | run_bot.py | minproton/ReVot | 077457a66fb476cf11622ee9ff29494695a84fc6 | [
"Unlicense"
] | 1 | 2020-10-18T07:41:00.000Z | 2020-10-18T07:43:04.000Z | run_bot.py | minproton/ReVot | 077457a66fb476cf11622ee9ff29494695a84fc6 | [
"Unlicense"
] | 3 | 2020-10-18T07:38:52.000Z | 2021-10-03T17:00:41.000Z | from reverse_image_search_bot import bot
if __name__ == '__main__':
bot.main()
| 20.75 | 40 | 0.746988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.120482 |
dad0c47ce0d0ea8d56dcd1c6ed410b390c57cb8f | 1,444 | py | Python | notebooks/PyTorch/tutorial_deep_learning_with_pytorch_a_60_minute_blitz_training_a_classifier_CIFAR-10/training.py | shitake/ml-sandbox | a23a312251d82b27582df0029c23ff4aa7792d4c | [
"MIT"
] | null | null | null | notebooks/PyTorch/tutorial_deep_learning_with_pytorch_a_60_minute_blitz_training_a_classifier_CIFAR-10/training.py | shitake/ml-sandbox | a23a312251d82b27582df0029c23ff4aa7792d4c | [
"MIT"
] | 1 | 2018-11-01T03:09:50.000Z | 2018-11-01T03:09:50.000Z | notebooks/PyTorch/tutorial_deep_learning_with_pytorch_a_60_minute_blitz_training_a_classifier_CIFAR-10/training.py | shitake/ml-sandbox | a23a312251d82b27582df0029c23ff4aa7792d4c | [
"MIT"
] | null | null | null | from net import Net
import os
import sys
import time
import torch.optim as optim
print(os.getcwd())
sys.path.append(os.getcwd())
# from ml-sandbox.src.utils.utils import display_formatted_time
import gc
del Training; gc.collect()
class Training:
def __init__(self, dev):
self.device = dev
def train... | 27.245283 | 96 | 0.585873 | 1,209 | 0.837258 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.092105 |
dad20c62d339443c7b2314dec5e7926d16864103 | 751 | py | Python | tools/gen_flask_secret.py | DVC-Viking-Robotics/webapp | 39a13a86b46973328bd664308c6a3fa375629adc | [
"MIT"
] | 6 | 2019-03-27T19:26:32.000Z | 2019-10-14T09:17:28.000Z | tools/gen_flask_secret.py | DVC-Viking-Robotics/webapp | 39a13a86b46973328bd664308c6a3fa375629adc | [
"MIT"
] | 54 | 2019-02-24T12:38:52.000Z | 2019-11-17T09:28:40.000Z | tools/gen_flask_secret.py | DVC-Viking-Robotics/webapp | 39a13a86b46973328bd664308c6a3fa375629adc | [
"MIT"
] | 12 | 2019-03-24T23:10:24.000Z | 2019-12-07T02:48:32.000Z | """
This script allows the admin to generate a new Fernet key file and re-encrypt
any '.encrypted' file, should the old key file be compromised.
Run it with ``python -m tools.gen_flask_secret``
"""
import os
from webapp.utils.file_encryption import FernetVault
from webapp.constants import SECRET_KEYFILE, FLASK_SECRET... | 34.136364 | 110 | 0.750999 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.44474 |
dad29b783a0cff6154b9ddd5bbb2a707070f8ace | 1,321 | py | Python | metricol/outputs/statsite.py | soutys/metricol | 56b96e80aab8a61727b48eb2f5f19e0694895b55 | [
"MIT"
] | null | null | null | metricol/outputs/statsite.py | soutys/metricol | 56b96e80aab8a61727b48eb2f5f19e0694895b55 | [
"MIT"
] | null | null | null | metricol/outputs/statsite.py | soutys/metricol | 56b96e80aab8a61727b48eb2f5f19e0694895b55 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Graphite output plugins module
'''
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
with_statement,
)
import logging
from queue import Empty
from statsd.client import StatsClient
from metricol.inputs import MetricInput
from metrico... | 24.462963 | 79 | 0.613929 | 932 | 0.705526 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.087812 |
dad77c6e4ccbfc91bf868ef8fb393b299a2ec072 | 30 | py | Python | main.py | jsjhcccn/qqbot | 90505ae42a5b2c3a74b85c7bc98b597373aa6b6b | [
"MIT"
] | 4,253 | 2016-07-30T11:54:14.000Z | 2022-03-17T15:40:29.000Z | main.py | MidKateIsOP520/qqbot | c5f53c31062ad5c6e70555b9bf0479488339ecbe | [
"MIT"
] | 375 | 2016-08-05T02:07:19.000Z | 2020-08-03T01:29:32.000Z | main.py | MidKateIsOP520/qqbot | c5f53c31062ad5c6e70555b9bf0479488339ecbe | [
"MIT"
] | 1,183 | 2016-07-31T01:37:43.000Z | 2022-03-13T13:18:04.000Z | from qqbot import Main; Main() | 30 | 30 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dad80e149a334d4d98779bd5f03ddaee09b35f0c | 5,300 | py | Python | quotes_generate_attribute.py | russDA/Quotes_Predictor | 6c22f141a468b304c1a5d76e43165d6f42d4e3cf | [
"MIT"
] | null | null | null | quotes_generate_attribute.py | russDA/Quotes_Predictor | 6c22f141a468b304c1a5d76e43165d6f42d4e3cf | [
"MIT"
] | null | null | null | quotes_generate_attribute.py | russDA/Quotes_Predictor | 6c22f141a468b304c1a5d76e43165d6f42d4e3cf | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import pandas as pd
import numpy as np
def url_list(base_url, no_of_pages):
nos = np.linspace(1, no_of_pages, no_of_pages)
pages = []
for n in nos:
page = base_url+str(int(n))
pages.append(page)
return pages
def quote_lis... | 29.943503 | 88 | 0.508113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,682 | 0.505847 |
dad8ed0484b8958b3b31e0149f5e4b0720f01f84 | 791 | py | Python | tap_tally/__init__.py | bkgreve/tap-tally | 207c64b821024003859713624034c531969f0456 | [
"MIT"
] | 1 | 2021-02-12T23:22:38.000Z | 2021-02-12T23:22:38.000Z | tap_tally/__init__.py | bkgreve/tap-tally | 207c64b821024003859713624034c531969f0456 | [
"MIT"
] | 3 | 2020-09-10T11:13:17.000Z | 2020-09-10T11:19:06.000Z | tap_tally/__init__.py | bkgreve/tap-tally | 207c64b821024003859713624034c531969f0456 | [
"MIT"
] | null | null | null | import os
import json
from flask import Flask
app = Flask(__name__)
@app.route('/api/entries')
def get_tap_entries():
with open('/usr/src/app/data/beers.json') as f:
beer_data = json.load(f)
entries = []
for entry in beer_data:
if entry.get('visible', False):
image_name = ent... | 22.6 | 87 | 0.549937 | 0 | 0 | 0 | 0 | 715 | 0.903919 | 0 | 0 | 176 | 0.222503 |
dad97463770df090d4e73a80e6339dec1808753d | 4,133 | py | Python | DatabaseGeneration_database4_question5.py | wangpinggl/covidQA | f8b440ee27058cc1030af7cd57178ddf987462d0 | [
"MIT"
] | null | null | null | DatabaseGeneration_database4_question5.py | wangpinggl/covidQA | f8b440ee27058cc1030af7cd57178ddf987462d0 | [
"MIT"
] | null | null | null | DatabaseGeneration_database4_question5.py | wangpinggl/covidQA | f8b440ee27058cc1030af7cd57178ddf987462d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 05:31:09 2020
@author: Srikar Balusu
"""
import json
import pandas as pd
import numpy as np
import re
import random
import sqlite3
import datetime
import calendar
from dateutil.relativedelta import *
with open('lookup1.json') as json_file:
data = json.load(js... | 36.575221 | 212 | 0.640455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 964 | 0.233245 |
dada78f117f641ec85db243d1ba2fcd8f0d8b75a | 1,347 | py | Python | src/tutorials/hello_world_tutorial/functions/app.py | drblahdblah/covid-19-analysis | abd6ed23a49bd1277708163cad0741c5b9f9698a | [
"MIT"
] | 3 | 2020-04-20T11:10:23.000Z | 2020-04-22T08:06:04.000Z | src/tutorials/hello_world_tutorial/functions/app.py | drblahdblah/covid-19-analysis | abd6ed23a49bd1277708163cad0741c5b9f9698a | [
"MIT"
] | null | null | null | src/tutorials/hello_world_tutorial/functions/app.py | drblahdblah/covid-19-analysis | abd6ed23a49bd1277708163cad0741c5b9f9698a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
df = pd.read_csv(f'https://gist.githubusercontent.com/chriddyp/c78bf172206ce24f77d6363a2d754b59/'
f'raw/c353e8ef842413cae56ae3920b8fd78468aa4cb2/usa-agricultural-exports-2011... | 31.325581 | 99 | 0.680772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 519 | 0.385301 |
dadb199b4bbce57f73cf63b1e61db8a2e22975c4 | 3,339 | py | Python | ooiservices/tests/test_cmislib.py | Bobfrat/ooi-ui-services | 32f67948510e6af0bc06d62fe49ff3c991b22b40 | [
"Apache-2.0"
] | 2 | 2015-02-28T00:20:30.000Z | 2015-04-30T12:40:31.000Z | ooiservices/tests/test_cmislib.py | Bobfrat/ooi-ui-services | 32f67948510e6af0bc06d62fe49ff3c991b22b40 | [
"Apache-2.0"
] | 266 | 2015-01-02T21:29:25.000Z | 2020-01-23T16:00:11.000Z | ooiservices/tests/test_cmislib.py | Bobfrat/ooi-ui-services | 32f67948510e6af0bc06d62fe49ff3c991b22b40 | [
"Apache-2.0"
] | 13 | 2015-02-04T21:13:34.000Z | 2016-10-18T14:39:36.000Z | #!/usr/bin/env python
'''
Test the cmislib package created by Apache Chemistry project.
Version is currently at 0.5.1 and has very good reviews
from the community.
Created: 10/04/2015
'''
__author__ = 'M@Campbell'
import unittest
from unittest import skipIf
import os
from base64 import b64encode
from ooiservices.a... | 34.42268 | 79 | 0.650195 | 2,932 | 0.878107 | 0 | 0 | 2,996 | 0.897275 | 0 | 0 | 1,333 | 0.399221 |
dadb84725f965ceb0d440e96ae59bc095140ff91 | 128 | py | Python | Code/YOLO/darkflow/darkflow/utils/im_transform.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | Code/YOLO/darkflow/darkflow/utils/im_transform.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | Code/YOLO/darkflow/darkflow/utils/im_transform.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:834d7828e80c45d2160d52eeeefc97a2432c512b24b89422f604edf52f3d667a
size 895
| 32 | 75 | 0.882813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dadc943c456eca12a123766407c6fe7d3b911d2b | 12,804 | py | Python | main_robust.py | npatel5/similarity-learning | 9052f3d966a2e14918fcaf9d3a4c93dc9143db71 | [
"MIT"
] | null | null | null | main_robust.py | npatel5/similarity-learning | 9052f3d966a2e14918fcaf9d3a4c93dc9143db71 | [
"MIT"
] | null | null | null | main_robust.py | npatel5/similarity-learning | 9052f3d966a2e14918fcaf9d3a4c93dc9143db71 | [
"MIT"
] | null | null | null | from __future__ import print_function
from IPython.core.debugger import set_trace
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import config as cf
import numpy as np
import torchvision
import torchvision.transforms as transforms
#imp... | 38.107143 | 133 | 0.670181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,861 | 0.223446 |
dadcb95e7278009dc692c238d4ccf77a3fb2e55e | 1,843 | py | Python | tools/list_exp.py | AlexMaximenko/sew | f26b45f1374f3c3ce477abcc07a2d0017859c026 | [
"MIT"
] | 49 | 2021-09-15T06:10:07.000Z | 2022-03-28T17:37:28.000Z | tools/list_exp.py | AlexMaximenko/sew | f26b45f1374f3c3ce477abcc07a2d0017859c026 | [
"MIT"
] | 3 | 2021-09-26T03:45:04.000Z | 2022-02-21T09:36:38.000Z | tools/list_exp.py | AlexMaximenko/sew | f26b45f1374f3c3ce477abcc07a2d0017859c026 | [
"MIT"
] | 9 | 2021-09-15T07:35:09.000Z | 2022-02-21T00:10:20.000Z | # Copyright (c) ASAPP Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import fire
import os
import sys
import time
from tqdm.auto import tqdm
import re
import json
from colorama import Fore
def get_num_updates(folder):
num_updates... | 27.102941 | 65 | 0.571351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 325 | 0.176343 |
dadd9c97dc297ce53e68887ddd85475bda9eda3c | 11,356 | py | Python | tests/tags_test.py | alexanderGugel/nate | 18856142efe0b80f5260df3fb2ad9cd0a22a1c6f | [
"MIT"
] | 3 | 2020-10-31T17:16:18.000Z | 2022-01-27T06:42:44.000Z | tests/tags_test.py | alexanderGugel/nate | 18856142efe0b80f5260df3fb2ad9cd0a22a1c6f | [
"MIT"
] | null | null | null | tests/tags_test.py | alexanderGugel/nate | 18856142efe0b80f5260df3fb2ad9cd0a22a1c6f | [
"MIT"
] | null | null | null | import unittest
from nate import (
H1,
Body,
Br,
DangerousHtml,
Div,
Head,
Hr,
Html,
Input,
Meta,
P,
Title,
Table,
Thead,
Tbody,
Th,
Tr,
Td,
Fragment,
)
from .common import article_1, article_2, html, section
class TagsTest(unittest.TestCas... | 34.941538 | 82 | 0.566925 | 11,021 | 0.970158 | 0 | 0 | 0 | 0 | 0 | 0 | 7,524 | 0.662324 |
dade5fb81eac6f03d7cd440bbd9b3041f81946b2 | 554 | py | Python | worker_zeromq/addresses.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | worker_zeromq/addresses.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | worker_zeromq/addresses.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 26 09:11:06 2016
@author: eikes
"""
ADD_VENTI_WORKER = 'tcp://*:4555'
ADD_VENTI_LH_WORKER = 'tcp://localhost:4555'
ADD_SINK_RECEIVE = 'tcp://*:4556'
ADD_SINK_LH_RECEIVE = 'tcp://localhost:4556'
ADD_SINK_PUBLISH = 'tcp://*:4557'
ADD_SINK_LH_PUBLISH = 'tcp://localhost:4557'... | 29.157895 | 46 | 0.707581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.537906 |
dade9648a2fc13cba868380ebc0181b3e2615f68 | 593 | py | Python | ancli/__main__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | 1 | 2020-10-24T16:08:14.000Z | 2020-10-24T16:08:14.000Z | ancli/__main__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | null | null | null | ancli/__main__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | null | null | null | import importlib
import sys
from ancli import make_cli
try:
entry_point = sys.argv[1]
except IndexError:
print('Error: no entry point name provided!')
sys.exit(1)
try:
module_path, function_name = entry_point.split(':')
except ValueError:
print('Error: entry point name should have format a.b.c:f... | 20.448276 | 70 | 0.701518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.254637 |
dadeeda64957f5eeac274eff704cc39ef9a9cf4d | 31,856 | py | Python | venv/Lib/site-packages/pyramid/traversal.py | mandamg/Exercicios-de-Python-do-Curso-em-Video | 3f818c11c3c10213bebc1dfb6a740adee468ea3a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyramid/traversal.py | mandamg/Exercicios-de-Python-do-Curso-em-Video | 3f818c11c3c10213bebc1dfb6a740adee468ea3a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyramid/traversal.py | mandamg/Exercicios-de-Python-do-Curso-em-Video | 3f818c11c3c10213bebc1dfb6a740adee468ea3a | [
"MIT"
] | null | null | null | from functools import lru_cache
from urllib.parse import unquote_to_bytes
from zope.interface import implementer
from zope.interface.interfaces import IInterface
from pyramid.encode import url_quote
from pyramid.exceptions import URLDecodeError
from pyramid.interfaces import (
VH_ROOT_KEY,
IRequestFactory,
... | 41.915789 | 79 | 0.651588 | 6,047 | 0.189823 | 0 | 0 | 8,794 | 0.276055 | 0 | 0 | 22,455 | 0.704891 |
dadf3ed9b04f6470f12f0113ed470f0b639c3816 | 291 | py | Python | setup.py | WolfyLPDC/spanish2datetime | 3c5db5b0e6e59567286c9f394890557d9d50e162 | [
"MIT"
] | 1 | 2021-11-22T17:40:27.000Z | 2021-11-22T17:40:27.000Z | setup.py | msolefonte/spanish2datetime | 3c5db5b0e6e59567286c9f394890557d9d50e162 | [
"MIT"
] | null | null | null | setup.py | msolefonte/spanish2datetime | 3c5db5b0e6e59567286c9f394890557d9d50e162 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='spanish2datetime',
version='1.0',
description='Python3 script able to turn spanish text into datetime.',
author="Marc Solé",
author_email="marcsole@insomniacwolves.com",
license='LICENSE',
packages=['spanish2datetime']
) | 26.454545 | 74 | 0.707904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.510274 |
dadf717f7a0bf06444bc04239a755273afb5cf77 | 3,485 | py | Python | Lib/site-packages/visual/examples/faces_heightfield.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/visual/examples/faces_heightfield.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/visual/examples/faces_heightfield.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | ## Demonstrates some techniques for working with "faces", and
## shows how to build a height field (a common feature request)
## with it.
## David Scherer July 2001
from visual import *
class Model:
def __init__(self):
self.frame = frame()
self.model = faces(frame=self.frame)
se... | 35.561224 | 91 | 0.556385 | 3,021 | 0.866858 | 0 | 0 | 0 | 0 | 0 | 0 | 978 | 0.280631 |
dae1d10cf13014392041b42324790708bc97af7d | 766 | py | Python | tests/test_appcli_jwt.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 25 | 2017-06-19T10:01:36.000Z | 2019-08-03T10:35:41.000Z | tests/test_appcli_jwt.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 209 | 2017-09-27T11:59:29.000Z | 2019-08-10T11:10:48.000Z | tests/test_appcli_jwt.py | Carrene/restfulpy | 21472af0415fffc23f8003b6074afc2de2e0b414 | [
"MIT"
] | 16 | 2017-11-22T15:44:31.000Z | 2019-04-14T12:29:34.000Z | import base64
import json
from bddcli import Given, given, when, stdout, stderr, Application, status
from restfulpy import Application as RestfulpyApplication
foo = RestfulpyApplication(name='jwt')
app = Application('foo', 'tests.test_appcli_jwt:foo.cli_main')
def test_jwt():
with Given(app, 'jwt create'):
... | 25.533333 | 74 | 0.627937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.182768 |
dae25a006d1cb1117ed8b2fe4c8f61d85c1dfe71 | 476 | py | Python | classes/inheritance.py | VictorPinas/python-basics | 63358322166becf69bbd2d96c6bffa531456ac5d | [
"MIT"
] | null | null | null | classes/inheritance.py | VictorPinas/python-basics | 63358322166becf69bbd2d96c6bffa531456ac5d | [
"MIT"
] | null | null | null | classes/inheritance.py | VictorPinas/python-basics | 63358322166becf69bbd2d96c6bffa531456ac5d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 22 18:36:34 2022
@author: victor
"""
class SARDog(Dog):
"""Represent a search dog."""
def __init__(self, name):
"""Initilize the sar dog."""
super().__init__(name)
def search(self):
"""Simulate sear... | 19.833333 | 43 | 0.565126 | 261 | 0.548319 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.476891 |
dae369d14e4029c4e7a65aeb8f3575d751e3c7bb | 2,277 | py | Python | hw4/visualizations.py | zeynepCankara/NTU_DLCV2019 | 2dc44584ec7b9e1d84e688551eb8cef48d501b45 | [
"MIT"
] | 1 | 2022-01-17T14:28:46.000Z | 2022-01-17T14:28:46.000Z | hw4/visualizations.py | zeynepCankara/NTU_DLCV2019 | 2dc44584ec7b9e1d84e688551eb8cef48d501b45 | [
"MIT"
] | null | null | null | hw4/visualizations.py | zeynepCankara/NTU_DLCV2019 | 2dc44584ec7b9e1d84e688551eb8cef48d501b45 | [
"MIT"
] | 2 | 2021-11-08T19:05:57.000Z | 2022-01-17T14:28:48.000Z | import os
import numpy as np
import matplotlib.pyplot as plt
def plot_embedding(X, y, training_mode, save_name):
"""
Reference: https://github.com/NaJaeMin92/pytorch_DANN/
Gets the t-sne output and actions label encodings plot T-SNE
"""
x_min, x_max = np.min(X, 0), np.max(X, 0)
X = (X ... | 28.4625 | 101 | 0.527448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.211682 |
dae48a50c2d41cee7a17a1643cdfb185e9a03591 | 3,274 | py | Python | experiments_histogram.py | LaGuer/DeepSphere | 5a02ac01b8fe3a5b9814ae9efd20d10e0c843209 | [
"MIT"
] | 71 | 2018-10-30T09:46:19.000Z | 2020-02-15T12:02:00.000Z | experiments_histogram.py | aosheng1996/DeepSphere | ebcf162eaa6e23c1c92dbc84e0908695bb7245d7 | [
"MIT"
] | 9 | 2018-10-31T02:32:00.000Z | 2020-02-12T08:55:43.000Z | experiments_histogram.py | aosheng1996/DeepSphere | ebcf162eaa6e23c1c92dbc84e0908695bb7245d7 | [
"MIT"
] | 16 | 2018-10-31T00:32:33.000Z | 2020-01-19T21:24:46.000Z | #!/usr/bin/env python3
# coding: utf-8
"""
Script to run the baseline experiment:
SVM classification with histogram features.
"""
import os
import sys
import numpy as np
from deepsphere import experiment_helper
from grid import pgrid
def single_experiment(sigma, order, sigma_noise, path):
"""Run as experiment... | 35.204301 | 153 | 0.678986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.179291 |
dae6cac23452498b7274b531bf02a845882db8e7 | 2,827 | py | Python | tests/deepspeed/ds_pipe.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | 1 | 2021-11-15T19:07:13.000Z | 2021-11-15T19:07:13.000Z | tests/deepspeed/ds_pipe.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | tests/deepspeed/ds_pipe.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | import os
import torch.cuda
from hfutils.model_pipe import T5DeepSpeedPipe
import deepspeed
from tqdm import tqdm
from transformers.models.t5.configuration_t5 import T5Config
from transformers import DataCollatorForSeq2Seq, default_data_collator
import argparse
from deepspeed.utils import RepeatingLoader
from hfutils.... | 30.074468 | 81 | 0.723382 | 351 | 0.12416 | 590 | 0.208702 | 0 | 0 | 0 | 0 | 603 | 0.2133 |
dae6f59082823ad960155ff941d486f9928ce8dd | 2,694 | py | Python | Polynomial_dict.py | chapman-phys227-2016s/hw-7-patti102 | 8688cbb3649ae623ec870ea380cd7470d69a2517 | [
"MIT"
] | null | null | null | Polynomial_dict.py | chapman-phys227-2016s/hw-7-patti102 | 8688cbb3649ae623ec870ea380cd7470d69a2517 | [
"MIT"
] | null | null | null | Polynomial_dict.py | chapman-phys227-2016s/hw-7-patti102 | 8688cbb3649ae623ec870ea380cd7470d69a2517 | [
"MIT"
] | null | null | null | import numpy
import copy
class Polynomial(object):
def __init__(self, coefficients):
self.coeff = coefficients
def __call__(self, x):
"""Evaluate the polynomial."""
s = 0
for degree in self.coeff:
s += self.coeff[degree]*x**degree
return s
def __add__(s... | 32.853659 | 129 | 0.528582 | 2,254 | 0.836674 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.162955 |
dae7ac093bb2806c2693266b9bf2b6b2ab7584bc | 9,341 | py | Python | whatthefood/tests/test_ops.py | lychanl/WhatTheFood | 94b6eec2c306e7e55b19395cde207d6e6beec7fe | [
"MIT"
] | null | null | null | whatthefood/tests/test_ops.py | lychanl/WhatTheFood | 94b6eec2c306e7e55b19395cde207d6e6beec7fe | [
"MIT"
] | null | null | null | whatthefood/tests/test_ops.py | lychanl/WhatTheFood | 94b6eec2c306e7e55b19395cde207d6e6beec7fe | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import whatthefood.graph as graph
class TestOps(unittest.TestCase):
def test_matmul(self):
x_arr = np.array([[1, 2], [2, 3], [3, 4]])
y_arr = np.array([[1, 2, 3, 4], [4, 5, 6, 7]])
x = graph.Constant(x_arr)
y = graph.Constant(y_arr)
m ... | 36.065637 | 107 | 0.52853 | 9,267 | 0.992078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dae800ffa6f6c81d8205d99c1a64fe8460eb79e8 | 21,339 | py | Python | fastpapers/carion2020end.py | ababino/papers | 31b6502d150160f697ce34ac888d37ac0e7ad9f2 | [
"Apache-2.0"
] | 2 | 2020-11-30T11:01:39.000Z | 2021-05-21T00:07:28.000Z | fastpapers/carion2020end.py | ababino/fastpapers | 31b6502d150160f697ce34ac888d37ac0e7ad9f2 | [
"Apache-2.0"
] | null | null | null | fastpapers/carion2020end.py | ababino/fastpapers | 31b6502d150160f697ce34ac888d37ac0e7ad9f2 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 04_carion2020end.ipynb (unless otherwise specified).
__all__ = ['coco_vocab', 'bb_pad', 'ParentSplitter', 'box_cxcywh_to_xyxy', 'box_xyxy_to_cxcywh', 'TensorBBoxWH',
'TensorBBoxTL', 'ToWH', 'ToXYXY', 'ToTL', 'box_area', 'all_op', 'generalized_box_iou', 'DETRLoss',... | 45.69379 | 215 | 0.634753 | 13,379 | 0.626974 | 0 | 0 | 5,413 | 0.253667 | 0 | 0 | 3,477 | 0.162941 |
daea62739f3ebdaefddcd10908b331885bbe8bcd | 1,063 | py | Python | tests/test_models/test_author.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1,880 | 2019-03-21T10:08:25.000Z | 2022-03-31T12:41:55.000Z | tests/test_models/test_author.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 356 | 2019-03-21T19:08:56.000Z | 2021-01-08T17:45:43.000Z | tests/test_models/test_author.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 157 | 2019-04-23T01:13:37.000Z | 2022-03-24T22:41:18.000Z | # external
import pytest
# project
from dephell.models.author import Author
@pytest.mark.parametrize('name, mail, formatted', [
('gram', 'example@mail.com', 'gram <example@mail.com>'),
('gram', None, 'gram'),
('Грам @orsinium', 'example_mail@mail.com'... | 34.290323 | 94 | 0.557855 | 0 | 0 | 0 | 0 | 1,012 | 0.924201 | 0 | 0 | 441 | 0.40274 |
daeae031a92bdd332e807b1e1b225a48f958d13f | 4,283 | py | Python | pymultimediacompression/videomedia/compressor.py | AbdullrhmanAljasser/PyMultiMediaCompression | 0ed5a1ac43050b1c9fe84f277a18beaf4bbdc705 | [
"MIT"
] | null | null | null | pymultimediacompression/videomedia/compressor.py | AbdullrhmanAljasser/PyMultiMediaCompression | 0ed5a1ac43050b1c9fe84f277a18beaf4bbdc705 | [
"MIT"
] | null | null | null | pymultimediacompression/videomedia/compressor.py | AbdullrhmanAljasser/PyMultiMediaCompression | 0ed5a1ac43050b1c9fe84f277a18beaf4bbdc705 | [
"MIT"
] | null | null | null | import os
import ffmpeg
import subprocess
import shutil
from pymultimediacompression.utilities.utils import bitrate_size_based, gb_to_bit, mb_to_bit, kb_to_bit, b_to_bit
MISSING_REQUIREMENTS = "FFmpeg required to be installed to use PyMultiMediaCompression \n Check https://github.com/AbdullrhmanAljasser/PyMultiM... | 32.694656 | 160 | 0.632267 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,657 | 0.386878 |
daed2dcd02c1f4f68af01100da13ec4d4ceacfa7 | 7,548 | py | Python | kubernetes/test/test_v1_pod_status.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_pod_status.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_pod_status.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... | 51 | 126 | 0.471118 | 7,007 | 0.928325 | 0 | 0 | 0 | 0 | 0 | 0 | 1,275 | 0.168919 |
daed5c9ed5fbf2bcdac59913e3386fad0938a9cb | 831 | py | Python | scripts/warm_ex.py | cp4cds/cmip6_range_check_2 | 6fca2632029a2adb9736bfc1382b39f82d8a27e1 | [
"Apache-2.0"
] | null | null | null | scripts/warm_ex.py | cp4cds/cmip6_range_check_2 | 6fca2632029a2adb9736bfc1382b39f82d8a27e1 | [
"Apache-2.0"
] | 1 | 2021-09-27T15:18:39.000Z | 2021-09-27T15:18:39.000Z | scripts/warm_ex.py | cp4cds/cmip6_range_check_2 | 6fca2632029a2adb9736bfc1382b39f82d8a27e1 | [
"Apache-2.0"
] | null | null | null |
import warnings
def get_user_warning(data):
class HERE(UserWarning):
pass
setattr( HERE, 'data', data )
return HERE
class Message(object):
def __init__(self,a,b):
self.a = a
self.b = b
def fxn():
##warnings.warn(Message('sample text','b'), UserWarning )
warnings.warn(... | 25.96875 | 88 | 0.637786 | 125 | 0.150421 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.340554 |
daed91c325a084d2dc6fae9cb74a954c288fb74c | 979 | py | Python | dreamy-dingos/chat/models.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | dreamy-dingos/chat/models.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | dreamy-dingos/chat/models.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z | from django.db import models
from django.utils import timezone
class Room(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class SimpleUser(models.Model):
objects = models.Manager()
username = models.CharField(max_length=50, primary_key=True)
roo... | 26.459459 | 83 | 0.658836 | 907 | 0.926456 | 0 | 0 | 222 | 0.226762 | 0 | 0 | 14 | 0.0143 |
daef2527ac6d9f73a92aca7b8ece3f66a8db4875 | 198 | py | Python | aulaszeus/modules/buscaCep.py | zerossB/aulas_zeus | 002fc29578aed3aa36a9b400882e638b68c123ea | [
"BSD-3-Clause"
] | null | null | null | aulaszeus/modules/buscaCep.py | zerossB/aulas_zeus | 002fc29578aed3aa36a9b400882e638b68c123ea | [
"BSD-3-Clause"
] | null | null | null | aulaszeus/modules/buscaCep.py | zerossB/aulas_zeus | 002fc29578aed3aa36a9b400882e638b68c123ea | [
"BSD-3-Clause"
] | null | null | null | import re
import urllib
def get_cep(cep):
"""."""
url = ""
cepCorrigido = re.sub('[^\d]', '', cep)
if len(cepCorrigido) != 8:
return False;
payload = {'relaxation'}
| 13.2 | 43 | 0.520202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.151515 |
daf17f6b45920374fa2e9b1df4b56aef139d6271 | 5,822 | py | Python | python/interpreter/environment.py | yehzhang/x9 | 2d06767ecd3521e9255748d14ab43938d1693bbc | [
"MIT"
] | 1 | 2017-11-19T02:04:44.000Z | 2017-11-19T02:04:44.000Z | python/interpreter/environment.py | yehzhang/x9 | 2d06767ecd3521e9255748d14ab43938d1693bbc | [
"MIT"
] | null | null | null | python/interpreter/environment.py | yehzhang/x9 | 2d06767ecd3521e9255748d14ab43938d1693bbc | [
"MIT"
] | null | null | null | from collections import defaultdict
class Environment:
def __init__(self, config):
self.aliases = {}
self.registers = Registers(self.aliases, config)
self.memory = Memory(config)
# :type Dict[str, Label]: {label_name: Label}
self.labels = {}
self.execution_count = 0... | 29.256281 | 82 | 0.567159 | 4,415 | 0.75833 | 0 | 0 | 0 | 0 | 0 | 0 | 1,318 | 0.226383 |
daf21d401b40f3f6a6807cf4ef69459e7b2f3d68 | 731 | py | Python | pynaries/tests.py | marshall/pynaries | 52c0376b95de43ad9b910b1cab08c17d3600e070 | [
"Apache-2.0"
] | 1 | 2016-05-09T10:08:26.000Z | 2016-05-09T10:08:26.000Z | pynaries/tests.py | marshall/pynaries | 52c0376b95de43ad9b910b1cab08c17d3600e070 | [
"Apache-2.0"
] | null | null | null | pynaries/tests.py | marshall/pynaries | 52c0376b95de43ad9b910b1cab08c17d3600e070 | [
"Apache-2.0"
] | null | null | null | import unittest
from version import Version
class VersionTestCase(unittest.TestCase):
def testFromString(self):
v = Version.fromObject("1.3.3sp1")
self.assertEquals(v.major, 1)
self.assertEquals(v.minor, '3')
self.assertEquals(v.micro, '3sp1')
self.assertEquals(Version.getNumericPiece(v.micro), '3')
self.... | 34.809524 | 79 | 0.730506 | 640 | 0.875513 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.132695 |
daf3263299ef088c986b08d37248e5a9199e71b6 | 250 | py | Python | python/resistor-color-duo/resistor_color_duo.py | Victor-Chinewubeze/algorithms-exercism | 34669348762eef69b68a2f43260ab10ac1c4eb2a | [
"MIT"
] | 1 | 2020-04-16T23:06:33.000Z | 2020-04-16T23:06:33.000Z | python/resistor-color-duo/resistor_color_duo.py | Victor-Chinewubeze/algorithms-exercism | 34669348762eef69b68a2f43260ab10ac1c4eb2a | [
"MIT"
] | 7 | 2021-05-08T11:46:15.000Z | 2021-05-10T19:31:11.000Z | python/resistor-color-duo/resistor_color_duo.py | Victor-Chinewubeze/algorithms-exercism | 34669348762eef69b68a2f43260ab10ac1c4eb2a | [
"MIT"
] | 1 | 2020-01-09T16:33:39.000Z | 2020-01-09T16:33:39.000Z | def value(colors):
colorList = ["black","brown","red","orange","yellow","green","blue","violet","grey","white"]
code = ""
for color in colors:
if len(code) < 2:
code += str(colorList.index(color))
return int(code)
| 31.25 | 96 | 0.564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.284 |
daf44bfec449975c869de1732b37b6845adb00a5 | 4,225 | py | Python | WebUtils/Funcs.py | PeaceWorksTechnologySolutions/w4py | 74f5a03a63f1a93563502b908474aefaae2abda2 | [
"MIT"
] | 18 | 2016-08-01T20:15:59.000Z | 2019-12-24T16:00:03.000Z | WebUtils/Funcs.py | WebwareForPython/w4py | bba08f5974d49f5da7e88abe3eeda1037d0824a3 | [
"MIT"
] | 6 | 2016-09-13T05:48:45.000Z | 2020-01-09T18:29:12.000Z | WebUtils/Funcs.py | WebwareForPython/w4py | bba08f5974d49f5da7e88abe3eeda1037d0824a3 | [
"MIT"
] | 6 | 2016-09-16T14:32:29.000Z | 2020-01-03T18:52:16.000Z | """WebUtils.Funcs
This module provides some basic functions that are useful
in HTML and web development.
You can safely import * from WebUtils.Funcs if you like.
"""
__all__ = [
'htmlEncode', 'htmlEncodeStr', 'htmlDecode', 'urlEncode', 'urlDecode',
'htmlForDict', 'requestURI', 'normURL']
htmlForNone = '-' ... | 28.741497 | 80 | 0.59574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,802 | 0.426509 |
daf646afbefc8a29534d759d8a3042f9a4ff070a | 8,996 | py | Python | src/slizzy/main.py | matheushsouza/slizzy | f224b8e4621d11031315da9178202781b4a2dcef | [
"BSD-3-Clause"
] | 1 | 2019-12-24T03:08:12.000Z | 2019-12-24T03:08:12.000Z | src/slizzy/main.py | matheushsouza/slizzy | f224b8e4621d11031315da9178202781b4a2dcef | [
"BSD-3-Clause"
] | null | null | null | src/slizzy/main.py | matheushsouza/slizzy | f224b8e4621d11031315da9178202781b4a2dcef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import enum
import sys
import slizzy.config as config
import slizzy.version as version
from slizzy.track import Track
from slizzy.util import color, logging, time
__all__ = [
"module",
"all_modules",
"slizzy"
]
module = enum.Enum("modules", "slider mp3co zippy")
all... | 25.925072 | 101 | 0.619942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,215 | 0.246221 |
daf74249a6fb322cbc113ac8d72e67fa77ee0be4 | 95 | py | Python | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py | liuxiaomiao123/NeuroMathAcademy | 16a7969604a300bf9fbb86f8a5b26050ebd14c65 | [
"CC-BY-4.0"
] | 2 | 2020-07-03T04:39:09.000Z | 2020-07-12T02:08:31.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2020-06-22T22:57:03.000Z | 2020-06-22T22:57:03.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2021-08-06T08:05:01.000Z | 2021-08-06T08:05:01.000Z | score, evectors, evals = pca(X)
with plt.xkcd():
plot_eigenvalues(evals)
plt.xlim([0,100]) | 19 | 31 | 0.684211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
daf767e70655a7695277ba68df583907a9b0cda7 | 319 | py | Python | research_user_interest/model/config.py | sinchir0/research_user_interest | eb073aaae0e1dba0abb7064c1921c9c96671e2b0 | [
"MIT"
] | null | null | null | research_user_interest/model/config.py | sinchir0/research_user_interest | eb073aaae0e1dba0abb7064c1921c9c96671e2b0 | [
"MIT"
] | null | null | null | research_user_interest/model/config.py | sinchir0/research_user_interest | eb073aaae0e1dba0abb7064c1921c9c96671e2b0 | [
"MIT"
] | null | null | null | import luigi
class MasterConfig(luigi.Config):
model_path: str = luigi.Parameter()
embedding_dim: int = luigi.IntParameter()
target_title1: str = luigi.Parameter()
target_title2: str = luigi.Parameter()
target_title1_label: str = luigi.Parameter()
target_title2_label: str = luigi.Parameter()
| 29 | 48 | 0.724138 | 303 | 0.949843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dafaac4260b03a784e5a2bbeabdd300085af3fb8 | 74 | py | Python | diehard/e_vars.py | skyshy0707/diehard | a6aaf47c728939606158f8d124d6edd7e12ef761 | [
"BSL-1.0"
] | null | null | null | diehard/e_vars.py | skyshy0707/diehard | a6aaf47c728939606158f8d124d6edd7e12ef761 | [
"BSL-1.0"
] | null | null | null | diehard/e_vars.py | skyshy0707/diehard | a6aaf47c728939606158f8d124d6edd7e12ef761 | [
"BSL-1.0"
] | null | null | null | SECRET_KEY='0nk#k)hck^)6y6*+%4(&r$ew+mhubb!trj-cz_0oturh48p*+y'
DEBUG=True | 37 | 63 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.702703 |
dafc15205b01c79014e37b7285dde88b163902fd | 383 | py | Python | hack_chat_related/cynthiabot/word_sources/scratch_4.py | Cynthia7979/tools-programs | 0bf0b8bf33205c11d584b216d35c1ca3d23f04f2 | [
"MIT"
] | 2 | 2021-02-09T15:58:29.000Z | 2021-10-08T04:34:51.000Z | hack_chat_related/cynthiabot/word_sources/scratch_4.py | Cynthia7979/tools-programs | 0bf0b8bf33205c11d584b216d35c1ca3d23f04f2 | [
"MIT"
] | null | null | null | hack_chat_related/cynthiabot/word_sources/scratch_4.py | Cynthia7979/tools-programs | 0bf0b8bf33205c11d584b216d35c1ca3d23f04f2 | [
"MIT"
] | null | null | null | f = open('essay_material_word_sources.txt', encoding='utf-16-le')
fw = open('essay_material_word_sources_.txt', 'w', encoding='utf-8')
output = []
for l in f.readlines():
print(l)
if l and (l != ' ') and (l != '\n') and ('【' not in l) and ('】' not in l):
fw.write(l.strip(' '))
# print(o... | 29.461538 | 79 | 0.545692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.405685 |
dafce01a1c13646ea816c979ed62d0361b09fc3a | 330 | py | Python | simplejson_test/testdata/allennlp/data/tokenizers/tmp.py | rahman-mahmudur/PyART | 36591cd10b2b7a560bbcb47a6cf744b72466f92a | [
"Apache-2.0"
] | 7 | 2021-03-20T21:12:51.000Z | 2022-01-30T09:26:52.000Z | DataFlowEvaluation/data/allennlp/data/tokenizers/tmp.py | PYART0/PyART-demo | 9a889662fb2610b7be2687a8304620855e7c76de | [
"Apache-2.0"
] | null | null | null | DataFlowEvaluation/data/allennlp/data/tokenizers/tmp.py | PYART0/PyART-demo | 9a889662fb2610b7be2687a8304620855e7c76de | [
"Apache-2.0"
] | 4 | 2021-03-25T14:10:09.000Z | 2022-03-09T09:23:30.000Z | from typing import List
from overrides import overrides
from allennlp.data.tokenizers.token import Token
from allennlp.data.tokenizers.tokenizer import Tokenizer
@Tokenizer.register("just_spaces")
class WhitespaceTokenizer(Tokenizer):
@overrides
def tokenize(self, text: str) -> List[Token]:
reveal_... | 23.571429 | 56 | 0.775758 | 129 | 0.390909 | 0 | 0 | 164 | 0.49697 | 0 | 0 | 13 | 0.039394 |
daff7eb461dc9d52057318faa8c976ebd75932d5 | 2,056 | py | Python | finitio/types/set_type.py | llambeau/finitio.py | 27c2799709993c6edb9d9038290792ed90a97346 | [
"0BSD"
] | 1 | 2016-02-06T17:16:22.000Z | 2016-02-06T17:16:22.000Z | finitio/types/set_type.py | llambeau/finitio.py | 27c2799709993c6edb9d9038290792ed90a97346 | [
"0BSD"
] | null | null | null | finitio/types/set_type.py | llambeau/finitio.py | 27c2799709993c6edb9d9038290792ed90a97346 | [
"0BSD"
] | null | null | null | from ..support.decorators import TypeType
from .collection_type import CollectionType
from ..exceptions import UndressError
@TypeType("set", ['element_type', 'metadata'])
class SetType(CollectionType):
def _include(self, value, world):
if not isinstance(value, set) and not isinstance(value, list):
... | 33.16129 | 71 | 0.587549 | 1,882 | 0.91537 | 0 | 0 | 1,929 | 0.93823 | 0 | 0 | 181 | 0.088035 |
97008b753f686abd12cd11cf56dd253fd134810a | 2,120 | py | Python | hugs/manager.py | Bogdanp/hugs | e7f16f15369fbe3da11d89882d76c7ef432f3709 | [
"BSD-3-Clause"
] | 22 | 2017-07-20T18:02:27.000Z | 2021-06-10T13:06:22.000Z | hugs/manager.py | Bogdanp/hugs | e7f16f15369fbe3da11d89882d76c7ef432f3709 | [
"BSD-3-Clause"
] | null | null | null | hugs/manager.py | Bogdanp/hugs | e7f16f15369fbe3da11d89882d76c7ef432f3709 | [
"BSD-3-Clause"
] | 2 | 2019-12-11T20:44:08.000Z | 2021-02-02T04:37:04.000Z | import functools
import sqlite3
from .repository import Repository
try:
from psycopg2.extras import DictRow, RealDictRow
ROW_CLASSES = (dict, sqlite3.Row, DictRow, RealDictRow)
except ImportError: # pragma: no cover
ROW_CLASSES = (dict, sqlite3.Row)
class Manager:
"""Managers extend repositories w... | 29.859155 | 90 | 0.628774 | 584 | 0.275472 | 684 | 0.322642 | 1,151 | 0.542925 | 0 | 0 | 452 | 0.213208 |
970230cccc075c9262639a742440eb46e3401e42 | 1,922 | py | Python | src/Application/PythonScriptModule/pymodules_old/apitest/thread_test.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/PythonScriptModule/pymodules_old/apitest/thread_test.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/apitest/thread_test.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | import time
from collections import deque
try:
import rexviewer as r
except ImportError: #not running under rex
import mockviewer as r
import circuits
from circuits.core import handler
class TestThread(circuits.Thread):
"""
A threaded circuits component inside Naali,
now testing how this behaves,... | 24.961039 | 79 | 0.570239 | 1,158 | 0.602497 | 0 | 0 | 248 | 0.129032 | 0 | 0 | 508 | 0.264308 |
970296f462844f00061a21409ca5bc6695b20b6a | 5,113 | py | Python | PlotlyandPython/Lessons/(02) Lineplots/Notebooks/Python Scripts/Lineplots (07) - Making dashed and dotted lines.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(02) Lineplots/Notebooks/Python Scripts/Lineplots (07) - Making dashed and dotted lines.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(02) Lineplots/Notebooks/Python Scripts/Lineplots (07) - Making dashed and dotted lines.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Lineplots (07) - Making dashed and dotted lines
# In the last lesson we saw how to change the colour and thickness of the lines in our plot.
#
# In this lesson we'll learn how to displayed a dashed or dotted line instead of a solid line. In the next lesson we'll find out how to set the marker s... | 32.157233 | 376 | 0.687463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,906 | 0.763935 |
970361b69af566e027101b9098d4da56f00db470 | 3,344 | py | Python | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | """
SpyDrNet
========
SpyDrNet is an EDA tool for analyzing and transforming netlists.
See https://byuccl.github.io/spydrnet for more details.
"""
import importlib
import pkgutil
import pathlib
import sys
import os
discovered_plugins = {
name: importlib.import_module(name)
for finder, name, ispkg
in pkg... | 30.962963 | 110 | 0.739833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.172548 |
9703d55b61dbe9671b606d116415a69bd78ce48a | 620 | py | Python | tools/sparse_dense_size_comparison.py | 3rror/aca_pathfinding_project | d7a91b1491e8eca08849e526634bdaa9a3833fa2 | [
"MIT"
] | null | null | null | tools/sparse_dense_size_comparison.py | 3rror/aca_pathfinding_project | d7a91b1491e8eca08849e526634bdaa9a3833fa2 | [
"MIT"
] | null | null | null | tools/sparse_dense_size_comparison.py | 3rror/aca_pathfinding_project | d7a91b1491e8eca08849e526634bdaa9a3833fa2 | [
"MIT"
] | null | null | null | # Compare memory usage of a dense and a sparse adjancency matrix.
#
# Requires numpy. Install it with `pip3 install --user numpy`
# Authors: Gianluca Andreotti, Aurora Lucrezia Castro
import numpy as np
from scipy.sparse import csr_matrix
import sys
def load_matrix(file):
matrix = np.loadtxt(file, dtype=int, nd... | 25.833333 | 66 | 0.696774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.479032 |
97062759c3659ac5db7690deb35f3812cc14b685 | 5,298 | py | Python | app/crypto_algo.py | paul3bin/cryptography-api | 13145ef897dcd3e5d4850bbf9f3572556a055e22 | [
"MIT"
] | null | null | null | app/crypto_algo.py | paul3bin/cryptography-api | 13145ef897dcd3e5d4850bbf9f3572556a055e22 | [
"MIT"
] | null | null | null | app/crypto_algo.py | paul3bin/cryptography-api | 13145ef897dcd3e5d4850bbf9f3572556a055e22 | [
"MIT"
] | null | null | null | from pandas import DataFrame
class CaesarCipher:
def __init__(self, text, key) -> None:
self.text = text
self.key = key
def decrypt(self):
decipheredText = ""
for ch in self.text.upper():
if ch.isalpha():
newchar = ord(ch)-self.key
... | 35.32 | 118 | 0.466214 | 5,254 | 0.991695 | 0 | 0 | 0 | 0 | 0 | 0 | 1,127 | 0.212722 |
97072840b3c078e668d6a47321880a4ea8713698 | 2,638 | py | Python | MultiPManager/brokermq.py | sebastiantrianac/SoftTLON | 3b798393efbd49b4a22acf19a056d64bef1d0ddf | [
"MIT"
] | null | null | null | MultiPManager/brokermq.py | sebastiantrianac/SoftTLON | 3b798393efbd49b4a22acf19a056d64bef1d0ddf | [
"MIT"
] | null | null | null | MultiPManager/brokermq.py | sebastiantrianac/SoftTLON | 3b798393efbd49b4a22acf19a056d64bef1d0ddf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
#
# A module for create a multi-agent system over Ad-hoc networks
# Copyright (C) 2017-2018
# Juan Sebastian Triana Correa <justrianaco@unal.edu.co>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as publ... | 33.820513 | 96 | 0.689917 | 1,311 | 0.496967 | 0 | 0 | 0 | 0 | 0 | 0 | 1,131 | 0.428734 |
9707987edbffdd07707988c15199cd2d6df39cc8 | 1,289 | py | Python | web/models.py | naturaln0va/flask-ackermann-io | 85916aaf93b0635f18f164da3e2c6ce86edadfc0 | [
"MIT"
] | 1 | 2019-12-09T07:26:43.000Z | 2019-12-09T07:26:43.000Z | web/models.py | naturaln0va/flask-ackermann-io | 85916aaf93b0635f18f164da3e2c6ce86edadfc0 | [
"MIT"
] | 4 | 2019-06-17T15:21:28.000Z | 2021-03-20T05:05:42.000Z | web/models.py | naturaln0va/flask-ackermann-io | 85916aaf93b0635f18f164da3e2c6ce86edadfc0 | [
"MIT"
] | null | null | null |
from app import db
from datetime import datetime as dt
from slugify import slugify
class Post(db.Model):
id = db.Column(db.Integer, primary_key = True)
title = db.Column(db.String, nullable=False)
description = db.Column(db.String, nullable=False)
content = db.Column(db.String, nullable=False)
slu... | 32.225 | 87 | 0.657099 | 1,202 | 0.932506 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.065167 |
9707bc0df9d0b4b62a5f4981d1500fdead7c395d | 672 | py | Python | tests/span/span_helpers.py | dmytroxshevchuk/sonic-mgmt | b784e598a063aba71fdf9ca23fe142840926e4cf | [
"Apache-2.0"
] | 132 | 2016-10-19T12:34:44.000Z | 2022-03-16T09:00:39.000Z | tests/span/span_helpers.py | dmytroxshevchuk/sonic-mgmt | b784e598a063aba71fdf9ca23fe142840926e4cf | [
"Apache-2.0"
] | 3,152 | 2016-09-21T23:05:58.000Z | 2022-03-31T23:29:08.000Z | tests/span/span_helpers.py | dmytroxshevchuk/sonic-mgmt | b784e598a063aba71fdf9ca23fe142840926e4cf | [
"Apache-2.0"
] | 563 | 2016-09-20T01:00:15.000Z | 2022-03-31T22:43:54.000Z | '''
Helper functions for span tests
'''
import ptf.testutils as testutils
def send_and_verify_mirrored_packet(ptfadapter, src_port, monitor):
'''
Send packet from ptf and verify it on monitor port
Args:
ptfadapter: ptfadapter fixture
src_port: ptf port index, from which packet will be sen... | 29.217391 | 84 | 0.71875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.453869 |
97089962ed3ea0a8a6e34e92416d3e39210a2bda | 9,039 | py | Python | bonobo/nodes/basics.py | a-musing-moose/bonobo | b3e9ddd028aed4a8a4df8e4b89334951a343e6fa | [
"Apache-2.0"
] | null | null | null | bonobo/nodes/basics.py | a-musing-moose/bonobo | b3e9ddd028aed4a8a4df8e4b89334951a343e6fa | [
"Apache-2.0"
] | null | null | null | bonobo/nodes/basics.py | a-musing-moose/bonobo | b3e9ddd028aed4a8a4df8e4b89334951a343e6fa | [
"Apache-2.0"
] | null | null | null | import functools
import html
import itertools
import pprint
from bonobo import settings
from bonobo.config import Configurable, Option, Method, use_raw_input, use_context, use_no_input
from bonobo.config.functools import transformation_factory
from bonobo.config.processors import ContextProcessor, use_context_processo... | 27.557927 | 120 | 0.605819 | 4,896 | 0.541653 | 2,413 | 0.266954 | 3,956 | 0.437659 | 0 | 0 | 1,556 | 0.172143 |
9709d0267ed5104b57450430822594c17f2e9707 | 1,093 | py | Python | examplesimple.py | atxarib99/kNN | 20c41a549f9f101478c1523b2ba683a8058fa6c8 | [
"MIT"
] | null | null | null | examplesimple.py | atxarib99/kNN | 20c41a549f9f101478c1523b2ba683a8058fa6c8 | [
"MIT"
] | null | null | null | examplesimple.py | atxarib99/kNN | 20c41a549f9f101478c1523b2ba683a8058fa6c8 | [
"MIT"
] | null | null | null | '''
This file serves to be an example on how to use kNN. This file is the simplified version with no graphs. For an example with graphs, check example.py
Change k, noise, and amount of data to see how accuracy is affected.
'''
import kNN as knn
import modeler
#setup the trainer. Tune your k parameter here.
tr... | 34.15625 | 153 | 0.743824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 632 | 0.578225 |
970a946d901c0d355d2502d9d1f07264bbcb2be3 | 424 | py | Python | python/simpletest/test.py | hackin-zhao/interesting_code | 25fecb716f5c8f9143ec2824bbf8996b347ce8a9 | [
"MIT"
] | 1 | 2021-09-22T10:56:13.000Z | 2021-09-22T10:56:13.000Z | python/simpletest/test.py | hackin-zhao/interesting_code | 25fecb716f5c8f9143ec2824bbf8996b347ce8a9 | [
"MIT"
] | 1 | 2022-02-15T03:53:47.000Z | 2022-02-15T03:53:47.000Z | python/simpletest/test.py | hackin-zhao/interesting_code | 25fecb716f5c8f9143ec2824bbf8996b347ce8a9 | [
"MIT"
] | null | null | null | import unittest
from mathtest import add, minus
class TestMathFunc(unittest.TestCase):
""" Test math function """
def test_add(self):
""" Test method add(a,b) """
self.assertEqual(3, add(1, 2))
self.assertNotEqual(3, add(2, 2))
def test_minus(self):
""" Test method test m... | 21.2 | 43 | 0.601415 | 324 | 0.764151 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.233491 |
970ba5beb8c6e85ad0c97cba7c1ffb95b3ebed8b | 174 | py | Python | src/tests/test_config.py | RomanRuby/machine-learning-project-template | d9c26786b50345e5665f76c9e6976531432b58c9 | [
"MIT"
] | null | null | null | src/tests/test_config.py | RomanRuby/machine-learning-project-template | d9c26786b50345e5665f76c9e6976531432b58c9 | [
"MIT"
] | null | null | null | src/tests/test_config.py | RomanRuby/machine-learning-project-template | d9c26786b50345e5665f76c9e6976531432b58c9 | [
"MIT"
] | null | null | null | import sys
import unittest
sys.path.append('.')
class TestDataSet(unittest.TestCase):
def test_cfg(self):
pass
if __name__ == '__main__':
unittest.main()
| 13.384615 | 37 | 0.672414 | 74 | 0.425287 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.074713 |
970bb5ea492f11426c0a5b6357ef8e845eea6ad9 | 2,181 | py | Python | terse/ParserFactory.py | talipovm/Terse | e6bfd3ac0d411b18d5167019623d5451695e787c | [
"MIT"
] | 2 | 2015-04-08T21:28:35.000Z | 2015-04-08T23:25:04.000Z | terse/ParserFactory.py | talipovm/Terse | e6bfd3ac0d411b18d5167019623d5451695e787c | [
"MIT"
] | null | null | null | terse/ParserFactory.py | talipovm/Terse | e6bfd3ac0d411b18d5167019623d5451695e787c | [
"MIT"
] | 1 | 2015-04-08T21:29:22.000Z | 2015-04-08T21:29:22.000Z | import logging
import os
from Interface.Isosurface import Isosurface
from Interface.JVXL import JVXL
from Interface.NBOinteractions import NBOinteractions
from Top import Top
log = logging.getLogger(__name__)
class ParserFactory(Top):
@staticmethod
def interface_by_command_line(frecord):
"""
... | 27.961538 | 75 | 0.56121 | 1,967 | 0.90188 | 0 | 0 | 1,924 | 0.882164 | 0 | 0 | 444 | 0.203576 |
970bccc21f91dbbbb912e9ec8f46b93496941b85 | 585 | py | Python | src/data/439.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/439.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/439.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from collections import deque
N, Q = map(int, input().split())
G = [[] for _ in range(N)]
for _ in range(N - 1):
a, b = map(lambda x: int(x) - 1, input().split())
G[a].append(b)
G[b].append(a)
s = 0
dist = [-1] * N
que = deque()
que.append(s)
dist[s] = 0
while que:
i = que.pople... | 20.172414 | 53 | 0.499145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.05812 |
970ca64e46ad17397f8882ea7b2df30130763068 | 5,384 | py | Python | axis_inspection/axis_inspection/report/project_status_summary/project_status_summary.py | Subramani830/testrepo | 4568c628dc0731d08315ebc830dc813e0abfc60d | [
"MIT"
] | null | null | null | axis_inspection/axis_inspection/report/project_status_summary/project_status_summary.py | Subramani830/testrepo | 4568c628dc0731d08315ebc830dc813e0abfc60d | [
"MIT"
] | null | null | null | axis_inspection/axis_inspection/report/project_status_summary/project_status_summary.py | Subramani830/testrepo | 4568c628dc0731d08315ebc830dc813e0abfc60d | [
"MIT"
] | null | null | null | # Copyright (c) 2013, veena and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns = get_columns()
data = []
conditions=get_conditions(filters)
data = get_data(filters,conditions)
for projec... | 25.158879 | 527 | 0.633172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,487 | 0.461924 |
970e676a6d9532be893c81dfaef34fee90098dda | 267 | py | Python | modelvshuman/__init__.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 158 | 2021-06-04T15:19:58.000Z | 2022-03-30T00:31:28.000Z | modelvshuman/__init__.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 7 | 2021-07-20T03:57:34.000Z | 2022-02-01T11:00:47.000Z | modelvshuman/__init__.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 14 | 2021-06-16T13:33:11.000Z | 2022-03-29T15:04:09.000Z | from . import cli
from . import datasets
from . import evaluation
from . import models
from . import plotting
from .model_evaluator import ModelEvaluator
from .plotting.plot import plot
from .version import __version__, VERSION
Evaluate = ModelEvaluator
Plot = plot
| 22.25 | 43 | 0.805243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
970f7b10a07b98a1a06557eff5b9b16e7aa0fdb8 | 59,592 | py | Python | sdk/python/pulumi_aws_native/elasticloadbalancingv2/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/elasticloadbalancingv2/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/elasticloadbalancingv2/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 36.116364 | 159 | 0.65044 | 57,350 | 0.962378 | 0 | 0 | 58,010 | 0.973453 | 0 | 0 | 13,501 | 0.226557 |
971109a2af40ebe4d09693183a658f563772f76a | 4,652 | py | Python | animate_gp.py | mzwiessele/notebook_playground | 14938eddf5491eb0356fa4f73d16047202131e4d | [
"BSD-2-Clause"
] | null | null | null | animate_gp.py | mzwiessele/notebook_playground | 14938eddf5491eb0356fa4f73d16047202131e4d | [
"BSD-2-Clause"
] | null | null | null | animate_gp.py | mzwiessele/notebook_playground | 14938eddf5491eb0356fa4f73d16047202131e4d | [
"BSD-2-Clause"
] | null | null | null | #===============================================================================
# Copyright (c) 2018, Max Zwiessele
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of sour... | 36.34375 | 97 | 0.593508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,946 | 0.418315 |
971117541cde3e1903caaf3ca3390e530dc8443b | 615 | py | Python | tests/testapp/models.py | marteinn/wagtail-automatic-move-redirects | 2321b6037d00284d447e346faf7841061e33495e | [
"BSD-3-Clause"
] | 13 | 2020-02-13T20:55:32.000Z | 2021-12-11T21:20:20.000Z | tests/testapp/models.py | marteinn/wagtail-automatic-move-redirects | 2321b6037d00284d447e346faf7841061e33495e | [
"BSD-3-Clause"
] | 6 | 2020-05-19T21:06:20.000Z | 2021-05-28T13:31:09.000Z | tests/testapp/models.py | marteinn/wagtail-automatic-move-redirects | 2321b6037d00284d447e346faf7841061e33495e | [
"BSD-3-Clause"
] | 4 | 2020-05-19T13:40:05.000Z | 2021-03-03T21:36:48.000Z | from django.db import models
from wagtail.admin.edit_handlers import FieldPanel
from wagtail.core.fields import RichTextField
from wagtail.core.models import Page
class AutomaticRedirectsTestIndexPage(Page):
subtitle = models.CharField(max_length=255, blank=True, default='')
body = RichTextField(blank=True, ... | 25.625 | 71 | 0.720325 | 445 | 0.723577 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.045528 |
9711a13f8bc8673b475c4605a1bf57d9fc492541 | 1,190 | py | Python | M4_Eval_SDK/Source/samples/python/console_window.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | 2 | 2019-03-11T15:24:51.000Z | 2022-03-07T09:42:05.000Z | M4_Eval_SDK/Source/samples/python/console_window.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | null | null | null | M4_Eval_SDK/Source/samples/python/console_window.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | 1 | 2021-03-16T08:26:05.000Z | 2021-03-16T08:26:05.000Z | import socket, sys, time, colorama, os
from threading import *
colorama.init(autoreset=True)
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = "localhost"
port = int(sys.argv[1])
try:
serversocket.bind((host, port))
except Exception as e:
import traceback
print("An error occurred whi... | 28.333333 | 94 | 0.610084 | 539 | 0.452941 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.187395 |
97127268ae73df5b3be209c30b4a2132ec27b166 | 1,517 | py | Python | src/day11.py | chao-mu/aoc2021 | 9cb0590a8de100f260a78f22e50d00d6acb13ae4 | [
"CC0-1.0"
] | null | null | null | src/day11.py | chao-mu/aoc2021 | 9cb0590a8de100f260a78f22e50d00d6acb13ae4 | [
"CC0-1.0"
] | null | null | null | src/day11.py | chao-mu/aoc2021 | 9cb0590a8de100f260a78f22e50d00d6acb13ae4 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
from aoc2021.util import print_solutions, import_matrix
from math import inf
def part_1(dumbos):
flashes = 0
for _ in range(100):
for coord in dumbos:
dumbos[coord] += 1
flashed = set()
for coord, dumbo in dumbos.items():
if coord not in... | 20.780822 | 89 | 0.544496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.083059 |