repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idlecool/freshdomainnames-GAE | 11,871,289,625,605 | 7910a91ccbcd3459c40be0eeb3d1f96b097a2a6b | e961c29c4d496f2e3d3f8c928453b0a00a82d236 | /worldnews.py | 735557a538c678e35ee77eebb4c6057511cfad4f | [] | no_license | https://github.com/idlecool/freshdomainnames-GAE | 5282da34dad7142dce6c6aae422b8d802f5089f3 | d8db3988733d26de823c38c918031e4d53d87cb1 | refs/heads/master | 2021-01-18T10:27:51.908710 | 2010-12-10T12:04:59 | 2010-12-10T12:04:59 | 1,123,545 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
""" retrieve random words from news feeds """
import urllib
import random
import re
from BeautifulSoup import BeautifulStoneSoup
stream = ""
def _worldnews():
# webservice = 'http://www.thehindu.com/sci-tech/technology/?service=rss'
webservice = 'http://www.thehindu.com/news/internati... | UTF-8 | Python | false | false | 2,153 | py | 10 | worldnews.py | 6 | 0.669763 | 0.660474 | 0 | 73 | 28.493151 | 77 |
smullinmatteo/One-Month-Coursework | 2,491,081,070,409 | dfdef9f20135813eefa9fc66875e2dcb64b382bd | 8d7337b3eca5ac8c9c971f1b36ed42469ea89578 | /Python Coursework/tip-caplculator.py | c033d86da67ed1a9d509e41aa27ef09c09ff2354 | [] | no_license | https://github.com/smullinmatteo/One-Month-Coursework | 7798302cc01226641e2c6f4390410386e4b9abf9 | 75c9d5611fde38ae63e36bf4745ef222361bdf22 | refs/heads/main | 2023-06-03T15:36:53.943019 | 2021-06-18T17:42:22 | 2021-06-18T17:42:22 | 368,909,800 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #takes the bill amount from user and then suggests three bill+tip totals for 12,15, and %20 for the user
bill_amount = float(input("What is the bill total?").strip("$"))
print ((
f"Here are your options: "
f"12%: Tip ${bill_amount*.12:.2f} | Total ${bill_amount*1.12:.2f}, "
f"15%: Tip ${bill_amount*.15:.2f} | Tota... | UTF-8 | Python | false | false | 420 | py | 33 | tip-caplculator.py | 13 | 0.638095 | 0.559524 | 0 | 10 | 41.1 | 104 |
James120393/comp110-worksheets | 16,904,991,282,448 | cc1b61741f14b782f84815ebf3b00aa0532e346b | a2d6b96f1a629693db178fb42614f6c811d288be | /comp110-worksheet-3/WebServer/webserver.py | f5ca771b62479cbc5c242057f59489865d632e8e | [] | no_license | https://github.com/James120393/comp110-worksheets | 3be49a81811e14995f9640f905b534792460f685 | 8865ac18e9af72074dffe2960b601df75ac0e5c1 | refs/heads/master | 2021-01-18T13:28:36.283612 | 2016-05-30T15:40:13 | 2016-05-30T15:40:13 | 43,420,629 | 0 | 0 | null | true | 2015-09-30T08:16:28 | 2015-09-30T08:16:28 | 2015-09-30T07:54:37 | 2015-09-30T08:07:46 | 0 | 0 | 0 | 0 | null | null | null | #!/usr/bin/python
# Turn on debug mode.
import cgitb
cgitb.enable()
print("Content-Type: text/html; charset=utf-8\n\n")
import cgi
form = cgi.FieldStorage()
if 'user' not in form:
print ("Something Went Wrong")
else:
print ("Hello" + str(form.getvalue("user")))
# Connect to the database.
import pymysql
conn = p... | UTF-8 | Python | false | false | 917 | py | 20 | webserver.py | 15 | 0.666303 | 0.65867 | 0 | 38 | 23.131579 | 81 |
jandrovins/Taller2ProyectoIntegradorI | 5,033,701,717,033 | 3eb2130cbcf76c182f4f8955c9fabdf9c73760ce | cc6d3210265037d7d4a34619a033efadac2ce1fc | /measure/views.py | 55306840ae498a96d554850c345c59bb0f1af7a8 | [] | no_license | https://github.com/jandrovins/Taller2ProyectoIntegradorI | 2ddbb8ccef44fb08a9bcdb699d62e634c751c789 | 368c32a85c2fba8436725340a578763180129cd1 | refs/heads/master | 2022-07-20T17:33:15.964850 | 2020-05-19T21:23:35 | 2020-05-19T21:23:35 | 255,716,097 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse,HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
import requests
def measure(request):
error = False
# Verifica si hay un parámetro value en la petición POST
if request.method == ... | UTF-8 | Python | false | false | 1,127 | py | 2 | views.py | 1 | 0.637011 | 0.615658 | 0 | 29 | 37.758621 | 90 |
krishna0512/benchmark | 10,977,936,433,867 | 3ca9fe525791d63201d6d4b00ab3340c62ee72cc | 2a431aed19c3a37381e1bbeb0295531c39bdd1b2 | /benchmark/views.py | e9f988c995727886aef0e2edfa25a0cf21095b9a | [] | no_license | https://github.com/krishna0512/benchmark | 2e84925f08880ad7271a379fec379016cae90e6c | a6962ea5f35c387cbb55d4008ccbdd57a180120f | refs/heads/master | 2020-04-08T14:54:08.715927 | 2019-01-12T09:09:27 | 2019-01-12T09:09:27 | 150,698,627 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import render, redirect
from django.urls import reverse
... | UTF-8 | Python | false | false | 8,815 | py | 148 | views.py | 44 | 0.645604 | 0.642428 | 0 | 216 | 39.810185 | 102 |
attilapalfi92/machine-learning-ingatlancom-predictor | 10,969,346,515,784 | 799ab0fcf1eda2d2b38a22d6275280fc3a7cd9ec | 68fdbd773931c072da76c7fe9b28a4117f801f33 | /constants.py | 4a9dc2c021f9e09f483aa426470a552b7998449a | [] | no_license | https://github.com/attilapalfi92/machine-learning-ingatlancom-predictor | a766197af710e0a690d4136ad0a0845ada7202cc | 25748d212e497b25d7bcf42560b875805f4a2dc7 | refs/heads/master | 2022-07-20T08:40:29.223785 | 2019-01-28T09:31:03 | 2019-01-28T09:31:03 | 122,330,260 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | BUILDING_MATERIAL = (
("Csúszózsalus lakás bérleti joga eladó", "Csúszózsalus lakás bérleti joga eladó"),
("Eladó csúszózsalus lakás", "Eladó csúszózsalus lakás"),
("Eladó panel lakás", "Eladó panel lakás"),
("Eladó tégla építésű lakás", "Eladó tégla építésű lakás"),
("Panel lakás bérleti joga eladó... | UTF-8 | Python | false | false | 4,212 | py | 48 | constants.py | 19 | 0.652208 | 0.652208 | 0 | 89 | 41.741573 | 89 |
jbwyme/flask-proxy-example | 12,249,246,766,972 | f5a547a2dc7b68d3f57bf28fd78e6e0f681df473 | 09f36de5cef13064d0654258fc864d5cfe4462ed | /flask_proxy/tests/test_mixpanel_calls.py | 4658f7b0477a14efe379c8e9d1cda72771c435c5 | [] | no_license | https://github.com/jbwyme/flask-proxy-example | e0666d719630a9dc604845989e79de7d985e9829 | ddc83f40d8b54da51837438363e7b017e199234c | refs/heads/master | 2023-03-01T20:06:54.316465 | 2021-02-11T18:41:57 | 2021-02-11T18:41:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import base64
import json
import urllib
event_data = {
'event': 'test event',
'properties': {
'token': '6888bfdec29d84ab2d36ae18c57b8535',
'str': 'string',
'int': 1,
'float': 1.235,
'object': {'one': 1, 'two': 2},
'list': ['one', 'two'],
}
}
event_encoded = ... | UTF-8 | Python | false | false | 854 | py | 2 | test_mixpanel_calls.py | 2 | 0.569087 | 0.521077 | 0 | 30 | 27.466667 | 98 |
minhphung171093/phucthien | 15,925,738,740,052 | bbee8364e921c0779541a28fd7f3c7edcc5fbf60 | c14f0bce37cfaf376b33d9d99cb6ec452a8563e4 | /addons-phucthien/green_erp_phucthien_hr/hr_payroll.py | c84093fc852e3c3ae34be8783d613b04798be212 | [] | no_license | https://github.com/minhphung171093/phucthien | 3f3975a60419441ec8d3bbdb8d21583e588d9b95 | 4547374db8d25eca082c4a13e23d5752104bd79c | refs/heads/master | 2016-09-11T02:30:28.840903 | 2015-10-05T04:33:48 | 2015-10-05T04:33:48 | 28,329,699 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
import time
from openerp import pooler
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, DATE... | UTF-8 | Python | false | false | 4,246 | py | 295 | hr_payroll.py | 159 | 0.566171 | 0.561925 | 0 | 99 | 41.757576 | 196 |
dovietdungcntt1402/demopy | 2,525,440,809,251 | 0e948f7631c7299b8faf21d65df6fd0e58b8596c | 5f53d6241f6d3c9e00bfcbf91b64ffdcaad57e24 | /Untitled-1.py | f79e3f227609aec4fac130b938522213a487f28c | [] | no_license | https://github.com/dovietdungcntt1402/demopy | 005c599804c9d7a0ab0367fcc602027c2dd89de8 | d73cf22628de6841dd3a88f2174482dbc557f62b | refs/heads/master | 2023-08-01T00:33:17.684197 | 2021-09-11T04:55:17 | 2021-09-11T04:55:17 | 405,286,593 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print("nhập vào 1 số")
n=int(input())
flag= true
if ( n < 2):
flag = false
elif (n == 2):
flag = true
if ( n % 2 == 0):
flag = false
else:
for i in range(3,n,2):
if (n % i == 0 ):
flag=false
if flag == false
print(n,"là số nguyên tố")
else
print( n, "không phải") | UTF-8 | Python | false | false | 322 | py | 2 | Untitled-1.py | 2 | 0.496753 | 0.470779 | 0 | 17 | 17.176471 | 30 |
bodii/test-code | 8,924,942,083,991 | 4c4490d0191e77e7139b2b3b621b616295799b09 | 4e89d371a5f8cca3c5c7e426af1bcb7f1fc4dda3 | /python/Flask_web/app1/model/post.py | 9fdda7ea8d136aaa27e5fc4ee35f3da93022c7c7 | [] | no_license | https://github.com/bodii/test-code | f2a99450dd3230db2633a554fddc5b8ee04afd0b | 4103c80d6efde949a4d707283d692db9ffac4546 | refs/heads/master | 2023-04-27T16:37:36.685521 | 2023-03-02T08:38:43 | 2023-03-02T08:38:43 | 63,114,995 | 4 | 1 | null | false | 2023-04-17T08:28:35 | 2016-07-12T01:29:24 | 2023-01-07T16:01:52 | 2023-04-17T08:28:30 | 29,190 | 2 | 0 | 7 | Go | false | false | #!/usr/bin/env python3
#-*- coding:utf-8 -*-
''' 博客文章模型 '''
from main import db
from datetime import datetime
# 将文章的Markdown源文本保存的数据库中
from markdown import markdown
import bleach
class Post(db.Model):
__tablename__ = 'posts'
id = db.Column(db.Integer, primary_key=True)
body = db.Colum... | UTF-8 | Python | false | false | 1,752 | py | 4,003 | post.py | 2,624 | 0.536557 | 0.530071 | 0 | 52 | 30.615385 | 74 |
dnguyen85/kiilib_python | 4,982,162,082,970 | 819d780a1daf39e72badff838fa096151c6e04a3 | 7bfa5f949e031f924c916a3955081a5f3fd71a3f | /kiilib/kii.py | 6ebd14d823397f6a6de9dfe4e7d0bb461551dea3 | [
"Apache-2.0"
] | permissive | https://github.com/dnguyen85/kiilib_python | 37c9d8b8de807d051accfd4d5c3f2c82b90f1512 | c6a70c53d4d89d6782daac8a62e91246699f2abf | refs/heads/master | 2020-05-29T11:03:41.795702 | 2014-09-17T13:29:30 | 2014-09-17T13:29:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import client
import kiiobject
import bucket
class KiiContext(object):
def __init__(self, app_id, app_key, url):
self.app_id = app_id
self.app_key = app_key
self.url = url
self.factory = client.KiiClientFactory()
self.access_token = None
def newClient(self):
ret... | UTF-8 | Python | false | false | 3,788 | py | 19 | kii.py | 16 | 0.546199 | 0.544351 | 0 | 132 | 27.689394 | 114 |
cs2be/VisualDL | 18,313,740,574,964 | fc9399f9e1475e7b9aa3f34582b0b027f61d6bdf | ada58cae168778afdf40aef9570a996a6ae7180f | /visualdl/server/storage_mock.py | 98690fd5adaa7bb5e74f686cc79553f9884cc80f | [
"Apache-2.0"
] | permissive | https://github.com/cs2be/VisualDL | 71adefa4f206d45cfa3c8d708be8e47ecf642b62 | 1574cc022746684446019091c3e99dc1cf7dacb4 | refs/heads/develop | 2021-05-10T10:08:52.915335 | 2018-02-06T19:14:10 | 2018-02-06T19:14:10 | 118,949,453 | 0 | 0 | Apache-2.0 | true | 2018-01-30T23:55:06 | 2018-01-25T18:10:48 | 2018-01-25T18:10:50 | 2018-01-30T23:53:28 | 3,014 | 0 | 0 | 0 | C++ | false | null | import random
import numpy as np
def add_scalar(writer, mode, tag, num_steps, skip):
with writer.mode(mode) as my_writer:
scalar = my_writer.scalar(tag)
for i in range(num_steps):
if i % skip == 0:
scalar.add_record(i, random.random())
def add_image(writer,
... | UTF-8 | Python | false | false | 1,176 | py | 21 | storage_mock.py | 12 | 0.547619 | 0.529762 | 0 | 38 | 29.947368 | 66 |
predictable-success/predictable_success | 790,274,001,807 | 809294c22cca9ab2286b222447d3be62bc971a9c | 6d9112d77b2864ac2d4b8b3135149f1c8eb07901 | /leadership_styles/migrations/0011_auto_20160914_1427.py | 8b8d40ba5ba37daf82efcb82fac1e3e79f7c72bf | [] | no_license | https://github.com/predictable-success/predictable_success | 77b880cefe0fe363572bc43f72ac558c405c820e | 7cdbdcd5686781b4ac8bf4a3cd60c34ac4cee0f5 | refs/heads/master | 2021-01-19T01:09:10.251217 | 2017-05-05T17:39:29 | 2017-05-05T17:39:29 | 64,931,697 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('leadership_styles', '0010_auto_20160914_1039'),
]
operations = [
migrations.AlterField(
model_name='teamleadersh... | UTF-8 | Python | false | false | 761 | py | 354 | 0011_auto_20160914_1427.py | 159 | 0.629435 | 0.607096 | 0 | 24 | 30.708333 | 135 |
danielhensilva/exercism | 10,797,547,789,090 | 14f8130ba480dc319ea38a03f5209aeb7401d8a2 | 4b5d084d8fb4d34aec7ff500ceb41af18d36cace | /python/armstrong-numbers/armstrong_numbers.py | fc9f144444e1407a375fe832a4126867f262d86e | [] | no_license | https://github.com/danielhensilva/exercism | beb3a4b655a2a82bc61a331e9e7bd1f71f89883c | 92bdd05299bd8c48209e5320f4f037f194dca2af | refs/heads/master | 2023-06-16T12:17:12.868664 | 2021-07-07T06:30:26 | 2021-07-07T06:30:26 | 115,460,736 | 0 | 0 | null | false | 2021-04-05T14:25:08 | 2017-12-26T22:59:12 | 2021-04-05T14:24:48 | 2021-04-05T14:25:06 | 3,227 | 0 | 0 | 0 | JavaScript | false | false | import math
def is_armstrong(number):
result = 0
expected = number
power = math.floor(math.log10(number) + 1)
while number > 0:
digit = number % 10
number -= digit
number /= 10
result += pow(digit, power)
return result == expected
| UTF-8 | Python | false | false | 288 | py | 142 | armstrong_numbers.py | 52 | 0.569444 | 0.538194 | 0 | 15 | 18.133333 | 46 |
pkgcore/pkgcheck | 7,129,645,716,458 | f44c7d18acf56e6a40d1b2f4787f8e35c00812f9 | a041397bebfee1c7ed9a5d26891b9836dc350a4c | /tests/test_api.py | cf546ee556353ebfbb44447e11176b5eca986ff8 | [
"BSD-3-Clause"
] | permissive | https://github.com/pkgcore/pkgcheck | d0912fcdfce08d840d40fbbaaab404c79c444a1c | a159aca5222ca9ef08087ee7aa16325fe136080a | refs/heads/master | 2023-09-01T18:47:21.862067 | 2023-09-01T15:49:58 | 2023-09-01T15:49:58 | 13,432,888 | 27 | 33 | BSD-3-Clause | false | 2023-09-14T11:04:33 | 2013-10-09T04:17:55 | 2023-03-12T22:21:41 | 2023-09-14T11:04:25 | 6,568 | 29 | 26 | 94 | C | false | false | import multiprocessing
import os
import signal
import pytest
from pkgcheck import PkgcheckException, scan
from pkgcheck import objects
class TestScanApi:
@pytest.fixture(autouse=True)
def _setup(self, testconfig):
self.base_args = ["--config", testconfig]
self.scan_args = ["--config", "no", "... | UTF-8 | Python | false | false | 2,468 | py | 802 | test_api.py | 114 | 0.58671 | 0.584279 | 0 | 74 | 32.351351 | 80 |
enesdurmus/Infected_Mario | 7,782,480,778,552 | d7c0416ec740b18faa6d6cec64bc5656b178c3d0 | 6109fdd0410fdf4f7ad033cfbbc375d029f61356 | /Elements.py | 88959361c4b8c63527bdc2aa5bfdff81b291b8e3 | [] | no_license | https://github.com/enesdurmus/Infected_Mario | d1353416c726d8ed692660e7e9146d93f15b053a | 584dc280f2b4806d9b4667a35e4e5b952ef2e5d0 | refs/heads/master | 2022-12-29T10:08:20.920430 | 2020-10-15T14:15:29 | 2020-10-15T14:15:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame
class Element(pygame.sprite.Sprite):
def __init__(self, width, height, image_path, x=0, y=0):
super(Element, self).__init__()
self.width = width
self.height = height
self.image = pygame.image.load(image_path)
self.image = pygame.transform.scale(self.ima... | UTF-8 | Python | false | false | 1,235 | py | 7 | Elements.py | 3 | 0.510931 | 0.503644 | 0 | 44 | 25.977273 | 72 |
avkim/kdcount | 12,515,534,750,857 | b1676dabdf353e29fbe54bdeb22324662590f8f8 | 0685ad05fdfe84d11c608c517f5cacd6e805b77b | /kdcount/cluster.py | 16f6405bb70f71368c7d9bf425fe43239b4b0af8 | [] | no_license | https://github.com/avkim/kdcount | 8e45f66f5084c47d70428d1ed8c2da7502140ca0 | fe565d59bcf8f87c9a24c32451829990c18df8d3 | refs/heads/master | 2017-04-30T08:06:18.735555 | 2014-12-10T23:40:59 | 2014-12-10T23:40:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy
from models import dataset
import utils
from sys import stdout
class fof(object):
def __init__(self, data, linking_length, np=None, verbose=False):
self.data = data
self.linking_length = linking_length
# iterations
self.iterations = 0
perm = utils.empty(len(data... | UTF-8 | Python | false | false | 6,118 | py | 16 | cluster.py | 8 | 0.471559 | 0.459791 | 0 | 165 | 36.072727 | 72 |
Escalation99/Workev | 1,657,857,407,024 | 015d14a1c4fa69e59ece763163c60e14178fdb58 | 782efe22f3251a701796e68e82fbce27c2ce2d8f | /Employee/migrations/0046_auto_20200719_1500.py | 7e8a9308ba9fa006f160cb55ed4fd2dc40b3ab2d | [] | no_license | https://github.com/Escalation99/Workev | ffc10e64776bf90d206a4a7a8ef3655c22f0223b | c2312c54c152b823e991ef5955b5d2df7ff58222 | refs/heads/main | 2023-03-13T05:36:54.386719 | 2021-03-06T10:27:06 | 2021-03-06T10:27:06 | 310,613,595 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-07-19 08:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Employee', '0045_auto_20200712_2050'),
]
operatio... | UTF-8 | Python | false | false | 2,133 | py | 73 | 0046_auto_20200719_1500.py | 26 | 0.607126 | 0.585091 | 0 | 41 | 51.02439 | 447 |
tipech/spatialnet | 8,306,466,761,794 | bbf62644d57483af2f5124c4746e4665919f8350 | 413b5df0d34e63d264a2407a178b19c4370ad18d | /common/generic/iterators/__init__.py | 377c380f884fde69b349c85d62797513744b6a30 | [] | no_license | https://github.com/tipech/spatialnet | c1f21890ef01dca55c5e34ff77f962c70165c9d5 | 0394980efc628bfedd4fd504079a534418cbb89a | refs/heads/main | 2023-04-07T00:26:14.378092 | 2021-04-29T18:41:30 | 2021-04-29T18:41:30 | 301,519,197 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
from .base_stream import *
# from .spatial_stream import *
# from .temporal_stream import *
| UTF-8 | Python | false | false | 120 | py | 48 | __init__.py | 46 | 0.683333 | 0.683333 | 0 | 5 | 22 | 32 |
OlgaRabodzei/ikea_availability | 19,490,561,597,777 | 0be8712c3232c42279e5ff7dc8e60e5854515c53 | 0149513b56e6c3de5e94ce9dab4ac2f539402be8 | /ikea_availability_api.py | 8431024e27b45213ba2ea1073193a01b074079c9 | [] | no_license | https://github.com/OlgaRabodzei/ikea_availability | 834d25bc13c41d3c798b1ff901376bb9d4b23109 | 08cf9b9467f26648f108634c010d3b2600eca875 | refs/heads/main | 2022-12-24T06:48:45.166021 | 2020-10-07T16:11:40 | 2020-10-07T16:11:40 | 301,714,544 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
from xml.etree import ElementTree
# product_id_low_availability = '50219044'
# product_id_high_availability = '90263902'
class IkeaAvailability:
def __init__(self, product_id):
url_base = 'https://www.ikea.com/ua/uk/iows/catalog/availability/'
response = requests.get(url_base + pr... | UTF-8 | Python | false | false | 1,700 | py | 3 | ikea_availability_api.py | 2 | 0.618375 | 0.607185 | 0 | 42 | 39.428571 | 91 |
kingianfong/battleship-plus | 4,406,636,451,411 | cfc098fbf2b03885566f2190957d0f9a0c506bcc | 9d42cd3ef7de195d2c54b7c5f1593e74b56918da | /gui.py | 84bb189a595abda86eada806e4083890b18d7032 | [] | no_license | https://github.com/kingianfong/battleship-plus | 3907b353bd87e9ea1d1eadcab1a17c969e58c678 | 231eb575b6c7c772aeb1de16b7cf01571ac513ef | refs/heads/master | 2022-01-20T22:13:21.029569 | 2019-07-21T14:33:58 | 2019-07-21T14:33:58 | 198,060,877 | 1 | 1 | null | false | 2019-07-21T14:32:34 | 2019-07-21T13:39:26 | 2019-07-21T13:39:29 | 2019-07-21T14:32:34 | 0 | 0 | 0 | 0 | null | false | false | import matplotlib.pyplot as plt
import warnings
from board import *
from matplotlib import style
warnings.filterwarnings("ignore") # ignores matplotlib warning
style.use("seaborn") # sets style for plots
def colour(state_number):
""" Returns the character corresponding to a specific colour. """
colours = ['... | UTF-8 | Python | false | false | 3,055 | py | 8 | gui.py | 6 | 0.520786 | 0.500491 | 0 | 93 | 31.849462 | 84 |
LiamLowndes/CodeSignal-Solutions | 6,347,961,698,144 | 7647a25eba798431991e276c6d647c9622e051c1 | 27c45093ffdb65758b1f7e69825187710fe3e9e4 | /isCryptSolution/Answer.py | 6bed2b1ad057960aa0b760d17ed697be88fa469d | [] | no_license | https://github.com/LiamLowndes/CodeSignal-Solutions | f4f805d0bb6c4129968053248789cae6c048be30 | 37bcaee0785e8f63217cf5f8b9eb7fcaa783361a | refs/heads/master | 2021-01-26T07:16:49.514708 | 2020-03-01T18:01:42 | 2020-03-01T18:01:42 | 243,362,165 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def isCryptSolution(crypt, solution):
combo = []
#make combo a list of the three numbers seperated by "_"
for i in range(3):
for j in crypt[i]:
for k in solution:
if k[0] == j:
combo.append(k[1])
break
combo.append("_")... | UTF-8 | Python | false | false | 1,212 | py | 6 | Answer.py | 5 | 0.512376 | 0.490099 | 0 | 47 | 24.787234 | 94 |
hetacharya12/hetresume | 11,982,958,787,061 | 8b009c883b0e7b2988d400f61a71b9f5b5451492 | 27e182a66490e1285646d4c2dfa55a0c175a4cb1 | /Jobs/views.py | 629b035295d3bd482ee2857a80b7c5bf4f48ac6f | [] | no_license | https://github.com/hetacharya12/hetresume | 7995417daf65ccf26c9d1cac79be97cde23b3ed7 | 909391885d31588ef216800381443c2d69e695d4 | refs/heads/master | 2020-03-27T12:06:50.676652 | 2018-09-19T19:34:31 | 2018-09-19T19:34:31 | 146,526,941 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
from .models import Job, Myimage
from datetime import datetime
def diff_month(d1, d2):
return (d1.year - d2.year) * 12 + d1.month - d2.month
def home(request):
jobs = Job.objects
images = Myimage.objects
no_of_months=diff_month(datetime.now(), datetime(2014,7,7))+20... | UTF-8 | Python | false | false | 488 | py | 5 | views.py | 3 | 0.692623 | 0.657787 | 0 | 14 | 33.857143 | 90 |
PalytoxinRK/DeepLearningFlappyBird | 2,817,498,581,781 | 1a7fcff2884ac1196b668bb15a40a2e4ca5e700f | 10a50f83677a26bb1e451d9f9f63c340ffe83a61 | /DQN-NATURE.py | b6a3feab6954d62fbc1b97c9024b1466af95aca4 | [] | no_license | https://github.com/PalytoxinRK/DeepLearningFlappyBird | 544fabd46e5b0cdd97b527ce31dce6c61b837bac | 0dd48407d98eb8fb5c10a247e578028d7019ec71 | refs/heads/master | 2020-05-26T09:34:09.489370 | 2019-05-23T07:58:37 | 2019-05-23T07:58:37 | 188,187,929 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
from __future__ import print_function # 新版本特性
import tensorflow as tf
import cv2
import sys
sys.path.append("game/")
import wrapped_flappy_bird as game
import random
import numpy as np
from collections import deque # 双端队列
# 参数
GAME = 'bird' # 游戏名称
ACTIONS = 2 # 动作种类 上or下
GAMMA = 0... | UTF-8 | Python | false | false | 11,414 | py | 3 | DQN-NATURE.py | 2 | 0.671439 | 0.627672 | 0 | 266 | 34.729323 | 372 |
CedricLeon/scripts | 2,001,454,799,715 | c3b43461b7c75446311033eda2e81f23ddbfa852 | 42e30e13c182e8afa0b6406b773d8a1a805ac65b | /python/database/balance_10CSV-dtb_from_unbalanced.py | 5a1ab4f88fb57524af860dcbd321cbda8bbc9869 | [] | no_license | https://github.com/CedricLeon/scripts | b498c5526f4ea38bcdf1c8bd2ac7a7e3028c3042 | 1f231c0fbbc4d2ab57f9c847bfeb25275a97d4f4 | refs/heads/master | 2023-07-09T10:43:09.754505 | 2021-08-20T12:47:30 | 2021-08-20T12:47:30 | 379,915,028 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import os
import numpy as np
from tqdm import tqdm
from os import listdir
from os.path import isfile, join
import shutil
import csv
import time
import re
import math
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
F... | UTF-8 | Python | false | false | 5,458 | py | 27 | balance_10CSV-dtb_from_unbalanced.py | 24 | 0.570722 | 0.552767 | 0 | 150 | 35.386667 | 368 |
codenation-dev/squad-6-ad-python-women-magalu-1 | 19,550,691,155,921 | 9dfefa82a8b4f97f528309cb1b5f8b6ab5b7d0d6 | 37cd91d9d795c49e1a1da77b4b40ff42e387dd20 | /central-erros/errorcenter/api/serializers.py | 4e3125349426a70b8ffa7841beab9add7e7a5966 | [] | no_license | https://github.com/codenation-dev/squad-6-ad-python-women-magalu-1 | 07afba99044246e0b701f3a996bd4bc770b39771 | 5d702bb8ee19fcfcd954bab2cba763283cfa4306 | refs/heads/master | 2022-12-17T09:27:07.690706 | 2020-06-06T09:20:06 | 2020-06-06T09:20:06 | 204,016,066 | 0 | 3 | null | false | 2022-12-08T02:35:19 | 2019-08-23T14:39:01 | 2020-06-06T09:20:09 | 2022-12-08T02:35:19 | 8,041 | 0 | 2 | 7 | CSS | false | false | from rest_framework import serializers
import django.contrib.auth.password_validation as validators
from django.contrib.auth.models import User
from django.dispatch import receiver
from django.core import exceptions
from django.db import models
from django.views.decorators.csrf import csrf_exempt
from .models import (... | UTF-8 | Python | false | false | 2,145 | py | 13 | serializers.py | 7 | 0.591142 | 0.591142 | 0 | 75 | 27.6 | 71 |
caglaruba/Company-Management-backend-Python-Django | 1,786,706,426,016 | 25301e75c4b50dc1ad1b80253f24fe885fc7a0e1 | 76e64405b7e51f1b6e630538769ea9b2205b3c5c | /models/permission.py | e43cc18662c7a59cfa13a54ff404753814d026cd | [] | no_license | https://github.com/caglaruba/Company-Management-backend-Python-Django | dbe962598da32e6ad9779a60db800fe1b0aa892c | e0ed001c22f1f7b231d7d9cf6f0d566cfff3a745 | refs/heads/master | 2022-02-15T05:28:56.378600 | 2016-10-29T06:47:33 | 2016-10-29T06:47:33 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.orm import backref
from models import Base
class Permission(Base):
__tablename__ = "permission"
id = Column(Integer, primary_ke... | UTF-8 | Python | false | false | 623 | py | 31 | permission.py | 28 | 0.757624 | 0.752809 | 0 | 19 | 31.789474 | 108 |
JPAkira/Ez4Admin | 953,482,778,762 | 3338613d8b1759ce4fc4ed81c12f31e65f091b49 | 123fb9317cfbe8a250bb64e2ffc721d1224ad7ec | /apps/vendas/views/salvar_produto_na_venda.py | 3a1306fda9a8d904477656f88815f72bb629521e | [] | no_license | https://github.com/JPAkira/Ez4Admin | d0d63462b289ed59ebd57a39ecd14badbd6fc312 | 059d72878a75522271c886b04025814213429617 | refs/heads/main | 2023-04-29T22:25:12.150675 | 2021-05-23T23:55:24 | 2021-05-23T23:55:24 | 370,127,119 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import messages
from django.shortcuts import redirect
from apps.estoque.models import Produto
from apps.vendas.models import Venda, Produto_Venda
def salvar_produto(request):
'''Autenticando o acesso a pagina'''
if not request.user.is_authenticated:
return redirect('login')
''... | UTF-8 | Python | false | false | 1,944 | py | 66 | salvar_produto_na_venda.py | 48 | 0.665635 | 0.664603 | 0 | 52 | 36.288462 | 107 |
ahujaradhika/jkim | 8,830,452,787,259 | 53aa9881bcaf14202a1adde48a284fe8fc8d6b7d | 09486b2afc10f1e6b02b6475d37c15971f7a6e31 | /fit_meta_d_SSE.py | 24d675a035eb458295bd621a3a5e0b433e0456a0 | [] | no_license | https://github.com/ahujaradhika/jkim | 17260d1cda570a2389f6b9edaa3433f76778b22d | 7396188329cc37b1e6d1cb00df447ccd696911f1 | refs/heads/main | 2023-02-20T12:07:52.812309 | 2021-01-13T09:04:48 | 2021-01-13T09:04:48 | 323,440,378 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 26 13:23:43 2017
fit = fit_meta_d_SSE(obs_HR2_rS1,
obs_FAR2_rS1,
obs_HR2_rS2,
obs_FAR2_rS2,
cprime,
s,
d_min,
... | UTF-8 | Python | false | false | 6,757 | py | 13 | fit_meta_d_SSE.py | 8 | 0.596567 | 0.552908 | 0 | 223 | 29.278027 | 91 |
kshirsagarsiddharth/Algorithms_and_Data_Structures | 7,670,811,614,499 | 553b69562942e52d08524d87dcd8b3841b82e899 | 246acaa90888e81caea746940dba68f93682ee5c | /Tree/AVL_TREE/minimum_nodes_in_avl_tree.py | 6cc9f8a18b374c02d06fcde99acffb31f44b1281 | [] | no_license | https://github.com/kshirsagarsiddharth/Algorithms_and_Data_Structures | 17fcbede52f58fe561cdf5387e2914fb1c62496e | 48560d8a4608383849dfa2d61289d3021bf79510 | refs/heads/master | 2021-05-21T22:08:51.573746 | 2021-01-16T07:20:04 | 2021-01-16T07:20:04 | 252,822,788 | 0 | 0 | null | false | 2020-04-21T22:38:32 | 2020-04-03T19:35:57 | 2020-04-21T22:25:57 | 2020-04-21T22:38:31 | 52 | 0 | 0 | 0 | Python | false | false | def AVLnode(height):
if height == 0:
return 1
elif height == 1:
return 2
return (1 + AVLnode(height - 1) + AVLnode(height - 2))
def rangeCount(root,a,b):
if root == None:
return 0
elif root.data > b:
return rangeCount(root.left,a,b)
elif root.data... | UTF-8 | Python | false | false | 488 | py | 216 | minimum_nodes_in_avl_tree.py | 212 | 0.559426 | 0.538934 | 0 | 18 | 25.222222 | 73 |
pepetreshere/odoo-ecuador-contabilidad | 2,216,203,147,442 | 18c998c2605916cf82a5fa0f90d315fb981ec414 | fb166da6760f57a292d23f072eea3cba01df004d | /ecua_invoice/__openerp__.py | 316397d80489c464f49fe53702437f9fc9ddb96a | [] | no_license | https://github.com/pepetreshere/odoo-ecuador-contabilidad | ab39ae90f6c06b66881b674482e3f41044c41d85 | 97a45d4c1be8eba0c7ea76ed2cd76b46a58cf7a0 | refs/heads/master | 2021-01-18T19:31:55.280085 | 2015-09-03T23:09:39 | 2015-09-03T23:09:39 | 9,312,068 | 5 | 10 | null | false | 2015-10-20T14:11:26 | 2013-04-09T03:09:40 | 2015-10-12T16:39:27 | 2015-10-20T14:10:53 | 5,218 | 5 | 4 | 2 | Python | null | null | # -*- encoding: utf-8 -*-
########################################################################
#
# @authors: Andres Calle, Andrea García
# Copyright (C) 2013 TRESCLOUD CÍA LTDA
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published... | UTF-8 | Python | false | false | 2,506 | py | 84 | __openerp__.py | 35 | 0.581367 | 0.57617 | 0 | 70 | 34.728571 | 77 |
deets/clang-complete | 14,594,298,895,372 | 9f4aff247ad5e21ce8770e543ca0449cc0cff0d2 | 26de8ced3173349a6463d194abe93b8968505432 | /clangcomplete/robot.py | 194f112c4405dd884c02199e6600a2b6cba5f73e | [
"MIT"
] | permissive | https://github.com/deets/clang-complete | 97d36395383937a313c092b45d2b16b64173f38b | de371620f69cd93697918096c989d3b624a3bf7a | refs/heads/master | 2016-09-05T11:16:20.142274 | 2013-12-20T14:42:23 | 2013-12-20T14:42:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from abl.util import Bunch
from abl.robot import Robot
from .api import mainloop
logger = logging.getLogger(__name__)
class ClangCompleteRobot(Robot):
CONFIG_NAME = ".clang-completerc"
SEARCH_PATHS = "~"
EXCEPTION_MAILING = "diez.roggisch@ableton.com"
AUTHOR = "diez.roggisch@ablet... | UTF-8 | Python | false | false | 939 | py | 11 | robot.py | 10 | 0.545261 | 0.545261 | 0 | 38 | 23.657895 | 53 |
alexmilesyounger/dates_times_py | 17,884,243,850,426 | e072121e77d5922da4c974b50def00bdecf866c4 | 3d80cde09b253383208a13b62bbbcdc1d5fa2627 | /time_machine_second_challenge.py | 4100d06499a1b509fefb5b274eb68cc5fcb5cfc5 | [] | no_license | https://github.com/alexmilesyounger/dates_times_py | 6100161826b3324b188d5d82e9ce0b6a4d660dd3 | 3417f013b6bc0103bb24a2449967e05f2082cb1b | refs/heads/master | 2021-01-23T13:31:53.471784 | 2015-08-25T02:02:41 | 2015-08-25T02:02:41 | 40,062,258 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
starter = datetime.datetime.now()
def time_machine(my_int, my_string):
# minutes
if my_string.lower() == "minutes":
endtime = starter + datetime.timedelta(minutes=my_int)
# hours
elif my_string.lower() == "hours":
endtime = starter + datetime.timedelta(hours=my_int)
# days
elif my_string.low... | UTF-8 | Python | false | false | 527 | py | 13 | time_machine_second_challenge.py | 13 | 0.688805 | 0.683112 | 0 | 20 | 25.35 | 61 |
cerebis/pygraphistry | 4,587,025,079,422 | 46e74e55206f9828831de1e364cde47d74e5684e | fab5ff31f3dcc1a96e4c6fc10c11e7dba807333d | /setup.py | 7fd877bc88e2d848b7ef12f9b068bebdba61ef3d | [
"BSD-3-Clause"
] | permissive | https://github.com/cerebis/pygraphistry | 93da90f4a680ca098e18b8f072eed7f4a91db5b8 | bea05207c7e1c410a9f55460dca4b633e78456e2 | refs/heads/master | 2023-07-07T11:18:02.044204 | 2021-08-15T04:19:39 | 2021-08-15T04:19:39 | 396,559,421 | 0 | 0 | BSD-3-Clause | true | 2021-08-16T01:18:50 | 2021-08-16T01:13:03 | 2021-08-16T01:13:04 | 2021-08-16T01:18:50 | 118,043 | 0 | 0 | 1 | null | false | false | #!/usr/bin/env python
from setuptools import setup, find_packages
#FIXME: prevents pyproject.toml - same as https://github.com/SciTools/cartopy/issues/1270
import versioneer
def unique_flatten_dict(d):
return list(set(sum( d.values(), [] )))
core_requires = ['numpy', 'pandas >= 0.17.0', 'pyarrow >= 0.15.0', 'reque... | UTF-8 | Python | false | false | 3,256 | py | 22 | setup.py | 14 | 0.628071 | 0.615172 | 0 | 88 | 36 | 228 |
ncmiller/JobPrep | 13,941,463,868,900 | 6c05bc2d90a613c357661b8080f9dddc766bd788 | 958237ee432357df5a6fca7a281cb9988db64496 | /hackerrank/algorithms/palindrome_index.py | 27971663d828d0f6d274337ee108264f69d58072 | [] | no_license | https://github.com/ncmiller/JobPrep | a256ea458e8878303e4763f95fa1280424b197d1 | 6db2156d209bbb833fbf01f997ca4e15f7243d8a | refs/heads/master | 2016-04-22T09:05:19.004921 | 2016-04-13T16:35:14 | 2016-04-13T16:35:14 | 52,219,664 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | T = int(raw_input())
for t in xrange(T):
s = raw_input()
l = len(s)
front = 0
back = l-1
deleted = 0
delete_idx = -1
while front < back:
if s[front] != s[back]:
deleted += 1
delete_idx = front
if deleted >= 2:
break
back... | UTF-8 | Python | false | false | 805 | py | 44 | palindrome_index.py | 39 | 0.403727 | 0.37764 | 0 | 39 | 19.666667 | 31 |
deepenupreti/Phonenumbers | 13,993,003,454,266 | 8ecc13f5739377f888fe75088f595153216a06fa | 05acb6cf79bb779fdb9b870b02f96d672ddf3b44 | /program.py | 77ad9a5e6b86d56488f1906207a36c2f3a0b4588 | [] | no_license | https://github.com/deepenupreti/Phonenumbers | 73f24ed6453707c52b6e349c4bd229ec48e87737 | 2db85b66756ec3d18d85a51ec1e2cecbbf30c013 | refs/heads/master | 2023-03-13T06:34:40.721805 | 2021-03-02T12:51:26 | 2021-03-02T12:51:26 | 343,773,387 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import phonenumbers, xlrd
from phonenumbers import geocoder, carrier
def error_handling_func(phone_num):
if (phonenumbers.is_valid_number(phone_num) == True) and (phonenumbers.is_possible_number(phone_num) == True):
return 1
else:
return 0
def single_phonenumber(phone_num):
if phone_num[0] == '+':
phone_num ... | UTF-8 | Python | false | false | 1,666 | py | 4 | program.py | 4 | 0.636855 | 0.630252 | 0 | 44 | 36.704545 | 113 |
KOOKOKOK/rt | 4,707,284,197,979 | 0aefa15e6083ff8916e27ce17d846f8406c9de07 | f9a5d4bfa760d5a725878cd1306abf525c209688 | /runtime_tools/inference.py | 814611937f9796105be4071fea679c98b75fc62d | [] | no_license | https://github.com/KOOKOKOK/rt | 7b505be4582eb78616f0e4d97c8049e5d9a2461f | 94ea571ade4c9a66157cad460a7b67769f3f1a3d | refs/heads/main | 2023-02-18T06:19:07.913799 | 2021-01-14T13:11:10 | 2021-01-14T13:11:10 | 329,618,513 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import cv2
from rt.utils import common
from rt.utils.common import load_and_resize,shuffle_and_normalize
import torch
import tensorrt as trt
def inference(model,img_path):
model.eval()
img = cv2.imread(img_path)
height, width = img.shape[:2]
image_raw, image = load_and_resize(img_path,... | UTF-8 | Python | false | false | 1,667 | py | 9 | inference.py | 7 | 0.620276 | 0.609478 | 0 | 47 | 34.489362 | 108 |
h2oai/h2o-3 | 10,797,547,794,201 | 1054e2e17bae7a781b80c3edea0209f9b0b6205e | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_unique.py | c1d04b69159ce1c0253da82fad1e84c1e855ceaf | [
"Apache-2.0"
] | permissive | https://github.com/h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | false | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | 2023-09-13T16:15:03 | 2023-09-14T18:05:38 | 619,600 | 6,476 | 1,997 | 2,722 | Jupyter Notebook | false | false | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.utils.typechecks import assert_is_type
import numpy as np
from h2o.frame import H2OFrame
def h2o_H2OFrame_unique():
"""
Python API test: h2o.frame.H2OFrame.unique()
"""
python_lists = np.random.randint(-5,5, (... | UTF-8 | Python | false | false | 944 | py | 6,198 | pyunit_h2oH2OFrame_unique.py | 5,451 | 0.707627 | 0.676907 | 0 | 26 | 35.307692 | 110 |
wuhongyi/DjangoNote | 13,950,053,795,317 | af4178a577a95b7c3b6af3f7f694777dc00f1466 | 65cc6a8877896ef69dd03d7b5eee5bed56e5371f | /example/attpc-daq/web/attpcdaq/daq/migrations/0013_auto_20160613_2126.py | 7bbc6b57091023bb7220c2a4d55de96249baa7b8 | [] | no_license | https://github.com/wuhongyi/DjangoNote | 34bdb9e82fc379e19b1df0bd7c90e504fa70a40d | 81ad949ff895feda8131d8bdf5fa1439f962ae37 | refs/heads/master | 2020-05-02T17:54:12.270297 | 2019-05-22T14:37:32 | 2019-05-22T14:37:32 | 178,112,720 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-06-13 21:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('daq', '0012_experiment_user'),
]
operations = [
... | UTF-8 | Python | false | false | 1,622 | py | 246 | 0013_auto_20160613_2126.py | 114 | 0.564735 | 0.546239 | 0 | 53 | 29.603774 | 125 |
felipemanfrin/Python-Zero-ao-Zeno | 5,875,515,261,355 | 40f2a03fdb3cc15ee9bff6b2e9fa3830c34569f7 | d22a2fbb9adb82644c5665242661bad172550552 | /venv/ex76.py | 36b76c94d213f8437e8b41e09a63837d8426d53e | [] | no_license | https://github.com/felipemanfrin/Python-Zero-ao-Zeno | e98ba3e4b974e88801b8bc947f461b125bc665b8 | d6d08aa17071f77170bbd105452b0d05586131c8 | refs/heads/master | 2022-07-29T19:38:41.729178 | 2020-05-25T01:02:18 | 2020-05-25T01:02:18 | 265,356,280 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | x = tuple
c = ''
while True:
nome=str(input('Digite o nome do produto: '))
valor=float(input('Digite o valor do produto: '))
for c in range (1,):
x[c] = nome
x[c+1] = valor
continue1=str(input('Voce quer continuar[s/n]? ')).upper().strip()
if continue1 == 'SN':
break
pri... | UTF-8 | Python | false | false | 325 | py | 127 | ex76.py | 126 | 0.553846 | 0.541538 | 0 | 12 | 26.166667 | 74 |
xunzhang/soapy | 1,889,785,625,162 | d1405108c2e5ee8ec07d05a7a3a4b7786e6a0c48 | 023aaa7995d33389b9bb7e821114316fd0f11f76 | /gen_html.py | e59e483ce4353853bf95117fcd0c3cafe37ac41c | [] | no_license | https://github.com/xunzhang/soapy | 52e3e309d821b04ea46c94ef89fc30b4a6a32d20 | 48c0fed26594d92917c47c5ce238d7f082dfd862 | refs/heads/master | 2021-01-18T19:30:40.030193 | 2017-01-23T16:07:41 | 2017-01-23T16:07:41 | 63,696,212 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
import sys
try:
from optparse import OptionParser
except:
print 'optparse module required'
exit(0)
from soapy.fill import filler
#from soapy.conf import load_cfg
#from soapy.fill import fill_header, fill_footer
if __name__ == '__main__':
optpar = OptionParser()
optpar.add_o... | UTF-8 | Python | false | false | 1,281 | py | 7 | gen_html.py | 5 | 0.596409 | 0.593286 | 0 | 37 | 33.594595 | 110 |
shichao1986/daily_exercise | 14,413,910,292,577 | 98bd65505c2c7449d8e8068600e0192d1e1f7f73 | ce990caf3e29ae79796bd2675d2efa79567a711c | /logging_demo_a.py | 8d418f508f92a526f01df43d4d9d352f9db71459 | [] | no_license | https://github.com/shichao1986/daily_exercise | 8531ad046178929d30c1030a2ac0e00aacbda9d6 | eeacbac58045339141296bd68d4a82796861fd1d | refs/heads/master | 2020-04-10T16:29:12.277994 | 2019-12-08T15:53:47 | 2019-12-08T15:53:47 | 161,146,833 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
时间: 2019/10/10 16:43
作者: shichao
更改记录:
重要说明:
"""
import logging
LOGGER = logging.getLogger(__name__)
def test_logger_log_a():
LOGGER.debug('debug message:{}'.format(__name__))
LOGGER.info('info message:{}'.format(__name__))
LOGGER.warning('warning message:{}'.format(__name__... | UTF-8 | Python | false | false | 460 | py | 27 | logging_demo_a.py | 23 | 0.619266 | 0.58945 | 0 | 20 | 20.85 | 59 |
DunClickMeBro/teamcornertable | 10,385,230,971,774 | 8f71fe79b7f96fe2e549df538c6fa8b3b453a861 | e38f58f3922cb43cc164f5a74e49bee4b0ab91af | /Testing Folder/Bottom Frame.py | 60425c0d26b9ad2f4d50f60a2d8b420bc4e9a983 | [] | no_license | https://github.com/DunClickMeBro/teamcornertable | c61a08c3817d890e9731c6de624d87e23fedfa53 | b178f4b972429a6d816d27f2e0d6cac61edcee21 | refs/heads/master | 2016-06-01T09:12:12.925490 | 2015-04-16T04:51:15 | 2015-04-16T04:51:15 | 29,829,309 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'Michael'
# currently not used since I realized I had to change it for each page
# create another frame(bottom) to hold a enter and done buttons
bottomframe = Frame(parent, bd=2, relief=SUNKEN)
bottomframe.grid(row=7, column=0, sticky="e", columnspan=20)
enterbutton = Button(bottomframe, text='Enter')... | UTF-8 | Python | false | false | 473 | py | 31 | Bottom Frame.py | 30 | 0.735729 | 0.716702 | 0 | 15 | 30.533333 | 70 |
lucasugarcia/email-dispatcher | 14,147,622,314,021 | 719215056c838885538d432b057ca56e080c686a | 49c49578b659f24df821904d6b27e61ccddd9e64 | /dispatcher.py | d29858d1627ec0be54e6318137ca585aab344e43 | [] | no_license | https://github.com/lucasugarcia/email-dispatcher | 684c91e699a004df69112c087c2e7fd6dd48134c | f6a002a3e200f714ddc986ce8b73d38b94fb6181 | refs/heads/master | 2020-07-09T03:29:43.529473 | 2019-08-22T19:59:51 | 2019-08-22T19:59:51 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
import smtplib
emails_destino = ["email1@email", "email2@email"]
email_origem = "seuemail@email"
password = "asenhadoseuemail"
assunto = "Assunto do e-mail"
de = "Seu Nome... | UTF-8 | Python | false | false | 1,098 | py | 1 | dispatcher.py | 1 | 0.708561 | 0.704007 | 0 | 39 | 27.179487 | 82 |
Shehan29/MagicHand | 9,620,726,771,443 | 6cfef3f97b47f33df1b621c18184be77df9e1a18 | b42e07a20e7140db0f46d4a09ee8e9742be3a336 | /tracking/rotations.py | 7565941c710354552b4e276b7a4e37a41ee4efc6 | [] | no_license | https://github.com/Shehan29/MagicHand | b8ca7875f17325b4144b6c34975a1dd37cbc4868 | 8fccac033771fdf2f53fb41536b7a9d3136ae0a7 | refs/heads/master | 2021-03-30T18:22:12.131980 | 2018-04-30T04:02:46 | 2018-04-30T04:02:46 | 123,230,141 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from math import sin, cos, radians
import cv2
def rotate_image(image, angle):
if angle == 0: return image
height, width = image.shape[:2]
rot_mat = cv2.getRotationMatrix2D((width/2, height/2), angle, 0.9)
result = cv2.warpAffine(image, rot_mat, (width, height), flags=cv2.INTER_LINEAR)
return result... | UTF-8 | Python | false | false | 973 | py | 5 | rotations.py | 4 | 0.600206 | 0.501542 | 0 | 21 | 45.333333 | 182 |
gberriz/datarail-2.0 | 6,940,667,156,850 | 0ab631010330d3737e873612a694157da3a6f2d5 | 8fdcf5600565d44931013553a3edf1b41047cb3d | /src/keymapper.py | 391fa56bee2afec1dcfba1c2c5dab62d20085458 | [] | no_license | https://github.com/gberriz/datarail-2.0 | b310720c4f3054f3078a2e7cd892d184924324e4 | 4a6d132f2faa1e2f0e16360a9aefa6b5cd0c5a6b | refs/heads/master | 2021-01-10T11:21:20.763195 | 2012-03-01T21:07:09 | 2012-03-01T21:07:09 | 1,007,001 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from multikeydict import MultiKeyDict as mkd
class SimpleKeyMapper(dict):
__max_ids = 2**32
def __init__(self, seq=None, offset=0,
_id_min=-__max_ids/2, _id_max=__max_ids/2, **kwargs):
self._offset = offset
self._inverse = inv = []
self._len = len(inv)
if se... | UTF-8 | Python | false | false | 4,239 | py | 66 | keymapper.py | 66 | 0.514508 | 0.510026 | 0 | 149 | 27.449664 | 73 |
Nian-Jingqing/GeomSeq | 6,923,487,284,310 | bb457d0c0c0a7cffb96b56d80c77682372ffbc1c | c31ecf2f0714af85900464e3128409296237c184 | /GeomSeq_analyses/0_Create_epochs.py | 80db9fc113c572dea7fcb492b98ffca8508d0777 | [] | no_license | https://github.com/Nian-Jingqing/GeomSeq | 0909443f7f6dd8ac53bac975308452b4225f5e88 | 296b50ade1040d171a5ab0fc1960d396e794bc6b | refs/heads/master | 2023-06-12T01:06:22.280760 | 2021-07-04T18:05:59 | 2021-07-04T18:05:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
===========
0_Create_epochs.py
===========
Script to epoch the data after preprocessing
Author: Fosca Al Roumi <fosca.al.roumi@gmail.com>
"""
from GeomSeq_functions import epoching_funcs
from GeomSeq_analyses import config
# Here choose the identifier of your subjects
subject = config.subjects_list[0]
# epochs... | UTF-8 | Python | false | false | 1,126 | py | 16 | 0_Create_epochs.py | 14 | 0.748668 | 0.716696 | 0 | 27 | 40.62963 | 124 |
22lizabeth/Text_Based_Adventure_Game | 9,594,956,965,475 | 07f1e56d78d4b5aadab355d765b5511abe73aebe | c1f5967d6afdbf9dfe3eb5f27bd80be2f0808be1 | /main.py | 1795f6ab5947072ef58d717abaf7d7d8828eae71 | [] | no_license | https://github.com/22lizabeth/Text_Based_Adventure_Game | e6125e50babcf9d8c6fb4c14cadbba7a4e613438 | 402016421b5408d0ca77836302a861f267517425 | refs/heads/master | 2021-01-26T09:13:35.419767 | 2020-02-27T01:00:23 | 2020-02-27T01:00:23 | 243,399,339 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from adventureGame import *
# MAIN
gameObj = AdventureGame()
gameObj.playGame()
print("Goodbye!")
| UTF-8 | Python | false | false | 100 | py | 7 | main.py | 6 | 0.74 | 0.74 | 0 | 7 | 13.285714 | 27 |
DmitryVlaznev/leetcode | 2,224,793,073,453 | 58abed363990acb713ae94307a30384b442567e7 | 078918048099dfa2454cfac2d449ea3d77fbec55 | /849-maximize-distance-to-closest-person.py | a3cd6d758c07fab2f69ecde521ae0ecdc5ad2b89 | [] | no_license | https://github.com/DmitryVlaznev/leetcode | 931784dcc4b465eebda7d22311f5bf5fa879f068 | b2a2afdfc725330545c9a2869fefc7d45ec594bc | refs/heads/master | 2023-06-10T05:42:34.992220 | 2023-06-05T09:54:10 | 2023-06-05T09:54:30 | 241,064,389 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 849. Maximize Distance to Closest Person
# You are given an array representing a row of seats where seats[i] = 1
# represents a person sitting in the ith seat, and seats[i] = 0
# represents that the ith seat is empty (0-indexed).
# There is at least one empty seat, and at least one person sitting.
# Alex wants to ... | UTF-8 | Python | false | false | 2,646 | py | 584 | 849-maximize-distance-to-closest-person.py | 578 | 0.595238 | 0.55291 | 0 | 89 | 28.730337 | 72 |
antekarin05/programsko | 2,671,469,708,861 | db1c56121b8af01439c482bfeb0bde9cbb41f392 | 1202df05bd8f5e19593aa44465334dc77e4b5740 | /5/Funkcije.py | dc356ac2e90afeb9b4587b3589ab35c164231bd1 | [] | no_license | https://github.com/antekarin05/programsko | 5f25e9248da59c3e32137eb161fe5a84af5ae5f7 | 487e12a6eb5cfa1d93867ea6f1cdc36ee77814a8 | refs/heads/master | 2022-09-10T21:27:23.961082 | 2020-06-03T12:04:20 | 2020-06-03T12:04:20 | 255,997,809 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import Likovi
import math
from math import pi
def opseg(lik):
if isinstance (lik, Likovi.Kruznica):
return 2 * lik.r * pi
elif isinstance(lik, Likovi.Kvadrat):
return 4 * lik.a
def povrsina(lik):
if isinstance (lik, Likovi.Kruznica):
return math.pow(lik.r, 2) *... | UTF-8 | Python | false | false | 521 | py | 8 | Funkcije.py | 7 | 0.564299 | 0.556622 | 0 | 20 | 24.15 | 43 |
HoangLong08/Web-shoes | 9,371,618,685,277 | dd3b15ac032dfd86c11a5b99594bb10eba9086d6 | eefeaf895f281a9e89faaed9b4c9549692c7203e | /back-end/bep/controllers/city_controller.py | 630240a4dda0faaab94e07a712209e0aece2aed8 | [] | no_license | https://github.com/HoangLong08/Web-shoes | 180dde94c43140525f95b7cc750809e005fe775c | 267ebaef086febce018fdfe29354e2a5b9f183bb | refs/heads/master | 2023-07-13T18:46:53.914630 | 2021-08-24T09:15:41 | 2021-08-24T09:15:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from configdb.connectdb import connectdb
class City:
def __init__(self) -> None:
pass
def getAllCity(self):
sql = "SELECT * FROM `cities` ;"
myresult1 = connectdb.executeQuery(sql)
result = []
for x in myresult1:
dictionary_city = {
... | UTF-8 | Python | false | false | 492 | py | 103 | city_controller.py | 67 | 0.45935 | 0.449187 | 0 | 17 | 28 | 51 |
machrisaa/opensafely-job-server | 231,928,244,003 | fb3c366ab03ddc70e8887bb04c45f14cb3c40d85 | 245b30d6afd80ac48700cccc3a97b6f63c1e4a90 | /jobserver/authorization/permissions.py | b7c64edf0363df8c2ddabaa189d15fde4bbc2b7a | [] | no_license | https://github.com/machrisaa/opensafely-job-server | 8e1995ad4f9cca2cbc146d7c687ea5fe63a085a9 | e2dd9b85c896ead390e002c197acd9f263a556e5 | refs/heads/main | 2023-05-01T23:42:24.190138 | 2021-04-28T13:41:51 | 2021-04-28T13:41:51 | 363,146,896 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | cancel_job = "cancel_job"
check_output = "check_output"
invite_org_members = "invite_org_members"
invite_project_members = "invite_project_members"
manage_project_members = "manage_project_members"
manage_project_workspaces = "manage_project_workspaces"
publish_output = "publish_output"
review_project = "review_project... | UTF-8 | Python | false | false | 342 | py | 105 | permissions.py | 77 | 0.766082 | 0.766082 | 0 | 9 | 37 | 55 |
Inpurple/Leetcode | 4,672,924,436,898 | 226a9d34289fb09b51c11f897a208186615b47f1 | 6a1975a11de163ce0e6a5f001df41758bea3686b | /11. Container With Most Water/solution_双指针.py | 83f3582b3d4430d43d5f816679eaca78df27f564 | [] | no_license | https://github.com/Inpurple/Leetcode | 7f08e0e500d37913e9244f08ea8f603b3fc1ce88 | df2bcca72fd303100dbcd73d1dfae44467abbb44 | refs/heads/master | 2020-05-20T02:17:08.430557 | 2019-09-22T07:51:28 | 2019-09-22T07:51:28 | 185,327,908 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
思路:
要求容器的容量,取决于 min(height[p1],height[p2])*(p2-p1)
关键问题是 短板,当然也有两板之间的距离,不过短板可以作为移动的判断条件,目的是使 短板更高一些
两个指针分别从首尾向中间缩,哪个板更短,就移动一下但面积只记录更大的面积
为什么短板可以当做移动判断的条件:
如果移动长一点的短板,那么整个面积肯定是变小的,所以要... | UTF-8 | Python | false | false | 1,039 | py | 150 | solution_双指针.py | 146 | 0.546763 | 0.51223 | 0 | 28 | 23.75 | 59 |
qianrenjian/NLP-text-summarization | 14,431,090,135,008 | c009d864f6ca8c435681ec5f102a3eee83e7eafa | 87dc823c6b96aed6f9e0f3883db748fdf6d1414d | /src/extractive_summarizer.py | 3546b5ef4bc100b938a831e39e135c9b9e6b5d62 | [] | no_license | https://github.com/qianrenjian/NLP-text-summarization | cc0475ecb0255a41bc2506af00d5174b4344f4dc | e6a9647ea1c3d148664d8edad797a108c99d3eb2 | refs/heads/master | 2020-07-11T02:18:43.615924 | 2019-08-23T23:33:36 | 2019-08-23T23:33:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # import nltk for text preprocessing, tokenizing
# import beautifulsoup to parse URL input option
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize, sent_tokenize
import pandas as pd
import bs4 as BeautifulSoup
import urllib.request
# produce a sample summar... | UTF-8 | Python | false | false | 3,307 | py | 3 | extractive_summarizer.py | 1 | 0.608406 | 0.599637 | 0 | 133 | 23.827068 | 81 |
Hurin0/public_transport_wro | 12,987,981,141,362 | e1c9722d2983092b80b59df4603fa6eeef853e86 | 5a0656e1d358aa0be6b6c5f3e895e34a55b76d18 | /cities.py | 45f1069a31ecdfeef598fb3d167a1025e7752448 | [] | no_license | https://github.com/Hurin0/public_transport_wro | cc1908b9994920dd385cf53b80b8f491a81921c7 | a26beda6dde52d5194cc50b09ff37dbca26d8ef3 | refs/heads/main | 2023-05-06T13:20:13.044224 | 2021-06-01T09:48:32 | 2021-06-01T09:48:32 | 372,461,791 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from ..app import db
class City(db.Model):
__tablename__ = "cities1"
city_id = db.Column(db.Integer, nullable=False, primary_key=True)
city_name = db.Column(db.String(50), nullable=False, unique=True)
routes = db.relationship('Routes', backref='city', lazy='dynamic')
def __repr__(self):
... | UTF-8 | Python | false | false | 364 | py | 28 | cities.py | 25 | 0.642857 | 0.634615 | 0 | 12 | 29.25 | 70 |
brujua/Perceptron | 8,933,531,983,361 | 8ae6f4ea5f57c854b955a53d1f1dda9a0b9729b4 | f2a131235269920d817296b85db07b62ffe74051 | /perceptron.py | ab1deb3e66f3f7f7980b976e6f807b2e3979e22e | [] | no_license | https://github.com/brujua/Perceptron | f7a36954d6382e2884161b964ce1e49e5db28809 | 2cd583b64f943c6e0d69a216f67ddbf7f5badf0c | refs/heads/master | 2020-05-20T19:52:46.080556 | 2019-05-15T22:34:39 | 2019-05-15T22:34:39 | 185,732,546 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import numpy as np
from random import randint
from typing import List
import matplotlib.pyplot as plt
DIMENSION = 2
ERROR_ARGS = "Invalid Argument. \nUsage: python " + sys.argv[0] + " <data-set-file> \
(tab separated, each data point in one line)"
ERROR_NOT_CONVERGED = "Error, training did not converged, th... | UTF-8 | Python | false | false | 2,943 | py | 1 | perceptron.py | 1 | 0.573904 | 0.560652 | 0 | 102 | 27.852941 | 107 |
aalramez16/cat-or-dog-image-recognition-project | 15,393,162,831,702 | 57f1e7cd476388ca1b1939d2f9bef9f1ae146a96 | 33a23392894397ca764a2eb3c488843cbd97b9f6 | /test2.py | 9148b567f7f1efdbb4f5cfef30578d26b80e1ac5 | [] | no_license | https://github.com/aalramez16/cat-or-dog-image-recognition-project | a1e1c1995dcc1c429317f702514889e0e68f703d | 051bae3bbec491739f3c6b66e89c22d53066b429 | refs/heads/master | 2020-12-15T07:52:37.562452 | 2020-01-20T06:52:00 | 2020-01-20T06:52:00 | 235,036,815 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 30 21:38:00 2019
@author: deser
"""
'''
Portions of this code are referenced from the following links:
https://medium.com/nybles/create-your-first-image-recognition-classifier-using-cnn-keras-and-tensorflow-backend-6eaab98d14dd
https://keras.io/visualization/
... | UTF-8 | Python | false | false | 3,083 | py | 3 | test2.py | 2 | 0.648394 | 0.62277 | 0 | 132 | 21.295455 | 124 |
ArchiveTeam/NewsGrabber-Services | 18,107,582,152,840 | 44ac99735cbedefd7f4d5e20def24da184c683f4 | 83e2fe88d4537403ee710b631d7d3e8c65415092 | /services/web__alger_info_com.py | f77bda3d49317dcf38a32a054fde6ef193ffa61f | [] | no_license | https://github.com/ArchiveTeam/NewsGrabber-Services | b01f560b18bd5395673132321c16bcf7602608f1 | 2d52eb06a6ca767f4b1d1e623505fa427b6af459 | refs/heads/master | 2020-01-23T21:40:57.220775 | 2019-07-01T09:56:38 | 2019-07-01T09:56:38 | 74,690,301 | 3 | 8 | null | false | 2019-06-03T19:49:47 | 2016-11-24T16:41:59 | 2019-06-03T19:49:36 | 2019-06-03T19:49:46 | 1,460 | 3 | 5 | 0 | Python | false | false | refresh = 86400
version = 20161106.01
urls = ['http://www.alger-info.com/',
'https://feeds.feedburner.com/alger-info-articles?format=xml']
regex = [r'^https?:\/\/[^\/]*alger-info\.com', r'^https?:\/\/[^\/]*feedburner\.com']
videoregex = []
liveregex = [] | UTF-8 | Python | false | false | 256 | py | 659 | web__alger_info_com.py | 659 | 0.632813 | 0.574219 | 0 | 8 | 31.125 | 84 |
nicolasessisbreton/fython | 15,298,673,519,691 | b9717a71b2a8df9bbc302d434eef1f0679e482b4 | febb7a4b889c2f40637e2b688eb770cf0809226f | /fython/code/code.py | 2aae0cff5f5cf3ef7a74bd2f0769ac2e5f1109d2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/nicolasessisbreton/fython | 68253552c626640b5efc2a7cea9384c8e0425c08 | 988f5a94cee8b16b0000501a22239195c73424a1 | refs/heads/master | 2021-01-10T07:10:06.793158 | 2017-08-25T17:27:05 | 2017-08-25T17:27:05 | 50,076,320 | 48 | 3 | null | false | 2016-08-21T17:16:12 | 2016-01-21T02:30:31 | 2016-08-20T17:08:04 | 2016-08-21T17:16:11 | 481 | 20 | 2 | 1 | Python | null | null | from fython.unit import *
class Code(Unit):
unit = l.code
def __init__(s, bofx):
s.module = bofx.module
s.lineno = bofx.lineno
s.raw = []
s.lexem = []
s.linecod = []
s ^ bofx
# +: add linecod
def __add__(s, other):
s ^ other
if not other.is_eofx:
s.linecod.append(other)
if s.nb_lin... | UTF-8 | Python | false | false | 535 | py | 534 | code.py | 330 | 0.558879 | 0.551402 | 0 | 39 | 12.74359 | 31 |
unsw-cse-comp3900-9900-21T1/capstone-project-3900-w18a-let-s-chat | 5,488,968,235,213 | 625758506e5f2139d8c40067b9ffe91a56bf77ac | e4e9370bfb5b5ad5c8a2c9fbbc4bbfab6ed1f434 | /ecommerce/store/migrations/0009_remove_product_seller.py | 38348bf10b1cdd8ff5af16ac2fabca63e6a1a8c6 | [] | no_license | https://github.com/unsw-cse-comp3900-9900-21T1/capstone-project-3900-w18a-let-s-chat | efc5c9bede823f33209474475d8047c7c246e1ad | e45cf4414ed62dc679e26804dae45af5e61cbf63 | refs/heads/main | 2023-04-10T10:44:08.592759 | 2021-04-23T09:07:12 | 2021-04-23T09:07:12 | 343,309,639 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.7 on 2021-03-17 09:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0008_auto_20210317_1938'),
]
operations = [
migrations.RemoveField(
model_name='product',
name='selle... | UTF-8 | Python | false | false | 344 | py | 63 | 0009_remove_product_seller.py | 36 | 0.549419 | 0.459302 | 0 | 17 | 18.235294 | 47 |
gray-panda/grayrepo | 1,606,317,791,976 | dc9bb2a9046371f07f41a5538e251f3a62cb81e7 | d132dc16d0dd2e5b313600ff93f57047967f2a54 | /2021_flareon/10_wizardcult/02_spells.py | d843dd4e636208e5e76f89ed7a4c67056d2f52e2 | [] | no_license | https://github.com/gray-panda/grayrepo | 49b6b273cef918d25b0984cdd9d3d8ab090f2b37 | 72d315151c6f1325cb4f98a57eaa5fe904657961 | refs/heads/master | 2021-11-22T06:26:28.432843 | 2021-10-23T06:54:28 | 2021-10-23T06:54:28 | 42,939,804 | 70 | 14 | null | null | null | null | null | null | null | null | null | null | null | null | null | SPELLS = {}
SPELLS["Eldritch Blast"] = 0
SPELLS["Mass Heal"] = 1
SPELLS["Fireball"] = 2
SPELLS["Dominate Monster"] = 3
SPELLS["Detect Magic"] = 4
SPELLS["Stone Shape"] = 5
SPELLS["Clairvoyance"] = 6
SPELLS["Aid"] = 7
SPELLS["Detect Thoughts"] = 8
SPELLS["Shapechange"] = 9
SPELLS["Fire Shield"] = 10
SPELLS["Pass without... | UTF-8 | Python | false | false | 10,416 | py | 473 | 02_spells.py | 219 | 0.676459 | 0.549827 | 0 | 330 | 30.563636 | 474 |
Kobold/best_vids | 3,693,671,886,794 | 1cd6b15b89fcd91cedfb211d11dc3e7325d92725 | 898fda7c7f87ea5a512733f6485f6ce35e131c88 | /best_vids.py | 67bef04c0821f35d2d273c01b90a3f683ab76beb | [] | no_license | https://github.com/Kobold/best_vids | 1074dd55b08718214c895fa62c73393538ff9d7d | ad27fe150f9ca8c90dbc1d51c2a3a5b0891da3e7 | refs/heads/master | 2020-06-08T23:27:01.049465 | 2014-06-18T12:37:22 | 2014-06-18T12:37:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import click
import dataset
import httplib2
import json
import os
import sys
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import argparser, run_flow
BEST_VIDS_DIR = os.path.dirname(os.... | UTF-8 | Python | false | false | 7,508 | py | 4 | best_vids.py | 1 | 0.6561 | 0.652238 | 0 | 211 | 34.582938 | 91 |
a303990366/crawler | 18,098,992,193,044 | 018a5a442757a23491e0947c0812404e29c15b35 | 132464813a10c48992094ff59b58ca309dd1ecc3 | /scrapy/instagram.py | 232a59dc9eb818f12a9999c79215e5c37d6ed833 | [] | no_license | https://github.com/a303990366/crawler | 23534e7ce7b73915f63bcaceddfb2ab5695ebf15 | 0cc88a1e68b1bc1a111a111bb69209cb06b99442 | refs/heads/master | 2020-11-24T00:54:23.146232 | 2020-07-14T07:19:41 | 2020-07-14T07:19:41 | 227,891,488 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import scrapy
import json
import time
from ..items import ArticleItem,CommentItem,RepliesItem
import re
#流程:
# 1.進入目標網站利用正則表達式獲取帳號id
# 2.利用查詢文章的網址搭配帳號id獲取文章的json檔,並找出end_cursor作為進行下一次查詢的參數
# 3.從文章json檔獲取文章的留言查詢參數short_code
# 4.利用查詢留言的網址搭配short_code獲取留言的json檔,並找出comment_end_cursor作為進行下一次查詢的參數(可順便獲取留言回覆)... | UTF-8 | Python | false | false | 8,617 | py | 18 | instagram.py | 6 | 0.571258 | 0.559213 | 0 | 145 | 56.731034 | 284 |
shriram1807/text-analytics-python | 13,546,326,874,729 | c5756a121cfe66ee2a4580b07b61f6cfeca1244e | 081e77f3e774fb34bd2683d044032b74f2159c3f | /CapstoneA4_rangarajan_shriram.py | 0f5db52d0b32380fc3034ac4ac4de3925190ee8e | [] | no_license | https://github.com/shriram1807/text-analytics-python | 76000b48efaaffea512eb029ee07794a89851e25 | ed9d9dec78dbe8ae35f27fd09679cfb38484f251 | refs/heads/master | 2016-09-13T14:55:14.213954 | 2016-05-04T19:49:52 | 2016-05-04T19:49:52 | 58,079,727 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Shriram Rangarajan
#MISM BIDA - Pyhton capstone
#Activity 4
#In this activity , we strip the python html tags of the webpage and display its contents
#the text is then cleansed of punctuation marks and stopwords for further cleansed
#the words in the final corpus are dispalyed in their alphabetical order
import urlli... | UTF-8 | Python | false | false | 1,618 | py | 5 | CapstoneA4_rangarajan_shriram.py | 5 | 0.662546 | 0.658838 | 0 | 49 | 32 | 104 |
mdekauwe/pydesica | 1,872,605,785,716 | 5e6c1cce7046e356194c7c7ada6fd6f169fa6dd6 | aabe0cb3ed70cc363a6cfeee2dcc38f5b4f69dcc | /src/run_each_pft.py | 0aa31efe50b62fc568c012d717eeb490e7a13a2f | [] | no_license | https://github.com/mdekauwe/pydesica | 31e0dd64a9602143c799a68400ea600338856c1f | 23597e9bf073a3172b4badfaa8ef8c2cddbf2285 | refs/heads/master | 2021-06-11T02:46:57.576793 | 2020-04-06T14:10:37 | 2020-04-06T14:10:37 | 128,168,696 | 2 | 2 | null | false | 2018-04-13T04:02:14 | 2018-04-05T06:42:33 | 2018-04-13T03:37:19 | 2018-04-13T04:02:14 | 624 | 0 | 1 | 0 | Python | false | null | #!/usr/bin/env python
# coding: utf-8
"""
Run each PFT
That's all folks.
"""
__author__ = "Martin De Kauwe"
__version__ = "1.0 (19.09.2019)"
__email__ = "mdekauwe@gmail.com"
import pandas as pd
import sys
import numpy as np
import matplotlib.pyplot as plt
import os
from generate_met_data import generate_met_data
fro... | UTF-8 | Python | false | false | 2,603 | py | 42 | run_each_pft.py | 36 | 0.591241 | 0.5267 | 0 | 103 | 24.271845 | 76 |
sgossage/parmcmc | 9,947,144,283,732 | 640119f3bf74b2595b76770dfda7d668827bbeda | 54bbad4556c503a04db8a3df9e04004f07c7a0e8 | /mk_calcsfhparam_partials.py | 1fa155541e8214d3e105aed047762bf0435d9bb0 | [] | no_license | https://github.com/sgossage/parmcmc | 105ebb3b1448de2dd6f36a3bca2802c8fa4f78a3 | 6f716ae09bb83b59c549cb3e8248366185a67996 | refs/heads/master | 2020-04-05T18:43:47.728094 | 2019-06-17T20:17:37 | 2019-06-17T20:17:37 | 140,914,190 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import matplotlib as mpl
mpl.use('Agg')
from match.scripts.fileio import calcsfh_input_parameter
import os
import sys
import numpy as np
from mk_paramfs import mk_agegrid
from fileio import parse_fname
# sys.argv[x]: 1, 'v' filter (bluer); 2, 'i' filter (redder); 3, photometry file; 4
#def pars... | UTF-8 | Python | false | false | 6,255 | py | 11 | mk_calcsfhparam_partials.py | 11 | 0.589129 | 0.563709 | 0 | 175 | 34.742857 | 129 |
NateWeiler/Resources | 18,571,438,594,164 | 54e5f3ec60a93873f50149a376b31ba1774d6d16 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Games/Pygame/pygame-menu/pygame_menu/examples/multi_input.py | 17536f5b7079e6ad836e03ba05d724a606f53a99 | [
"MIT"
] | permissive | https://github.com/NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | false | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | 2021-12-09T12:39:04 | 2022-09-08T15:20:18 | 2,434,051 | 1 | 0 | 32 | null | false | false | version https://git-lfs.github.com/spec/v1
oid sha256:d4a9997a4a55c678f7f8424769a7127d174a4d6217024a739f504d2dcc6db013
size 11449
| UTF-8 | Python | false | false | 130 | py | 36,207 | multi_input.py | 16,386 | 0.884615 | 0.469231 | 0 | 3 | 42.333333 | 75 |
sayinala/projects | 9,509,057,623,517 | dfd27aaadef6365244ca5b19fe046913d563bcca | def5f8e031f2ed3e152383b9491eebf38e2e31f1 | /pedestrian-detector/box/box.py | 85d90ef50bdf585d24a384bf06fb348f0ab4ebf4 | [] | no_license | https://github.com/sayinala/projects | bf5cc42da90e59d21d321105ebe1c010bcc5f870 | 022c7e41820abd6d80f2a35f275faa5c69f3a5ba | refs/heads/master | 2021-01-10T04:02:45.073835 | 2015-10-02T18:29:23 | 2015-10-02T18:29:23 | 43,569,079 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
from bucket import Bucket
import os
file_path = os.path.dirname(os.path.realpath(__file__))
rgb = cv2.imread(file_path + "/output.jpg")
hsv = cv2.cvtColor(rgb, cv2.COLOR_BGR2HSV)
horiz_hist = []
LEFT = Bucket(90, 270, (255, 0, 0))
RIGHT= Bucket(270, 90, (0, 0, 255))
buckets = [LEFT, RIGHT]
width = hsv.... | UTF-8 | Python | false | false | 3,705 | py | 16 | box.py | 12 | 0.547099 | 0.51552 | 0 | 154 | 23.058442 | 87 |
NiekKeijzer/hermes | 11,940,009,112,494 | ce9e3197021783bc883ca55fa9228b01b059001a | 66644de0d9495fca87fe1484e41632358e2cf5e2 | /hermes/forms/migrations/0003_auto_20210501_1339.py | 4aad11575e5058b80a4d4f08030eefead69767ec | [
"MIT"
] | permissive | https://github.com/NiekKeijzer/hermes | c1e455f95ae5f563b985d749bbc68f8c6a633f69 | 48c2e015ab5b299dbbc488a8934af76cabf144cb | refs/heads/main | 2023-04-22T21:06:41.098389 | 2021-05-06T17:11:22 | 2021-05-06T17:11:22 | 353,753,796 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.7 on 2021-05-01 13:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("forms", "0002_form_validate_referrer"),
]
operations = [
migrations.RenameField(
model_name="site",
old_name="domain",
... | UTF-8 | Python | false | false | 360 | py | 68 | 0003_auto_20210501_1339.py | 41 | 0.563889 | 0.511111 | 0 | 18 | 19 | 49 |
dgole/ledBasic | 15,822,659,538,426 | d85c807547cb6a2ab13e04edaf03c93d0c69fc16 | 5cda94b78b05decfb12ad19826cde9c3a76090e9 | /python/myCode/demo1.py | bfd1774d94bcd37068c3d8e4753fea7fb9bf0bd4 | [
"BSD-2-Clause"
] | permissive | https://github.com/dgole/ledBasic | f8b9030565741fd809c1f09d4ce29daf9b68272b | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | refs/heads/master | 2021-05-07T19:05:05.907164 | 2017-11-20T01:26:09 | 2017-11-20T01:26:09 | 108,885,033 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
from neopixel import *
import lib
import numpy as np
# Create NeoPixel object with appropriate configuration.
strip = Adafruit_NeoPixel(lib.LED_COUNT, lib.LED_PIN, lib.LED_FREQ_HZ, lib.LED_DMA, lib.LED_INVERT, lib.LED_BRIGHTNESS, lib.LED_CHANNEL, lib.LED_STRIP)
strip.begin()
def setPixelsWithArray(strip,... | UTF-8 | Python | false | false | 955 | py | 8 | demo1.py | 8 | 0.708901 | 0.682723 | 0 | 35 | 26.285714 | 151 |
vinaychittora/lbr | 11,742,440,616,162 | 2e7a408bd3bc8cb14dc2989f0b91640c80972721 | 67fe82fe52febcea04042463475508e167647b87 | /alembic/versions/3e17098a2ea7_create_user_listing_and_rental_table.py | 4653d823b25b12d7d96e2d626d806c3cf2320c57 | [
"BSD-2-Clause-Views"
] | permissive | https://github.com/vinaychittora/lbr | 0c6f87de67192f8115be9c460754619f04bc022d | 7867f76014e2c51fa9046bef7a3c31aeba6b7c69 | refs/heads/master | 2021-01-17T08:04:19.795503 | 2016-06-21T09:10:48 | 2016-06-21T09:10:48 | 61,619,222 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """create user, listing and rental table
Revision ID: 3e17098a2ea7
Revises: None
Create Date: 2014-09-10 17:53:40.102969
"""
# revision identifiers, used by Alembic.
revision = '3e17098a2ea7'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'users',
... | UTF-8 | Python | false | false | 1,581 | py | 53 | 3e17098a2ea7_create_user_listing_and_rental_table.py | 31 | 0.617963 | 0.572423 | 0 | 54 | 28.277778 | 67 |
baiyongzhen/senko | 15,788,299,790,113 | c4d94a0d01cce7ce69ac93c2eddfac59a3eaa826 | d7123f0bac683232376162402a89d7bb1ceec5ed | /senko-app/project/migrations/versions/001_Add_users_table.py | 68ffeec92538c4c2c1a86c13add963af3eee4268 | [] | no_license | https://github.com/baiyongzhen/senko | a39a48c1b26317b252df97ba6fea04c77664c40f | 092ab1409f3493e7da3971a16db728ca3f87f9bf | refs/heads/master | 2020-04-23T10:06:09.116089 | 2018-07-30T08:39:37 | 2018-07-30T08:39:37 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
from sqlalchemy import *
from migrate import *
meta = MetaData()
users = Table(
'users', meta,
Column('id', Integer, primary_key=True, nullable=False),
Column('email', String(255), nullable=False, unique=True),
Column('username', String(255), nullable=False, unique=Fal... | UTF-8 | Python | false | false | 944 | py | 16 | 001_Add_users_table.py | 9 | 0.688559 | 0.679025 | 0 | 27 | 33.962963 | 124 |
rolinawu/TicTacToe | 5,574,867,590,197 | 98230ac3ac86f861be6ce7cf9b6e77a4deaeece6 | b78835ce271a65b230473336cce40acde39e81df | /Model.py | 8f1d9489518b6a2eaa424c602f4c596e6ff4cf0c | [] | no_license | https://github.com/rolinawu/TicTacToe | d884038dcd7d5b1f4ec7b23ff7c0d79b079637a3 | 673df29952762a7e22ff3c01dcfbffb053679631 | refs/heads/master | 2021-01-10T04:23:54.209906 | 2016-01-02T15:42:34 | 2016-01-02T15:42:34 | 48,497,563 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
this is where all the magic(algorithms) happens
'''
class Calc(object):
def __init__(self):
self.Xcells = []
self.Ocells = []
#self.Emptycells =
def getXcells(self):
'''
Return: the cell numbers of the list of X cells on the board
'''
return self.Xcells
def getOcells(self):
'''
Return: th... | UTF-8 | Python | false | false | 1,070 | py | 4 | Model.py | 4 | 0.640187 | 0.637383 | 0 | 52 | 19.596154 | 62 |
kkmjkim/coding-problems | 11,295,764,020,448 | bac746904983cd87711ed35024bb4c77b127b27c | 689fa98621bd5ccc68b72bb9e3444076f7a9278b | /programmers/level2/42578_위장m.py | 3f46c1637b9892e0a1a517702b9f355e30803e3c | [] | no_license | https://github.com/kkmjkim/coding-problems | f5a560635eeab38d36f285b94b30ea2b5c31896b | 187a6d100d95554e4062f8a48a28ef2ec15677e4 | refs/heads/main | 2023-07-24T02:46:22.822961 | 2021-08-17T01:17:39 | 2021-08-17T01:17:39 | 370,715,231 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 레벨2-해시: 위장
# https://programmers.co.kr/learn/courses/30/lessons/42578
# 정확성: 100 / 100
def solution2(clothes):
answer = 1
style = {}
for i in clothes:
if i[1] not in style:
style[i[1]] = 1
else:
style[i[1]] += 1
for i in style.values():
answer *= (i + ... | UTF-8 | Python | false | false | 479 | py | 72 | 42578_위장m.py | 71 | 0.546638 | 0.494577 | 0 | 19 | 23.263158 | 108 |
alexeyproskuryakov/read | 2,370,821,968,183 | 0a015a2a6b8774caa58f8b4ff87c282cccd7f0fb | 29e95efb4ba16567b9763d23a48c79e9ed56e5dd | /wsgi/rr_people/__init__.py | ce6e28576b7a7a9f41fdf0aa48390fda80eb8e87 | [] | no_license | https://github.com/alexeyproskuryakov/read | e0ee2b304de9b4b7c7b27bdff0d31f6feca75f14 | 604476145ddb49425b7c49491b8de51ab9846b9b | refs/heads/master | 2022-02-05T02:01:00.825251 | 2016-10-16T01:11:00 | 2016-10-16T01:11:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
import random
import re
import praw
import time
from praw.objects import MoreComments
from stemming.porter2 import stem
from wsgi import properties
DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
USER_AGENTS = [... | UTF-8 | Python | false | false | 7,426 | py | 29 | __init__.py | 21 | 0.621196 | 0.54794 | 0 | 190 | 38.084211 | 227 |
joylinmimi/YOLO-data-training | 1,340,029,808,654 | 46f1586a1262b650b58f4e2bc1d031c04225215b | e45070e9d28647f98fbd791ff358f2027cb45400 | /remove_unused.py | cf7aa98432dd269b7cc571894727afb0cbd99968 | [] | no_license | https://github.com/joylinmimi/YOLO-data-training | 595c8df0ef3003a05dcd34ec97faf0c417f4fb80 | 5743b15a75a0403aa6c46956ffe7f782dd6c7ac3 | refs/heads/master | 2020-04-15T05:09:25.775893 | 2019-03-08T07:36:07 | 2019-03-08T07:36:07 | 164,410,901 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import shutil, sys
dir='C:\\Users\\USER\\Desktop\\data20181226 - 複製\\data\\img'
for filename in os.listdir(dir):
if filename.endswith(".txt"):
filename2=os.path.splitext(filename)[0]
f = open(filename,"r")
f2 = open(filename2+'-2.txt',"w")
for line in f:
print(line[0])
if line[0]=='4':
f2... | UTF-8 | Python | false | false | 445 | py | 6 | remove_unused.py | 6 | 0.646259 | 0.600907 | 0 | 15 | 28.4 | 81 |
MITRECND/crits | 1,846,835,977,460 | ecb878a3b59c383a75b5ad86383fe198b3f82fcd | 7baafcdd99b5c9cea88c42b279d47154b527ac24 | /crits/settings.py | 1f498c49412abb587d1c35a744e54883a35d2107 | [
"MIT"
] | permissive | https://github.com/MITRECND/crits | bbf0752d5de63995ef812d93c73dd47fe006c590 | 81fc042efe61a252ee3433432f7bd7f0f11b217d | refs/heads/master | 2020-04-04T23:15:00.542469 | 2017-05-11T14:51:32 | 2017-05-11T14:51:32 | 20,405,972 | 22 | 6 | null | true | 2014-07-21T22:12:50 | 2014-06-02T14:03:44 | 2014-07-16T07:48:55 | 2014-07-21T22:12:50 | 3,289 | 1 | 1 | 0 | JavaScript | null | null | # CRITs environment chooser
import errno
import glob
import os
import sys
import django
import subprocess
from pymongo import ReadPreference, MongoClient
from mongoengine import connect
from mongoengine import __version__ as mongoengine_version
from pymongo import version as pymongo_version
from distutils.version im... | UTF-8 | Python | false | false | 29,697 | py | 285 | settings.py | 174 | 0.626461 | 0.623935 | 0 | 731 | 39.625171 | 142 |
zeculesu/vitamo | 15,942,918,631,725 | af56cfabe06221008c76e6388c5ab74fc6959598 | 49f0a72b785d124fd4304bdb8b5c17257b85112c | /work_api.py | ef0ef600026a2fe5665c2f2862b2f0108e95456b | [] | no_license | https://github.com/zeculesu/vitamo | 2ceb63c764b218aa84db382d721f6e3ea16f5a3b | c77f6ee44153f89f66d92a18a6920ab1850de6b3 | refs/heads/main | 2023-04-19T16:47:16.386537 | 2021-05-17T13:23:04 | 2021-05-17T13:23:04 | 354,602,573 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import request
import requests
from utils import get_response_json
def add_new_users(user_name, email, password):
basic_url = f'{request.host_url}api/users'
response = get_response_json(requests.post(basic_url, data={'username': user_name,
... | UTF-8 | Python | false | false | 4,145 | py | 33 | work_api.py | 22 | 0.517732 | 0.517732 | 0 | 101 | 40.039604 | 90 |
chris4540/DD2424-dl-proj | 1,821,066,144,146 | d9b59fa5dbd9039a4b725783ed52604e8d8d562c | 11ad14fba26c98a51e4f3968d39679c5609e1003 | /progress_kd/tests/test_aux.py | ff047913583692ae49755f3325808aef3ec2c87e | [
"MIT"
] | permissive | https://github.com/chris4540/DD2424-dl-proj | a42ecbdf61f984f3d8881502a7d874f7daa2dc50 | b928ec9ce792930c4ace269091da2c9b3433928e | refs/heads/master | 2020-09-19T19:16:37.664188 | 2019-11-26T19:50:58 | 2019-11-26T19:50:58 | 224,273,303 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This script is to check if basically the teacher model fits to the auxilary model
"""
import torch
from models.vgg import Vgg
from models.vgg_aux import AuxiliaryVgg
if __name__ == "__main__":
teacher = Vgg('VGG16', batch_norm=True)
chkpt = torch.load("vgg16bn_teacher.tar")
teacher.load_state_dict(chkp... | UTF-8 | Python | false | false | 1,075 | py | 13 | test_aux.py | 11 | 0.626977 | 0.609302 | 0 | 32 | 32.53125 | 81 |
jdlafferty/covid-19 | 6,244,882,484,029 | 72dfc3322fec85f228ad9b2570eccb1dd3f2dc44 | 3ef6113527aeacade64f5e16af44e8ebb7b1644a | /app.py | a8c33cde9fc5407d21daad7584b927965ef1579a | [] | no_license | https://github.com/jdlafferty/covid-19 | 7e8160981a84b1485e285286a1c595690d55e901 | 53747603c3f2e77cdbf1c5b1171dfc15f81b5c72 | refs/heads/master | 2021-05-18T10:24:11.883251 | 2021-02-28T15:48:38 | 2021-02-28T15:48:38 | 251,209,505 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, render_template, request
import json
import herepy
import plotly
import datetime
import dateutil.parser
import pandas as pd
import numpy as np
# initial geocoder and read in NYTimes data
geocoderApi = herepy.GeocoderApi('VbY-MyI6ZT9U8h-Y5GP5W1YaOzQuvNnL4aSTulNEyEQ')
def lat_lon_of_address(a... | UTF-8 | Python | false | false | 6,872 | py | 14 | app.py | 5 | 0.577707 | 0.555006 | 0 | 181 | 36.966851 | 132 |
rubnsbarbosa/python3 | 17,549,236,378,093 | 384b72b6fc75b01110ad15440b22b22bdb574ae1 | b53df9ea08473ee9b26876983b22c1de0f27b642 | /02_DecisionStructure/e16.py | 77f1849103f1e0c673739e2d2a5cb1939a95520a | [] | no_license | https://github.com/rubnsbarbosa/python3 | 080c198b88382622c087954c05ff1e3e9643eb15 | d5202edb594290863c7dcd969bb009d9828bee6a | refs/heads/master | 2022-12-03T23:17:36.288105 | 2020-07-23T17:55:39 | 2020-07-23T17:55:39 | 196,201,653 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math as m
a = int(input('Digite o lado A: '))
if a == 0:
exit()
else:
b = float(input('Digite o lado B: '))
c = float(input('Digite o lado C: '))
delta = b**2 - 4 * a * c
def checkRoots(dlt):
if dlt < 0:
print('A equacao nao possui raizes reais')
elif dlt == 0:
root = -b + ... | UTF-8 | Python | false | false | 616 | py | 81 | e16.py | 73 | 0.547078 | 0.522727 | 0 | 23 | 25.782609 | 90 |
taras-ua/SpectralGraphTheory | 9,337,258,944,393 | f95ef56e1b1f68b5de335d1c0575e84e39c19a0f | 23002657ab509db0b5bfe6077b8913f83dcb76bb | /app/views.py | b509345e00104548ec21bbb5786efd506cc049be | [
"Apache-2.0"
] | permissive | https://github.com/taras-ua/SpectralGraphTheory | b08d5147374e17779ae3de0e229225435257483c | c7540d5c674194ec0da965be18bd3becaf69d5f3 | refs/heads/master | 2021-05-15T02:21:26.792375 | 2015-06-07T23:17:48 | 2015-06-07T23:17:48 | 30,770,988 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from django.http import HttpResponse
from django import forms
import app.controllers.main as controller
import math
class GraphForm(forms.Form):
MODEL_CHOICES = (('erdos-renyi', 'Erdős–Rényi model'), ('bollobas-ri... | UTF-8 | Python | false | false | 2,393 | py | 16 | views.py | 9 | 0.541073 | 0.534786 | 0 | 46 | 50.847826 | 146 |
harrisonBirkner/PythonSP20 | 77,309,443,795 | 9ea0b0fdedd23897d849f409ec30a1f4682d47c7 | 5fd87b2c657efc067c6104127225f1b645a9592a | /DictionaryFun/DictionaryFun/DictionaryFun/DictionaryFun.py | 2eaf972c739db5c2a5bf0db2a51cb2fb0f915e45 | [] | no_license | https://github.com/harrisonBirkner/PythonSP20 | 7d4284f7b4cd18e99d5a4a12d7ca29d4ae4c25d6 | 989a22652953f0223a2c6c8f5b7b3c106627b15d | refs/heads/master | 2023-01-12T12:43:00.245557 | 2020-11-15T20:09:36 | 2020-11-15T20:09:36 | 256,615,492 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Dictionary and Set Examples
#phoneBook = { 'Beatrice': '555-1111', 'Katie':'555-2222', 'Chris':'555-3333'}
#print(phoneBook)
#print(phoneBook['Katie'])
#if 'Chris' not in phoneBook:
# print("No number available for Chris")
#else:
# print(phoneBook['Chris'])
#Try adding to the dictionary
#phoneBook['Wilbur'] =... | UTF-8 | Python | false | false | 1,428 | py | 33 | DictionaryFun.py | 28 | 0.663165 | 0.597339 | 0 | 80 | 16.8625 | 78 |
rijuvenator/euler | 19,026,705,127,429 | 882e919957b6b4400e83dbd9626461e18e57a0c6 | bafde5e287a6c605fe964837140d13f279ef2101 | /problem030.py | ad03f59bbafdb62235540c17584736da6cfc115d | [] | no_license | https://github.com/rijuvenator/euler | a28efb839dfa6507e21a50f9872b601e90a5918e | d5803dfee6e59db6e0e3bf43b2effcd6d56f0e34 | refs/heads/master | 2021-01-21T04:50:45.145037 | 2018-07-19T12:31:58 | 2018-07-19T12:31:58 | 45,071,028 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Problem 30: Find the sum of all numbers that are equal to the sum of the fifth powers of their digits.
# Answer: 443839
print '** Problem 30 **'
total = 0
for i in range(2,354295):
if i == sum([int(j)**5 for j in list(str(i))]):
total += i
print 'Sum is',total
| UTF-8 | Python | false | false | 268 | py | 73 | problem030.py | 72 | 0.656716 | 0.585821 | 0 | 10 | 25.8 | 104 |
camerse/WebQueries | 11,321,533,826,829 | 52415f46784183380504b7540edef423115ddea4 | 55266a178575bc89ed30b5fdc0fb084c4c4907a1 | /URLGrab.py | 7ddf1667da87e4e358a37891da1d6ce20e085106 | [] | no_license | https://github.com/camerse/WebQueries | 8673ec45c8f8b2e844cae61f04a1867aa1754ac4 | d3a168f78599d65b5ca0feb87f8efd6bb46ee406 | refs/heads/master | 2020-08-05T05:34:02.303985 | 2017-05-17T17:56:31 | 2017-05-17T17:56:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
#! /usr/bin/env python3
'''
This code is modified from pymbook.readthedocs.io
I'm using it as a jumping-off point
'''
import requests
import os
import sys
def download_url(url):
''' download URL, save to current directory '''
req = requests.get(url)
#uses string arg... | UTF-8 | Python | false | false | 926 | py | 2 | URLGrab.py | 1 | 0.582073 | 0.572354 | 0 | 33 | 25.939394 | 66 |
MadanParth786/Codeshef-Problems | 3,221,225,484,723 | 7fcdb63ae33187fc36e03c10e1f03cde10150901 | eb8b2dffe055de423bc320e6ee949a0d0d0c401d | /Long June 2021 Contest/Bitwise tupple.py | 1502f32fec81d5eb04f1fed38839714757e3fe18 | [
"MIT"
] | permissive | https://github.com/MadanParth786/Codeshef-Problems | 7dafe59c1e326f3ad4491f1c2752bc5f821fec6f | 64ec3b9849992f3350dfe67f2dbc6332a665b471 | refs/heads/main | 2023-08-27T03:00:42.725312 | 2021-10-28T16:35:12 | 2021-10-28T16:35:12 | 376,236,369 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | for i in range(int(input())):
a, b = map(int,input().split())
c = pow(2,a,1000000007)-1
print(pow(c,b,1000000007))
| UTF-8 | Python | false | false | 131 | py | 63 | Bitwise tupple.py | 62 | 0.564885 | 0.396947 | 0 | 4 | 31.5 | 36 |
lesliedlc/json | 4,166,118,317,898 | 1c806746a62dec07a6d6e80cd66c103e752703e8 | ea1bbef16d1ffaf1a6fdec4cf855a455c6726418 | /json_USfires_9_14.py | c26d729b7b9dec82226865c14f80ed3655553882 | [] | no_license | https://github.com/lesliedlc/json | 9aae810cc821e311bb86ccd0eec608f8b009f907 | 29037b56d6c0c5e05f64176838f5da02ab0d015e | refs/heads/master | 2022-12-19T05:10:56.209166 | 2020-10-01T02:40:34 | 2020-10-01T02:40:34 | 297,475,446 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
in_file = open("US_fires_9_14.json", "r")
out_file = open("readable_US2_data.json","w")
us2_data = json.load(in_file)
json.dump(us2_data, out_file,indent = 4) #dump contents into the file
fire_list_1 = us2_data[:]
print(type(fire_list_1)) #type
print(len(fire_list_1)) #how many
brightness,lons,lats = ... | UTF-8 | Python | false | false | 1,145 | py | 4 | json_USfires_9_14.py | 3 | 0.623581 | 0.5869 | 0 | 51 | 21.470588 | 69 |
356255531/ADP_Programming_Assignment | 19,078,244,737,930 | b2f57ceee043748f9c6594c868eeeaa5b10e83bb | beb22b5d1584d9962aecb547692da8a2679bd172 | /code/Toolbox/Reward.py | a70a35e77b5b7d57676c9fc10cb7883de2987bea | [] | no_license | https://github.com/356255531/ADP_Programming_Assignment | 5fb16c8dff5a884b371a89a819cd3718c0b286d2 | e8d21b7943df806f5232e37795ae3a70a84fddd1 | refs/heads/master | 2020-06-14T10:12:35.390736 | 2017-01-13T16:47:09 | 2017-01-13T16:47:09 | 75,199,031 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __auther__ = "Zhiwei"
class Reward2(object):
"""
Reward rule 2:
when goal state reached, given reward 1,
otherwise punished by -1
Member function:
get_reward(current_state, action, next_state):
"""
def __init__(self, env):
super(Reward2, self).... | UTF-8 | Python | false | false | 1,335 | py | 12 | Reward.py | 9 | 0.485393 | 0.473408 | 0 | 64 | 19.859375 | 58 |
cherukurukavya/lab-programs2-r151458 | 15,101,105,053,404 | 1c6a49335a73097b5059b6a238952b0cafdc31a7 | 4bb97a99fbbb63f33586e85f371eb27d32768ffc | /DTFT_LIST.py | 8e67200b5979e60fae327ea5c2839ab101f00bac | [] | no_license | https://github.com/cherukurukavya/lab-programs2-r151458 | 3954d673978940fcdf4589623d0f892cfe899b4a | 13f391c3767096801de0171ce6f680ee80f0228c | refs/heads/master | 2020-05-16T10:46:39.259944 | 2019-12-28T06:33:17 | 2019-12-28T06:33:17 | 182,995,211 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import cmath as c
import matplotlib.pyplot as plt
w=np.linspace(-1*np.pi,np.pi,1000)
j=c.sqrt(-1)
#t=np.arange(-400,400,1)
#fs=100
#x=np.sin(2*np.pi*40.0/fs*t)
x=input('enter values')#a=[1,2,3]
z=len(x)
y=[]
M=[]
P=[]
for r in range(1000):
W=w[r]
X=0
for n in range(z):
X+=x[n]*np.exp(-j*W*n)
y.... | UTF-8 | Python | false | false | 488 | py | 24 | DTFT_LIST.py | 23 | 0.639344 | 0.563525 | 0 | 29 | 15.862069 | 34 |
satire6/Anesidora | 13,408,887,920,271 | 2952d9baf3948fc1288fab36b60699c71e2d3130 | b1bc2e54f8cd35c9abb6fc4adb35b386c12fe6b4 | /toontown/src/launcher/LauncherTool.py | bd4c83934bf96c1e1f7cc06266ce246b9d288821 | [] | no_license | https://github.com/satire6/Anesidora | da3a44e2a49b85252b87b612b435fb4970469583 | 0e7bfc1fe29fd595df0b982e40f94c30befb1ec7 | refs/heads/master | 2022-12-16T20:05:13.167119 | 2020-09-11T16:58:04 | 2020-09-11T17:02:06 | 294,751,966 | 89 | 32 | null | null | null | null | null | null | null | null | null | null | null | null | null | from direct.showbase.TkGlobal import *
class LauncherTool:
def __init__(self, launcher):
self.launcher = launcher
self.toplevel = Toplevel()
self.frame = Frame(self.toplevel)
self.statusLabel = Label(self.frame, justify=LEFT,
anchor=W, text='Status:... | UTF-8 | Python | false | false | 635 | py | 1,517 | LauncherTool.py | 1,360 | 0.598425 | 0.598425 | 0 | 19 | 31.894737 | 79 |
davedavedave636/Coding-Projects | 6,992,206,761,988 | 5ea190d25f8550e74137c941b8afe3b01853ddbc | 0642d8032c1e6b7972832a495bb7227e10bf9a09 | /PY4E_Exercises/c6/exercise_c6,3.py | bfa0bb06d427d3a908a001e1994ae7c635cbd7c0 | [] | no_license | https://github.com/davedavedave636/Coding-Projects | e0856f4146d2e0222b1e2a718fc76fc0607afe19 | 8951bd995426b1345c00119b49cb0cf0a0b01b12 | refs/heads/master | 2023-03-05T21:43:34.197400 | 2021-02-16T21:17:02 | 2021-02-16T21:17:02 | 339,529,999 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def count():
word = input('enter a word: ')
let = input('enter a letter: ')
countnum = 0
for letter in word:
if letter == let:
countnum += 1
print('There is/are', countnum, let + "'s")
count()
| UTF-8 | Python | false | false | 236 | py | 30 | exercise_c6,3.py | 29 | 0.521186 | 0.512712 | 0 | 9 | 24.888889 | 47 |
JCHasrouty/CSIS-151-Python | 13,546,326,855,364 | 4ac156c44fa258a1bc5f6bdbce286c37ec38e9bf | aaa1e49c9cc57d27e6e32b7e60df01adb60db565 | /Chapter 9 Homework/Part 3/Employee.py | 128436423149565d5b403a0a09984285569ee965 | [] | no_license | https://github.com/JCHasrouty/CSIS-151-Python | d9e2d472481274da0f62adc1c442ae09690873cf | b4032fac68e27c7291f61b03d7259fc5a9c888b0 | refs/heads/master | 2020-03-07T15:38:41.997555 | 2019-04-20T23:08:42 | 2019-04-20T23:08:42 | 127,560,550 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Employee():
## def __setitem__(self, key, item):
## self.__dict__[key] = item
##
## def __getitem__(self, key):
## return self.__dict__[key]
##
## def __delitem__(self, key):
## del self.__dict__[key]
##
## def clear(self):
## return self.__dict__.clear()
##
## def copy... | UTF-8 | Python | false | false | 2,166 | py | 35 | Employee.py | 30 | 0.538781 | 0.538781 | 0 | 88 | 23.613636 | 135 |
RiccardOtt/GOR | 10,814,727,669,193 | 947ee3dda1973873dc9be8dda5b58a850f5e9775 | f99221c054dd8c25c204d6be8741e7bee8839455 | /GOR_predicting.py | 43821ad93dfe331851a5cfdcf023b2fd12a4311e | [] | no_license | https://github.com/RiccardOtt/GOR | 90361db6ef0877f967f8c460183b08f138130ae5 | 6de0bbb89027b4e438677d57fe95c74a0c1151e6 | refs/heads/main | 2023-07-04T15:41:39.548836 | 2021-08-10T18:39:39 | 2021-08-10T18:39:39 | 394,749,246 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import os
import numpy as np
import math #math.log(<of what>,<base>)
def matrix_pssm(filename):
seq_prof = []
for j in filename:
L = j.split()
# print(L)
try: L[0]
except: pass
else:
if L[0].isdigit():
seq_prof.append(L[22:-2])
# print(seq_prof)
x = np.array(seq_prof, dtype=np.float64... | UTF-8 | Python | false | false | 1,851 | py | 3 | GOR_predicting.py | 3 | 0.632631 | 0.613182 | 0 | 83 | 21.301205 | 104 |
aleglez22/MasterWorkshop | 18,889,266,182,429 | f8a1c578f8f80edbc20cc9b1d4f6d156b3317506 | 97befe66c292e397eb82736fb8b131a846a91cd8 | /index/views.py | 6937f97876467b2c1602811b85923840f7e9cff7 | [] | no_license | https://github.com/aleglez22/MasterWorkshop | af5299d4ae1363dc5222e5258fe4864119f3db48 | 432617171994aa3978f13cd002e8dc264ab8b4df | refs/heads/master | 2021-09-20T05:31:16.693764 | 2018-08-04T05:08:59 | 2018-08-04T05:08:59 | 84,784,507 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render, redirect , get_object_or_404
from .models import Cliente, Orden, Equipo, Tecnico
from django.views import generic
from django.core.urlresolvers import reverse_lazy
from django.core.urlresolvers import reverse
from django import forms
from django.http import HttpResponse
from openp... | UTF-8 | Python | false | false | 10,505 | py | 32 | views.py | 17 | 0.653223 | 0.647502 | 0 | 331 | 30.667674 | 112 |
kimiyuki/dotfiles | 14,285,061,250,876 | b55cc2388bb37d63876cf3da6b193ea0423927c9 | 4f97c41df3d9071de4d54cd0a8f252ed78d579cb | /00-ipython-startup.py | c6151b29f2272d2aa34fbf24a3f4c4baedcefd42 | [] | no_license | https://github.com/kimiyuki/dotfiles | d648983655700d59efbc7be3d743713dab5fd219 | ebc290b770f35f709216460504ba1e54e0f5a304 | refs/heads/master | 2022-08-22T03:44:12.969661 | 2022-07-25T02:56:16 | 2022-07-25T02:56:16 | 53,015,945 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | try:
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
#get_ipython().run_line_magic('load_ext', 'memory_profiler')
get_ipython().run_line_magic('xmode', 'Plain')
print('autoreload loaded from startup ~/.ipython/...')
except NameError:
print('... | UTF-8 | Python | false | false | 1,983 | py | 19 | 00-ipython-startup.py | 7 | 0.67171 | 0.660615 | 0 | 61 | 31.47541 | 84 |
Samarth-Tripathi/Neural-Network-Projects | 12,919,261,633,829 | 63d6f1f242b89f65d0d817ff378c2c45eb45d519 | 6a4bbb1491bcc17e759839d654f8286e46834fc6 | /Neural_Nets_HW/e4040_hw1_st3029/hw1a.py | 69468d187922132c35f4ee4047d2265fb99b697d | [] | no_license | https://github.com/Samarth-Tripathi/Neural-Network-Projects | fdc63ee4d8d62bca814ae1386b3e2d89dce34e36 | a032fdbb3e5fe6fca1302a983630f2fe7b0164e9 | refs/heads/master | 2021-01-12T02:48:14.457044 | 2017-01-05T17:41:37 | 2017-01-05T17:41:37 | 78,109,281 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
from os import walk
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy.linalg as linalg
from PIL import Image
import theano
import theano.tensor as T
'''
Implement the functions that were not implemented and complete the
part... | UTF-8 | Python | false | false | 10,129 | py | 11 | hw1a.py | 5 | 0.566788 | 0.549215 | 0 | 333 | 29.399399 | 133 |
ddraa/Algorithm | 3,229,815,451,348 | 896b6b043f3f73b1e6c3318fcbdeadd1cc093446 | 69889d51e933b4e8a1d4c8397a317aa1d1365a5a | /Heap/1655.py | 2217c84c802234200bc5e5ced5708715951918cb | [] | no_license | https://github.com/ddraa/Algorithm | a35c87631420ceccec6f7094da6f2b22ddb66c8c | a97c6628d5389f7f93603a2e95ac3b569057f556 | refs/heads/master | 2023-06-25T17:12:39.925821 | 2021-07-18T05:53:28 | 2021-07-18T05:53:28 | 279,240,088 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
from heapq import *
N = int(sys.stdin.readline())
min_h, max_h = [] ,[]
for _ in range(N):
n = int(sys.stdin.readline())
if len(max_h) == len(min_h):
heappush(max_h, -n)
else:
heappush(min_h, n)
if min_h and min_h[0] < -max_h[0]:
heappush(min_h, -heappop(max_h))
... | UTF-8 | Python | false | false | 378 | py | 351 | 1655.py | 340 | 0.539683 | 0.531746 | 0 | 17 | 21.294118 | 40 |
KristofferFJ/PE | 13,391,708,054,315 | 630b5bb1cd7c993b555dfcde7d12e2a573d3f6d6 | 6c8f7f5c3e8a61d3d1c63e7c3f19953df496ae8f | /problems/unsolved_problems/test_116_red,_green_or_blue_tiles.py | f61921ad3f7668d71e08cb5607d8aea2f52fc944 | [] | no_license | https://github.com/KristofferFJ/PE | a5b5f8dabbd0ee6e61506899eabf070ae0cad619 | 4715da077fac3bb8f061f6d773166c575c9c7813 | refs/heads/master | 2022-08-07T03:57:54.712661 | 2022-07-24T20:28:24 | 2022-07-24T20:28:24 | 118,385,527 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
"""
Red, green or blue tiles
A row of five grey square tiles is to have a number of its tiles replaced with coloured oblong tiles chosen from red (length two), green (length three), or blue (length four).
If red tiles are chosen there are exactly seven ways this can be done.
If green tiles are chosen ... | UTF-8 | Python | false | false | 804 | py | 625 | test_116_red,_green_or_blue_tiles.py | 624 | 0.756219 | 0.746269 | 0 | 18 | 43.666667 | 175 |
vendetta546/codewars | 13,108,240,187,998 | 59672421e2f6d517b2b92d204f2989c1ada7209c | 241a629d2d0f0435e0a25387ae061f0e62beca5a | /Python/6KYU/FizzBuzz.py | 350c06e608d5058950b3c5bdb1baedac40f65fed | [] | no_license | https://github.com/vendetta546/codewars | b5a341c129e671b41cc964f63cbf92b68a7f9b40 | 26cc8282be79c865a44a9b74350fa86ac0c3dfed | refs/heads/master | 2020-09-14T12:53:10.861919 | 2020-03-27T09:21:12 | 2020-03-27T09:21:12 | 223,132,784 | 2 | 0 | null | true | 2019-11-21T09:07:03 | 2019-11-21T09:07:02 | 2019-11-18T22:02:44 | 2018-07-11T21:08:11 | 5,249 | 0 | 0 | 0 | null | false | false | def solution(number):
a=0;b=0;c=0
for x in range(1,number):
if x%15==0:
c += 1
elif x%5==0:
b += 1
elif x%3==0:
a += 1
return [a,b,c] | UTF-8 | Python | false | false | 206 | py | 614 | FizzBuzz.py | 149 | 0.368932 | 0.300971 | 0 | 10 | 19.7 | 29 |
jbathel/holbertonschool-higher_level_programming | 14,164,802,164,131 | cdf0388ae5529800da28d58df726e33f2bafaa64 | 87b12ec1bea4008b0f51ed2c2be632e3121a0d04 | /0x08-python-more_classes/0-rectangle.py | e27ebda8f86e4c6a936e9a6135161432f601c62c | [] | no_license | https://github.com/jbathel/holbertonschool-higher_level_programming | 181d24de8df362842ee3b3a632dd49c38966a662 | 10afef612d8544e55a7c295ba90b1b0e2f2171b8 | refs/heads/master | 2020-07-22T23:51:09.947518 | 2020-02-14T06:42:04 | 2020-02-14T06:42:04 | 207,372,715 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
class Rectangle:
"""Represents an empty class Rectangle"""
pass
| UTF-8 | Python | false | false | 91 | py | 37 | 0-rectangle.py | 31 | 0.681319 | 0.67033 | 0 | 4 | 21.75 | 45 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.