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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
squaresLab/Houston | 12,034,498,404,263 | e6997b3ba693ef07ccf08a7fc7cff0ef66c2dd13 | 5332f9f303d38dfabf367cfaab3f75627163e4f3 | /houston/ardu/home.py | b6e4c9351deadecc33cd2d38bddba5fc947c59fc | [
"MIT"
] | permissive | https://github.com/squaresLab/Houston | 59d81aa61cf6c8d0c6172a67b382bf25843d358e | 088cb52fe2d36dfb25b03b98f51b09d56f7d47d0 | refs/heads/master | 2021-06-22T18:50:21.150971 | 2019-08-01T22:07:11 | 2019-08-01T22:07:11 | 82,945,828 | 3 | 2 | MIT | false | 2019-08-01T22:07:12 | 2017-02-23T16:16:47 | 2019-08-01T21:26:35 | 2019-08-01T22:07:11 | 1,982 | 3 | 3 | 56 | Python | false | false | __all__ = ('HomeLocation',)
from typing import Dict, Any
import attr
@attr.s(frozen=True)
class HomeLocation:
latitude = attr.ib(type=float)
longitude = attr.ib(type=float)
altitude = attr.ib(type=int)
heading = attr.ib(type=int)
def __str__(self) -> str:
return "{},{},{},{}".format(sel... | UTF-8 | Python | false | false | 807 | py | 88 | home.py | 81 | 0.51425 | 0.51425 | 0 | 29 | 26.827586 | 55 |
developer0hye/PyTorch-DLA | 4,698,694,258,441 | 952818fa82a11ede5e83b726a97122c4754a0a49 | 52c7d43eb42198d1d198bfb14618e9d418e6273d | /dla.py | ece64398fa8c4152b5eae4cdcc6528b91aec142d | [] | no_license | https://github.com/developer0hye/PyTorch-DLA | 16fcc81cea2b17724d540864c504c9763b731185 | b8eb62aac7c32f3387773da7164e3e7cc45e90ff | refs/heads/main | 2023-02-01T00:53:53.100785 | 2020-12-15T03:12:36 | 2020-12-15T03:12:36 | 315,783,758 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os, sys
import math
import torch
import torch.nn as nn
import numpy as np
def conv_bn_relu(in_channels, out_channels, kernel_size=3, stride=1):
return nn.Sequential(
nn.Conv2d(in_channels,
out_channels,
kernel_size=kernel_size,
stride=stride,
padding=kernel_size//2,
bias... | UTF-8 | Python | false | false | 6,312 | py | 3 | dla.py | 1 | 0.630568 | 0.605067 | 0 | 215 | 27.083721 | 131 |
sim1234/Labirynt | 11,235,634,484,810 | a05d8eab1f3dad40b2682236f93ff0338ce09d90 | ba1591113393cde9d5a06ea1d43092482ce9b9f1 | /main.py | 8e89d39de3271045884ac3f475341804e5a39db7 | [] | no_license | https://github.com/sim1234/Labirynt | 9b67e66a950f71f97a1929ec47cbba1f76923e7e | c47b9f18c57a1b62d3a3e713168c8701f9d15177 | refs/heads/master | 2021-01-01T17:47:46.908943 | 2013-08-09T12:49:28 | 2013-08-09T12:49:28 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from game import game
def main():
gra = game(640,480)
gra.play()
if __name__ == '__main__':
main() | UTF-8 | Python | false | false | 113 | py | 3 | main.py | 3 | 0.522124 | 0.469027 | 0 | 9 | 11.666667 | 26 |
Idbruh/TrabalhosPyhton | 6,545,530,170,951 | 117c8bfde1bcc9dc04019b22d6be4e52ee61ec89 | 43f557b2d6aa3db3c1e156c10d11813051e1902b | /Aula40/aula40.py | f3292d2eec5181d9e49624c4f14969738899ca6b | [] | no_license | https://github.com/Idbruh/TrabalhosPyhton | 3d379342c1a46a6151c6d44e4a0dfec6d0976b70 | b14091b1f22959abd173622b36a84ec58506f8c5 | refs/heads/master | 2020-09-05T21:27:53.939072 | 2020-02-27T11:43:42 | 2020-02-27T11:43:42 | 220,218,840 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # FLASK RESTFUL
# GET N
# POST
# PUT
# DELETE
# controller
herança em python - pega uma classe j gerada(importando tudo que tem em uma classe já existente) | UTF-8 | Python | false | false | 160 | py | 116 | aula40.py | 105 | 0.734177 | 0.734177 | 0 | 9 | 16.666667 | 96 |
ressay/ArchToCE | 13,821,204,793,832 | 493608a2f20ff26c3794e0c49489d81683c9bdbd | b07304822e097cc17f374c400a2b493694b47904 | /Samples/tryTwo.py | 9a2b1736a14b13688ad7007a5b4ba0d866484ed3 | [] | no_license | https://github.com/ressay/ArchToCE | 585583cb2860be2085f5a0ee11de11c37b3c39e4 | ccd194ace8257476952fbc82a1401a0ee7ca779d | refs/heads/master | 2022-06-22T00:43:19.113778 | 2022-06-19T20:31:53 | 2022-06-19T20:31:53 | 139,846,206 | 3 | 5 | null | false | 2020-03-16T13:51:56 | 2018-07-05T12:27:27 | 2020-03-16T11:30:51 | 2020-03-16T13:49:01 | 62,066 | 2 | 2 | 0 | Python | false | false | from OCC.Display.SimpleGui import init_display
display, start_display, add_menu, add_function_to_menu = init_display()
def simple_test(event=None):
display.Test()
def simple_cylinder(event=None):
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeCylinder
s = BRepPrimAPI_MakeCylinder(60, 200).Shape()
... | UTF-8 | Python | false | false | 685 | py | 55 | tryTwo.py | 43 | 0.754745 | 0.738686 | 0 | 26 | 25.384615 | 71 |
frenck/iaqualink-py | 6,511,170,449,000 | c162d1d7a22f7137ebbf743bedc57788e83f8b3e | 23c06cce660a7211e59a1e18aa5ce40b8ba9cf49 | /tests/test_system.py | dd39737299db58c256d5145ebb840584e04e209a | [
"BSD-3-Clause"
] | permissive | https://github.com/frenck/iaqualink-py | 0ac46f8e9f9f830efdd0df9425ded08fdd48a0a1 | c75d693225556ec59e32088479be9c0fd84f6e9c | refs/heads/master | 2020-12-22T07:03:57.589339 | 2019-10-14T01:49:28 | 2019-10-14T01:49:28 | 236,705,808 | 0 | 0 | BSD-3-Clause | true | 2020-01-28T10:08:30 | 2020-01-28T10:08:29 | 2019-10-14T22:59:23 | 2019-10-14T22:59:21 | 51 | 0 | 0 | 0 | null | false | false | import asynctest
import pytest
from iaqualink.exception import AqualinkSystemOfflineException
from iaqualink.system import AqualinkSystem, AqualinkPoolSystem
from .common import async_noop, async_raises
class TestAqualinkSystem(asynctest.TestCase):
def setUp(self) -> None:
pass
@asynctest.fail_on(u... | UTF-8 | Python | false | false | 2,369 | py | 3 | test_system.py | 2 | 0.654707 | 0.652596 | 0 | 62 | 37.193548 | 77 |
eapb99/Commerce-Django | 858,993,475,565 | 6f3ace025f57beea4c2110fc3b93625a4d40028d | d98d7a606b6c25e3c698cdac069b6039868bf4b9 | /commerce/auctions/migrations/0002_bid_category_comment_listing.py | 80b160c07b043c8cdd5e9bfb0c547f3d2f7e3e7b | [] | no_license | https://github.com/eapb99/Commerce-Django | 8def756b405e8803c7ae8272936a9b2aa43d9a3d | 4303c2dc2b06145ec7178df12aba31e325f27f5f | refs/heads/master | 2023-03-29T11:18:27.646687 | 2021-03-18T03:41:04 | 2021-03-18T03:41:04 | 348,927,495 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.3 on 2021-03-04 22:52
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auctions', '0001_initial'),
]
operations = [
... | UTF-8 | Python | false | false | 3,344 | py | 19 | 0002_bid_category_comment_listing.py | 10 | 0.60616 | 0.591507 | 0 | 61 | 53.819672 | 163 |
Ash515/awesomeScripts | 3,667,902,112,989 | 01999ca80febb3a4f4749b8c88e083e0c2d63063 | 54489f723841157ff6f9d3aa3d9d9590f27d2ed5 | /send-discord_message/auth.py | 3860d3f437292f804949ff0c01eb286f70a2aafc | [
"MIT"
] | permissive | https://github.com/Ash515/awesomeScripts | 8126751d9cd47564e6d76726cbde38a4291cf223 | 3a2c0888207aca044e03ec9f387035e14879fd15 | refs/heads/master | 2022-12-23T09:42:33.998020 | 2020-10-05T11:50:18 | 2020-10-05T11:50:18 | 301,373,870 | 8 | 0 | MIT | true | 2020-10-05T10:40:52 | 2020-10-05T10:40:52 | 2020-10-05T10:40:47 | 2020-10-05T10:40:45 | 4,364 | 0 | 0 | 0 | null | false | false | # Enter your discord channel webhook_url
WEBHOOK_URL = ""
| UTF-8 | Python | false | false | 58 | py | 152 | auth.py | 67 | 0.741379 | 0.741379 | 0 | 2 | 28 | 40 |
joao3872/exercios-Python | 9,414,568,321,583 | 32850215bc807d4357a5c0f0a9b4259209050c8b | 63a1fde24dceff2361e40d3f367bcd51b90baede | /Parte 2/desafio42.py | 689cf3a13c49cb0fcd9a38d1556dee2b18686690 | [] | no_license | https://github.com/joao3872/exercios-Python | 44ef9a0f17cc1c90f01f582169ff444438b53403 | 3d8d07635903baf78a8ca13d53016f1a1038296a | refs/heads/main | 2023-03-05T16:55:58.091208 | 2022-01-26T01:17:10 | 2022-01-26T01:17:10 | 316,858,020 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s1 = int(input('Informe o primeiro segmento: '))
s2 = int(input('Informe o segundo segmento: '))
s3 = int(input('Informe o terceiro segmento: '))
veja = ((s2 - s3) < s1 < s2 + s3) and ((s1 - s3) < s2 < s1 + s3) and ((s1 - s2) < s3 < s1 + s2)
e = (s1 == s2 != s3) or (s1 != s2 == s3) or (s2 != s1 == s3)
if(e and v... | UTF-8 | Python | false | false | 634 | py | 110 | desafio42.py | 108 | 0.596491 | 0.54386 | 0 | 14 | 42.785714 | 95 |
jjmalina/tumblrgifsfeed | 17,557,826,306,254 | bfc5de37ac9dba68efa04bea613cfee1f0b739e1 | eaa9703b8a91de94484ac3497298c5e4595dbd8c | /app/gifs/migrations/0002_auto__add_field_photo_timestamp.py | ab1f89aa26fcf0d1c5ef4d21786d076b06892377 | [] | no_license | https://github.com/jjmalina/tumblrgifsfeed | 99fb8e1b56b3c12bf20f112a07632254ad1c8c6c | 16c8af8e944c37ba236880915b89fab58d84e0cf | refs/heads/master | 2021-01-19T13:02:30.617485 | 2012-10-05T21:07:36 | 2012-10-05T21:07:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Photo.timestamp'
db.add_column('gifs_photo', 'timestamp',
self.gf('dja... | UTF-8 | Python | false | false | 2,121 | py | 16 | 0002_auto__add_field_photo_timestamp.py | 9 | 0.548326 | 0.54314 | 0 | 42 | 49.52381 | 155 |
Zhiguo-Uconn/hrs_django | 7,181,185,322,105 | 1802ee7ed2fa606b8d0cc4893c57c33c47d7b10c | 5d828263fdd7efcf7c35061388d6e413040b6784 | /hrs/PatientIdMiddleware.py | 6e902e83ac5776b6207774ab3674b5b507de454c | [] | no_license | https://github.com/Zhiguo-Uconn/hrs_django | 11fee91d4b20104e8b616feb7c4f7238a8e9dfaa | c18a90fe3cdcf0192a8863689e382615d0f515f3 | refs/heads/master | 2020-08-30T18:08:22.068451 | 2019-11-04T16:41:19 | 2019-11-04T16:41:19 | 218,453,586 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.utils.deprecation import MiddlewareMixin
from django.urls import resolve
class PatientIdMiddleware(MiddlewareMixin):
def process_request(self, request):
print("------------\n")
print(hasattr(request, 'pid'))
if not hasattr(request, 'pid'):
request._cached_pid =... | UTF-8 | Python | false | false | 419 | py | 19 | PatientIdMiddleware.py | 15 | 0.613365 | 0.610979 | 0 | 14 | 28.285714 | 52 |
khs50851/git-pydjgproject1 | 12,043,088,304,259 | c765aacfe66525a85111852fe0a88ca736f80e79 | 43c8f8f47ebe3aaff56c39a9e78d8d407f6a9aa8 | /py_community/user1/models.py | a3bc5a20745585a20c42e8b08b361970667bbe9c | [] | no_license | https://github.com/khs50851/git-pydjgproject1 | d23ad38630b351d585c6fc85e32162a6ecb177c7 | b6918144b43990615744e0c7b36b0d971b140ea3 | refs/heads/master | 2023-01-24T13:49:11.027031 | 2020-12-03T07:54:56 | 2020-12-03T07:54:56 | 317,441,580 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
# Create your models here.
class User1(models.Model):
objects = models.Manager()
username = models.CharField(max_length=32,
verbose_name='사용자명')
useremail = models.EmailField(max_length=128, # 이메일필드는 char필드랑 비슷한데 이메일 형식으로 받게함
... | UTF-8 | Python | false | false | 1,575 | py | 9 | models.py | 6 | 0.58504 | 0.576135 | 0 | 29 | 37.724138 | 105 |
memimo/Timothee | 7,550,552,532,258 | a7f0b5db84b1ecf23dbb0e39e59f6c2c29c9eb35 | fc2640f9cc10539c4d5475906563c05b1c2cdba5 | /python/test_module.py | 0491297cdb4767fb045df1b8c193dae575f83456 | [] | no_license | https://github.com/memimo/Timothee | b27c82e296e55760da177822906e124100d7b19c | 0329ccbcc16855de2205013e8dbf361272368ef3 | refs/heads/master | 2016-09-06T12:37:23.949760 | 2010-12-10T16:27:10 | 2010-12-10T16:27:10 | 720,978 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
import scipy.io as sio
from config import *
import layer_lgn
import layer_s1
import layer_c1
class timothee_model_test(unittest.TestCase):
''' All test are run with saved data from MAtlab implenetation on same data '''
def setUp(self):
#Parameter initializations
s... | UTF-8 | Python | false | false | 5,884 | py | 47 | test_module.py | 15 | 0.563052 | 0.551835 | 0 | 145 | 39.544828 | 193 |
deddokatana/RestCart | 13,924,284,022,471 | b682e40d053431abae79648e3b79c8f58a700f61 | b4025cb015feb804018109adf88564bc5ded2f02 | /Transactions/objects.py | ec20f7baf45b65d284f02f5445236451eacedd3a | [] | no_license | https://github.com/deddokatana/RestCart | 7ae186a0837932dadf3411bf885969991a7d5469 | 9ae647d6fe913d0e178a3a28ab55fe6f3418d349 | refs/heads/master | 2020-06-20T17:30:18.714276 | 2016-12-03T20:58:15 | 2016-12-03T20:58:15 | 74,852,599 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from decimal import *
from money import Money, xrates
xrates.install('money.exchange.SimpleBackend')
# counting tools
from collections import Counter
from itertools import chain
import json
# use google datastore to pickle an order!
class Order:
def __init__(self,currency_code:str='GBP'):
self.currency_... | UTF-8 | Python | false | false | 2,211 | py | 5 | objects.py | 3 | 0.644957 | 0.640434 | 0 | 66 | 32.515152 | 164 |
edt-yxz-zzd/python3_src | 2,491,081,055,221 | e2939486698ce754c59fe25e3340e16559ab2f20 | 13f4a06cd439f579e34bf38406a9d5647fe7a0f3 | /nn_ns/ply_yacc_tools/app/show_yacc_productions.py | eac2b479877acdd9079ba75f749a258389ec3052 | [] | no_license | https://github.com/edt-yxz-zzd/python3_src | 43d6c2a8ef2a618f750b59e207a2806132076526 | 41f3a506feffb5f33d4559e5b69717d9bb6303c9 | refs/heads/master | 2023-05-12T01:46:28.198286 | 2023-05-01T13:46:32 | 2023-05-01T13:46:32 | 143,530,977 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null |
r'''
pym -jq parse__grammar_units.py
pym show_yacc_productions.py M -m nn_ns.my_fileformat.configuration.utils.parses.parse__grammar_units -da .P
pym show_yacc_productions.py S -p nn_ns.my_fileformat.configuration.utils.parses -np parse__grammar_units@E:\my_data\program_source\github\edt-yxz-zzd\python3_src\nn_ns\my... | UTF-8 | Python | false | false | 9,613 | py | 3,235 | show_yacc_productions.py | 2,478 | 0.605014 | 0.599709 | 0 | 267 | 34.996255 | 240 |
suraj93/IITM-Course-Codes | 10,453,950,417,273 | 7dd364d8d1cff14995e272ac807673efb33a76b4 | 326940c9e5ca002ec8c3400e45cd6e3cb4c2b98c | /Computational Methods for EE/Assignment 1 - Polynomial Interpolation/q6/pypolint.py | 6a15659abf43a61c029de9f56b583bdafb88c7fe | [] | no_license | https://github.com/suraj93/IITM-Course-Codes | d33de57b7b8759a8f56d77e6f00d3110cba4c5c6 | ed0ca14cdff0341580122f0d4e1a196f1417e1e4 | refs/heads/master | 2016-09-06T14:05:05.470723 | 2014-12-02T05:24:22 | 2014-12-02T05:24:22 | 24,233,526 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
def polint(xa,ya,n,x):
diffarr=np.array([(xai-x) for xai in xa])
diff=min(abs(diffarr))
ns=np.where(abs(diffarr)==diff)[0][0]
c=np.array(ya)
d=np.array(ya)
y=ya[ns]
for m in range(1,(n)):
ho=diffarr[0:n-m]
hp=diffarr[m:n]
# print c
# print ... | UTF-8 | Python | false | false | 1,729 | py | 64 | pypolint.py | 25 | 0.504916 | 0.477733 | 0 | 75 | 22.066667 | 64 |
jameschanwz/LegalDocGenerator | 17,093,969,848,416 | d9ef1e7a9acaf6674c2aa5e8ab3f7ad4747a4df6 | c9f9b19837c96f51d63ace524836110abb51d09f | /app/email.py | 98b843e4e6def342be3e403b3cb3095dbeb1649b | [] | no_license | https://github.com/jameschanwz/LegalDocGenerator | 7856fcae2dd56355d42a75248b977ef423fb768d | 5225353bf12cbc0871b0ad5ef7101680bb8da143 | refs/heads/main | 2023-05-08T12:34:49.127672 | 2021-06-02T07:21:11 | 2021-06-02T07:21:11 | 347,832,170 | 1 | 0 | null | false | 2021-03-30T09:57:25 | 2021-03-15T04:07:04 | 2021-03-28T13:20:15 | 2021-03-30T09:57:25 | 49 | 0 | 0 | 1 | Python | false | false | from flask_mail import Message
from app import mail
def send_email(subject,sender, recipients, text_body,html_body):
msg = Message(subject, sender=sender, recipients=recipients)
msg.body = text_body
msg.html = html_body
mail.send(msg) | UTF-8 | Python | false | false | 252 | py | 8 | email.py | 6 | 0.730159 | 0.730159 | 0 | 8 | 30.625 | 65 |
pong-xxyz/SaRA | 9,251,359,575,191 | 13e7d4b2770f3183b2db443554d1d23daf102834 | e5b51b92430a7f13f81ebec251c4b53bea730c21 | /Pi_navigatorClient.py | f5347a71011f34f449b54610772ff302b79b22b0 | [] | no_license | https://github.com/pong-xxyz/SaRA | 27cf1267a977fffa5d471c32985a765bdfda25eb | 4f72248c583cd0922e25cd3336bb063316bb75db | refs/heads/master | 2021-01-22T20:29:12.482725 | 2017-03-17T15:22:11 | 2017-03-17T15:22:11 | 85,325,580 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import socket
import time
import RPi.GPIO as gpio
import sys
host = 'xxx.xxx.xx.xxx' #address of the pi in the Lan, find through ifonfig
port = xxxx #random unused port, ie above 1000
s = socket.socket(socket.AF_INET, socket.SOCK_DGR... | UTF-8 | Python | false | false | 6,570 | py | 3 | Pi_navigatorClient.py | 3 | 0.448706 | 0.42207 | 0 | 206 | 30.543689 | 159 |
MnM3882/Laboratorio-remoto | 3,908,420,274,320 | 8ebe36ac1cfa63e06389959523ed67d1400498d4 | 70fe9c43026169aca02144a9a7f47e074185783a | /SerialCommunication y GUI/180404Lab_remoto .py | eaa482f36058f76befe43782bbee2684a6291051 | [] | no_license | https://github.com/MnM3882/Laboratorio-remoto | 55be641b3633f435ee52bb55cf7a0bab439cb01d | a8376d98fb34bbfc7c667c08bfa4c43f8c5bd021 | refs/heads/master | 2021-09-27T16:04:06.850998 | 2018-11-09T11:21:48 | 2018-11-09T11:21:48 | 126,108,805 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import demoscope3
from tkinter import *
from tkinter import ttk, Canvas
master = Tk()
master.title("Laboratorio remoto- LFN USB")
master.geometry('700x700')
top_frame = Frame(master, bg='white', width = 700, height=700, padx=10, pady=10)
#top_frame.grid(column=0, row=0)
top_frame.pack(side= TOP, fill=BOTH)
... | UTF-8 | Python | false | false | 4,921 | py | 158 | 180404Lab_remoto .py | 8 | 0.70002 | 0.645719 | 0 | 121 | 39.636364 | 150 |
goddess5321/classifier_gar | 8,108,898,301,227 | 79d6f4fe3eaf57ab4ff6ca369cf08926bcf5477a | 0679d3e3b0725c9c912f2d60117c027dbd064166 | /data_enhance.py | 089a3bd1120f740531324338707189805a4e28c3 | [] | no_license | https://github.com/goddess5321/classifier_gar | 8ca14459dccb9b3b47d4f5d093af04e3c954183e | 86b3522ad9d545816cb5e56fa5e9edf5a9140e67 | refs/heads/master | 2022-02-18T17:20:58.982776 | 2019-08-28T02:18:22 | 2019-08-28T02:18:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch as t
from torchvision import transforms
import random
def image_transforms(size=224):
fr_transforms = transforms.Compose([
transforms.Resize(size),
transforms.RandomCrop(224),
transforms.RandomHorizontalFlip(),
... | UTF-8 | Python | false | false | 1,788 | py | 1 | data_enhance.py | 1 | 0.536353 | 0.481544 | 0 | 47 | 36.914894 | 104 |
renjch/PythonTeachingProgram | 10,874,857,212,895 | 8801192f93ae582743fae3ad815b978fcbf793d1 | 012793075896cc2a3db3c85b23258166567e94f8 | /tutor/hello-world-third-edition/Listing_13-4_creating_and_using_a_function_that_returns_a_value.py | b341d9587a1847ca7237f33a89ee915363d015ca | [] | no_license | https://github.com/renjch/PythonTeachingProgram | 64e8b7aebd6624dd61213a5c093e1ac6dd071c35 | 7d14fe0719a19f674664e03bb69e7a43547ac8d5 | refs/heads/master | 2021-01-01T01:09:05.091989 | 2020-12-31T04:02:46 | 2020-12-31T04:02:46 | 239,111,742 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Listing_13-4_creating_and_using_a_function_that_returns_a_value.py
# Copyright Warren & Carter Sande, 2009-2019
# Released under MIT license https://opensource.org/licenses/mit-license.php
# ------------
# Function calculates tax and returns total
def calculateTax(price, tax_rate):
total = price + (price * tax... | UTF-8 | Python | false | false | 587 | py | 233 | Listing_13-4_creating_and_using_a_function_that_returns_a_value.py | 224 | 0.710392 | 0.686542 | 0 | 14 | 40.928571 | 97 |
gmdsam/perched-peacock-api | 5,523,327,965,384 | 8fbdbb6a04ef7e153fac0f041a990d628de44150 | 4d2eb0c849892d9d43d239be5a687bc5c297d1f0 | /parking/core/models/parking_entry.py | 5db3e9cafa47857abb70cf099f177cbd3a04f10c | [] | no_license | https://github.com/gmdsam/perched-peacock-api | 7a5599a0aeb59b5b7ee6427ce1e89d83404aa1b3 | 37b5edfa015d5dc44dd08083ef88898566c7cbb0 | refs/heads/master | 2020-08-12T00:32:21.473532 | 2019-10-15T00:31:33 | 2019-10-15T00:31:33 | 214,656,755 | 0 | 0 | null | false | 2019-10-15T00:31:34 | 2019-10-12T14:01:20 | 2019-10-15T00:27:54 | 2019-10-15T00:31:33 | 18 | 0 | 0 | 0 | Python | false | false | class ParkingEntryModel:
def __init__(self, arrival_date, arrival_time, departure_date, departure_time, vehicle_type, vehicle_number=None):
self._arrival_date = arrival_date
self._arrival_time = arrival_time
self._departure_date = departure_date
self._departure_time = departure_time... | UTF-8 | Python | false | false | 409 | py | 15 | parking_entry.py | 11 | 0.677262 | 0.677262 | 0 | 9 | 44.444444 | 118 |
azad17/api_test | 10,557,029,624,916 | 1acb37ff430a04a4f2e396789a71f2a373917d43 | 3e552827febbef77de1e0c1e6d4de693c24565d3 | /global_api/api/v1/views.py | 9416e9aaa13074422d649386e0a1ccb97f420e37 | [] | no_license | https://github.com/azad17/api_test | 72c1b64abc07e838a1aada051631bf64c77cd16b | 48b526c1a2cb4c71e6258814572be417f664aef4 | refs/heads/main | 2023-08-21T14:22:24.325261 | 2021-09-22T10:11:15 | 2021-09-22T10:11:15 | 408,840,662 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime as dt
import json
import time
import urllib
from collections import defaultdict
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
SHIFT_API_URL = 'https://gitlab.com/-/snippets/2094509/raw/master/sample_json_1.json'
MACHINE_API_URL ... | UTF-8 | Python | false | false | 6,998 | py | 2 | views.py | 2 | 0.553158 | 0.539011 | 0 | 154 | 44.435065 | 119 |
mullenkamp/ecan-water-reports | 17,231,408,794,835 | a0ac5a8483e5b693bfafb3d72269649e98404e03 | 016ffb3019de50a03230a7bde6ce164fea75fc9f | /core/util.py | e49298b9f46029d6c92ec8ca08d8740eb3eac703 | [
"Apache-2.0"
] | permissive | https://github.com/mullenkamp/ecan-water-reports | 0b9a44a49304315e80ff9903f7365e755b61bd5f | ca6b903e0df8889e81fa1efc31abc8c9e25f04d4 | refs/heads/master | 2021-04-03T08:59:34.848743 | 2021-02-16T00:18:18 | 2021-02-16T00:18:18 | 125,106,083 | 0 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 8 13:07:42 2018
@author: MichaelEK
"""
import pandas as pd
import geopandas as gpd
def grp_ts_agg(df, grp_col, ts_col, freq_code):
"""
Simple function to aggregate time series with dataframes with a single column of sites and a column of times.
Parameters
... | UTF-8 | Python | false | false | 2,875 | py | 76 | util.py | 6 | 0.610087 | 0.595826 | 0 | 102 | 27.186275 | 125 |
ChMcg/oop-labs | 7,378,753,816,783 | 48519ebe24b0391862e4d8451a71cb0c33c22c9f | 2ecae2d06656e5677faf7d347d7137c9d0809830 | /src_07/App.py | 90cbb792f2eadca942f3f07e78c1e1be46c3161d | [] | no_license | https://github.com/ChMcg/oop-labs | ee6fed35539341e75fe1d4ee73c1fcd7586f5674 | ca321941540ab3fd40e86ab0d090fc4f0ae559ec | refs/heads/master | 2022-08-22T19:23:47.029503 | 2020-05-25T16:52:47 | 2020-05-25T16:52:47 | 258,827,971 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from src_07.ui.lab_7_ui import Ui_Form as MainDialog
from src_07.MyWidget import MyWidget
from src_07.Drawable import GridType, DrawableType
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtCore import QRect
class MainDialog_mock(MainDialog):
def __init__(self):
... | UTF-8 | Python | false | false | 5,322 | py | 49 | App.py | 38 | 0.613863 | 0.605387 | 0 | 143 | 36.125874 | 91 |
Liberty3000/plato | 15,144,054,729,690 | 5e19307c0294673a52ddfe2286881f7bf82fcb55 | cfce9c7fd43f48c28740e76cb02313adbb5624bd | /plato/environment.py | 54be5c197a539b75cbdb7635fcfb997cf928413f | [] | no_license | https://github.com/Liberty3000/plato | eaa6ae5d53cb3c8c92ced13241c18aca9790cb43 | db9a68bcd78bbcfd4791f980e4abc9cbbffbd870 | refs/heads/master | 2020-09-07T16:21:43.476285 | 2019-12-15T03:40:54 | 2019-12-15T03:40:54 | 220,841,689 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import gym, random, os, time, tqdm
import numpy as np, matplotlib.pyplot as mp
from plato.actions import attack, patrol
from plato.features import global_features
from plato.entity.util import plot_entities, randomize_entities
from plato.objective.util import plot_objectives, encode_objectives
from plato.router import ... | UTF-8 | Python | false | false | 10,297 | py | 40 | environment.py | 19 | 0.610081 | 0.605322 | 0 | 240 | 41.904167 | 108 |
plovesm/filesorter | 7,980,049,282,799 | 88b41f0d8ea3ff45f2f66fdcd916778021593783 | 1194525ce6479cd8f69ea69a2c00a648cb1aeecd | /app/db_util.py | bcc187be70bf3cb14e7d0bfa6a715e47a3025bde | [] | no_license | https://github.com/plovesm/filesorter | 6bcb05b140ea48350f42c29d14c4d818d19ca7b3 | 34e8cbce2605569036417a404090da5803c12967 | refs/heads/master | 2020-04-06T04:43:13.453405 | 2017-06-27T04:23:07 | 2017-06-27T04:23:07 | 82,888,200 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright 2017
# Author Paul Ottley
import sqlite3
from objects import FSfile
from datetime import date
class DatabaseUtil:
def __init__(self):
self.conn = None
@staticmethod
def open_connection(name="test.db", detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES):
conn = sq... | UTF-8 | Python | false | false | 2,895 | py | 48 | db_util.py | 32 | 0.553022 | 0.547841 | 0 | 90 | 31.166667 | 116 |
cobuildlab/ezonseller-backend | 10,436,770,542,320 | a5c5d68471f5666ae6d93d15c529fec24f65aef1 | c763799e28b94847edfa31e0a81792d0631b2911 | /payment/migrations/0003_auto_20180111_0413.py | 600d5024f1a57153c93083896d7c4d8168e4e545 | [] | no_license | https://github.com/cobuildlab/ezonseller-backend | 4680ddbe0dc4dbe866dde9a19e954918365f290d | 5ece80c6c2974790744035a5ae95d9df77648583 | refs/heads/master | 2021-07-12T09:23:25.384165 | 2019-04-24T03:48:23 | 2019-04-24T03:48:23 | 115,121,338 | 0 | 0 | null | false | 2021-06-02T02:58:45 | 2017-12-22T14:15:21 | 2019-06-21T17:30:35 | 2021-06-02T02:58:45 | 215 | 1 | 0 | 6 | Python | false | false | # Generated by Django 2.0 on 2018-01-11 04:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('payment', '0002_auto_20180111_0247'),
]
operations = [
migrations.RemoveField(
model_name='plansubscription',
name='ac... | UTF-8 | Python | false | false | 575 | py | 78 | 0003_auto_20180111_0413.py | 70 | 0.596522 | 0.544348 | 0 | 22 | 25.136364 | 122 |
rcisterna/perchess-py | 5,918,464,955,125 | 8b2ed93ffb097e260b00913a829bad69d9cf264d | cf5d2b3cce51ae4ada792720164f92edf13db3ea | /perchess/pieces/__init__.py | e61ff3022b6353f94322c89712f1fa4e8af3d060 | [] | no_license | https://github.com/rcisterna/perchess-py | 95d6f49d5e884f1433d4572f882701765e00a742 | fbd6650df6806345deb8bd801c3886e2f87cc54b | refs/heads/master | 2022-11-14T04:43:38.731098 | 2020-07-05T02:36:21 | 2020-07-05T02:36:21 | 275,480,785 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Piezas de ajedrez.
"""
__all__ = [
"Movement",
"Colors",
"Piece",
"Pawn",
"Bishop",
"Knight",
"Rook",
"Queen",
"King",
]
from perchess.pieces.colors import Colors
from perchess.pieces.movement import Movement
from perchess.pieces.piece import Piece
from perchess.pieces.bishop ... | UTF-8 | Python | false | false | 530 | py | 19 | __init__.py | 16 | 0.713208 | 0.713208 | 0 | 26 | 19.384615 | 45 |
Geek-Tekina/Coding | 16,698,832,864,015 | dbfefd322cf9249eb5261e52d33ddebbbb7df616 | 6e652507874d4f6835092e6e504525d71bc1a48d | /Python/hackerrank/Polar cordinates.py | ac07b0e78c15c33ec6904ce4f03d8f8c9d9ca58e | [] | no_license | https://github.com/Geek-Tekina/Coding | be4876b2b3b9a16f32c92bb1cabb3694fb03a837 | 15ee5c830dbf02d90cc972355c5054471985ebc5 | refs/heads/main | 2023-08-07T11:17:58.362604 | 2021-10-01T08:47:25 | 2021-10-01T08:47:25 | 412,362,390 | 2 | 0 | null | true | 2021-10-01T06:58:49 | 2021-10-01T06:58:49 | 2021-10-01T06:15:25 | 2021-10-01T06:32:31 | 408 | 0 | 0 | 0 | null | false | false | import cmath
a = complex(input())
b = list(cmath.polar(a))
print(b[0])
print(b[1])
| UTF-8 | Python | false | false | 90 | py | 89 | Polar cordinates.py | 86 | 0.6 | 0.577778 | 0 | 6 | 13 | 24 |
fjy960120/python-9th-exercise | 8,349,416,427,404 | 70fc99279eb8e70eacf3625c86b609b58e53fbc7 | a8bd91d5b39bd9cc436c0b1454bc485ab9431109 | /9.1.py | bcada02014900b99cef098a9626c5d03a69f7390 | [] | no_license | https://github.com/fjy960120/python-9th-exercise | 28d05b03164d3590bead9724ccc1ef5fcfc94930 | 38d2ff72c3068ca541164941a63a63350a2b988b | refs/heads/master | 2020-06-29T16:47:02.190328 | 2019-08-05T02:57:01 | 2019-08-05T02:57:01 | 200,570,785 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Dog():
"""一次模拟小狗的简单尝试"""
def __init__(self,name,age):
"""初始化属性name和age"""
self.name = name
self.age = age
def sit(self):
"""模拟小狗被命令时蹲下"""
print(self.name.title()+" is siting now")
def roll_over(self):
"""模拟小狗被命令时打滚"""
print(self.name.title()+... | UTF-8 | Python | false | false | 2,499 | py | 10 | 9.1.py | 9 | 0.612022 | 0.603615 | 0 | 68 | 34 | 78 |
adafruit/Adafruit_Learning_System_Guides | 2,972,117,410,002 | 61ef9a3984f5b534b9ea259f2652f551219d0243 | 091a6200be74bf6577c86f623665bcc24e16b02b | /NeoKey_BFF_Examples/CP_Keyboard_Example/code.py | 8814a1ab9f2df376b6247bdd0e8346d631f31cb8 | [
"MIT"
] | permissive | https://github.com/adafruit/Adafruit_Learning_System_Guides | b5f7bce40a16da64e7a79d4b39de032f2cca41d4 | 5eaa7a15a437c533b89f359a25983e24bb6b5438 | refs/heads/main | 2023-09-05T18:31:41.621956 | 2023-09-05T15:36:09 | 2023-09-05T15:36:09 | 105,065,494 | 937 | 937 | MIT | false | 2023-09-12T18:48:53 | 2017-09-27T20:22:44 | 2023-09-09T07:27:13 | 2023-09-12T18:48:52 | 513,998 | 894 | 760 | 53 | C | false | false | # SPDX-FileCopyrightText: 2023 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Basic HID Macro with NeoKey BFF Example"""
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import neopixel
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycod... | UTF-8 | Python | false | false | 1,339 | py | 2,303 | code.py | 1,801 | 0.713966 | 0.698282 | 0 | 52 | 24.75 | 83 |
aikinogard/basis1d | 17,111,149,714,040 | eabebe8417da5d1472831ae701ed96c3cecd6769 | c739c9d6ec368bf06fd7da2b95ccf15a11c6ef90 | /basis1d/cgbf.py | 7aedc19f64e35708a70192c248e756355f4df513 | [] | no_license | https://github.com/aikinogard/basis1d | fe08c4bfa81764368b6b7adfb035e60832eaf02f | 5fb6cf05371dbd0cbfa45159935d621c4326bd0c | refs/heads/master | 2020-05-31T21:29:34.085159 | 2015-05-07T20:17:40 | 2015-05-07T20:17:40 | 33,433,737 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import array
from basis1d.pgbf import pgbf
from basis1d.tools import S
class cgbf:
contracted = True
def __init__(self,origin=0,power=0,exps=[],coefs=[]):
self.origin = float(origin)
self.power = float(power)
# cgbf is made by list of pgbf
self.pgbfs = []
# the coefficient of each pgbf
... | UTF-8 | Python | false | false | 1,310 | py | 21 | cgbf.py | 12 | 0.675573 | 0.671756 | 0 | 53 | 23.735849 | 87 |
dan9thsense/contest_submission | 6,493,990,590,264 | e74fe729920ba0ae9df0632d87b4e152785c6b04 | 5316f01200ab0ffa6988d311aed8218c60b5261e | /submission/test_submission/runDocker.py | 5d9fcfeaf40164199bbabb65d6e6635ecaa6fbf2 | [] | no_license | https://github.com/dan9thsense/contest_submission | e5a0098871b825a4d123ee7763bd81195a996470 | 7f24e5d8257e7560bc5f3cb1ccad0f12d6594c8d | refs/heads/master | 2020-08-30T12:55:00.894801 | 2019-10-29T21:39:42 | 2019-10-29T21:39:42 | 218,386,935 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import importlib.util
from animalai.envs.gym.environment import AnimalAIEnv
from animalai.envs.arena_config import ArenaConfig
MULTIPLE_CONFIGS = True
NUM_EPISODES = 2
def main():
# Load the agent from the submission
# this is the standard way that python 3.5+ versions import a file
# and a class within ... | UTF-8 | Python | false | false | 4,408 | py | 36 | runDocker.py | 10 | 0.609347 | 0.60118 | 0 | 109 | 39.440367 | 121 |
panuta/thaihealthplm | 6,837,587,941,755 | eb0ff8ba6b8956f667b1e2687b610338a2115249 | 58b5035b8de1d2e60917f27b66fe28c190610861 | /homepage/urls.py | a6d2173fb40b37bc2a47184820883db3649a53d3 | [] | no_license | https://github.com/panuta/thaihealthplm | 9babe9ad70028dea90d1ea240a06087c78b8d15a | 4d62e2eed5ea9bad9c4ee78be8bb9b7cd8e00a04 | refs/heads/master | 2020-04-15T04:24:14.006943 | 2010-07-16T13:31:46 | 2010-07-16T13:31:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls.defaults import *
urlpatterns = patterns('homepage.views',
url(r'^home/$', 'view_dashboard', name='view_dashboard'),
)
| UTF-8 | Python | false | false | 151 | py | 31 | urls.py | 20 | 0.675497 | 0.675497 | 0 | 6 | 24.166667 | 61 |
stevenzjj/niuyuan_platform | 16,243,566,338,104 | 9cc6342b73ed85ead05cb03169dfd8a36c7ee3c1 | 92b9dd58e4fa5d1513f3a3ba19cfc7623450c987 | /host_mgr/action_list.py | da8537a9ba95de1c4d0e82aa79f8e0b6d4ed6a55 | [] | no_license | https://github.com/stevenzjj/niuyuan_platform | 58fc0aa179aa23ea2e1bdfefa74440ba72998536 | ca89993db293e79d8f95444080a1dcd6db91e429 | refs/heads/master | 2018-04-20T05:17:38.293782 | 2017-11-21T02:09:31 | 2017-11-21T02:09:31 | 90,713,035 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from host_mgr.plugins import cmd, state
actions = {
"cmd": cmd.CMD,
"state": state.State,
}
| UTF-8 | Python | false | false | 151 | py | 56 | action_list.py | 44 | 0.582781 | 0.576159 | 0 | 8 | 17.25 | 39 |
cuevas1208/Tradebot | 11,149,735,118,877 | 4026768ea47689def101f11c9cbbfade674d7413 | 5af641702c966f63d3443c0545c14eaaa4e20cde | /src/sklearn_main.py | 5b1f5a5335424dc8f9939d47ad402be617529e46 | [
"MIT"
] | permissive | https://github.com/cuevas1208/Tradebot | cea8d279b6a0bffd69bebde64484a8278c8d6518 | f6499bc75d625414c9a474c774912cb502a153d8 | refs/heads/master | 2021-01-23T02:06:02.692145 | 2020-04-26T19:41:20 | 2020-04-26T19:41:20 | 92,904,911 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # skelearn.py
# Prepare dataSets for training
# techniques learn on the bottom site were implemented
# to build this ml module
# referene https://pythonprogramming.net/machine-learning-stock-prices-python-programming-for-finance/
################################################################################
import a... | UTF-8 | Python | false | false | 8,712 | py | 209 | sklearn_main.py | 18 | 0.635675 | 0.628673 | 0 | 257 | 32.898833 | 114 |
Sohoni-Agarwal/QA_CommunityForum | 8,280,696,972,159 | 2943ca5d54b6be3988f153aa0ad8041bead4dd99 | a5feac3c37c18ad4d8c1391fce1f4c02a512081e | /admins/urls.py | 892233402212440ffe139b60de52c29061038c3c | [] | no_license | https://github.com/Sohoni-Agarwal/QA_CommunityForum | 76bcadea338dab35b0aafbe936dfc91507b5f8ab | f9482149ce0a91e8f24d34913f03fb9764d07f6c | refs/heads/master | 2022-12-17T18:12:43.348442 | 2019-11-05T14:56:25 | 2019-11-05T14:56:25 | 213,489,504 | 0 | 0 | null | false | 2022-12-08T06:41:28 | 2019-10-07T21:22:34 | 2019-11-05T15:08:58 | 2022-12-08T06:41:26 | 48,013 | 0 | 0 | 8 | HTML | false | false | from django.urls import path
from QA_CommunityForum import views
urlpatterns = [
# path('', views.index),
# path('', views.HomePageView.as_view(), name='home')
]
| UTF-8 | Python | false | false | 171 | py | 150 | urls.py | 110 | 0.672515 | 0.672515 | 0 | 7 | 23.428571 | 57 |
crowdbotics-apps/web-23-dev-6461 | 11,673,721,135,817 | ee493bfbfb98f18704c1df4170da1e101fa6a32d | bf72dbcc8cdeeab0c1570269fdaeb44987fd944e | /home/migrations/0003_auto_20200623_0752.py | 6553287ab8d0c60eaa35282ae05ebee028038f12 | [] | no_license | https://github.com/crowdbotics-apps/web-23-dev-6461 | 8dffd49588ff0ea8538f1888b398391f90956a54 | 1d1b8e8c163873a4cbecacc73b921291389929ce | refs/heads/master | 2022-11-11T18:25:25.479658 | 2020-06-23T07:58:32 | 2020-06-23T07:58:32 | 274,312,991 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2.13 on 2020-06-23 07:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("home", "0002_load_initial_data"),
]
operations = [
migrations.AddField(
model_name="customtext",
name="ghfjhfgjhgfj... | UTF-8 | Python | false | false | 585 | py | 2 | 0003_auto_20200623_0752.py | 2 | 0.588034 | 0.553846 | 0 | 23 | 24.434783 | 64 |
SagittariusA-Star/AST5220-Milestone-I | 3,100,966,411,720 | 21950f0c931fbc7fbe6644791050c214bceeac4c | 8668ef7e84aa9dd9f595c8959936a288de1ae0f2 | /src/plot_recombination.py | 2476f245f56bbf618c4b8abd45b413b01ace60c8 | [] | no_license | https://github.com/SagittariusA-Star/AST5220-Milestone-I | c38575f085b9b0c3eae02af0ab5e84e7d97feea3 | 3525cf59a40854747d695b658307b53f2ddb8089 | refs/heads/master | 2020-12-26T22:15:14.736156 | 2020-06-08T18:08:31 | 2020-06-08T18:08:31 | 237,663,441 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from astropy import constants as const
from astropy import units as u
plt.style.use("bmh")
fonts = {
"font.family": "serif",
"axes.labelsize": 18,
"font.size": 12,
"legend.fontsize": 18,
"xtick.labelsize": 12,
"ytick.labelsiz... | UTF-8 | Python | false | false | 8,638 | py | 34 | plot_recombination.py | 10 | 0.584395 | 0.532878 | 0 | 279 | 29.960573 | 125 |
qimo00/timo | 10,711,648,477,831 | 720953b131d21ca437a75bde9afed3d6f4fa08aa | 86146192c0162428887102cdd15f43d338216ee9 | /test1_login()def.py | ebdd3f0da43f3ad9e228dcf7b55c38f75490a767 | [] | no_license | https://github.com/qimo00/timo | 46d894323a2a82c8170162f343d1c5d5ed1fa690 | 01f5a1e6ef304479fd806cc607cd99f3c2d8ba41 | refs/heads/master | 2021-01-18T20:56:58.736075 | 2017-04-25T09:56:14 | 2017-04-25T09:56:14 | 69,218,151 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | user_data={}
def logIn():
while True:
print('|---新建用户:N/n---|')
print('|---登录账号:E/e---|')
print('|---退出账号:Q/q---|')
print('请输入命令代码:')
command=input()
if command=='N' or command=='n':
newC()
# continue
elif command=='E' or command=='e':... | UTF-8 | Python | false | false | 1,240 | py | 43 | test1_login()def.py | 41 | 0.438343 | 0.438343 | 0 | 50 | 19.76 | 43 |
bartek412/IntermediatePythonCourse | 3,788,161,202,313 | 0d6fc7afb19473bc50773413e61171b5c9cd428a | 504cbe0df5cc4ff320b4f3168414b7168c04e392 | /task49_args&kwargs.py | 67ec37c1ac69ba4730237fd53dccc8d2b1d316fe | [] | no_license | https://github.com/bartek412/IntermediatePythonCourse | 5f93e4c86f3c883a719b8da0283b48e2a0053926 | 73a41a0017906c982f23eaa5a6d50cd44469ceef | refs/heads/master | 2020-09-02T05:31:31.857296 | 2020-01-09T15:25:27 | 2020-01-09T15:25:27 | 219,142,963 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def calculate_paint(efficency_ltr_per_m2, *args):
return sum(args)*efficency_ltr_per_m2
print(calculate_paint(2, 10, 12, 28))
area = [18, 21, 32, 42]
print(calculate_paint(2, *area))
def log_it(*args):
with open(r'C:\Users\barte\Documents', 'a') as f:
for string in args:
f.wr... | UTF-8 | Python | false | false | 463 | py | 17 | task49_args&kwargs.py | 17 | 0.600432 | 0.552916 | 0 | 18 | 23.833333 | 54 |
biseshbhattarai/Transaction-Microservice | 5,360,119,216,023 | 14ce7d77215848b80a8738629c73963aa760232d | d12a9ae0b4ca53f6ecc2e525e77aaefa908059c5 | /shopapp/shoptrans/urls.py | e2bcbfef1d6fcba8dcf03f84c9aed39c0a15881b | [
"MIT"
] | permissive | https://github.com/biseshbhattarai/Transaction-Microservice | 64a4dbb4a279a0fae7ec8a4a8760fad787c43b18 | 32226e339d53842d6178f50d5988880e7a7ae7c3 | refs/heads/master | 2020-03-24T14:10:24.384598 | 2019-01-21T15:01:48 | 2019-01-21T15:01:48 | 142,761,062 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from . import views
from .views import CreateTransaction, ProductUpdateView, SingleDayApiView,ProductApiView, CapitalApiView,UserApiView ,CategoryApiView, ProductDetailView
urlpatterns = [
path('',views.main, name="main"),
path('<int:pk>/', views.transaction, name="product"),
... | UTF-8 | Python | false | false | 940 | py | 26 | urls.py | 19 | 0.687234 | 0.687234 | 0 | 23 | 39.869565 | 153 |
TheURBN/turg | 2,817,498,569,667 | c179cb149a596217b8a4f8dad39dd063035df42e | b68691423cc1c937cd13994fcb2e641ca6d9cae1 | /turg/logger.py | 36e9000263318761401cceadc441b95e3756d49d | [
"Apache-2.0"
] | permissive | https://github.com/TheURBN/turg | 54db64a35dc500364a6c20a56caffa0241ce006f | 93e459ac3adc606a9f1b15acfe414fc8d3550c10 | refs/heads/master | 2021-08-07T00:59:55.531564 | 2017-11-07T08:03:00 | 2017-11-07T08:03:00 | 106,119,564 | 8 | 6 | null | false | 2017-11-07T08:03:01 | 2017-10-07T18:07:57 | 2017-10-26T09:45:28 | 2017-11-07T08:03:01 | 895 | 2 | 4 | 0 | Python | false | null | import logging
from logging import getLogger
logging.basicConfig(
format='[{asctime:15}] [{name}.{funcName}:{lineno}] {levelname:7} {message}',
style='{',
level=logging.DEBUG,
)
__all__ = ['getLogger']
| UTF-8 | Python | false | false | 216 | py | 21 | logger.py | 11 | 0.652778 | 0.638889 | 0 | 10 | 20.6 | 81 |
Lockeysama/DistributedCrawler | 10,642,928,989,219 | 974bfe01aee2b8e9f675f05b68120d838ec8b307 | 860727752bc604ec0253f989dd4fa16a9bf1bf62 | /tddc/base/util/util.py | 59714a9d5eec1c69f7522c23d34ffeb6b8c343b7 | [] | no_license | https://github.com/Lockeysama/DistributedCrawler | 32ed72ca3c75c0b9dea5623d1f6b38e192ff4fc9 | 6c9bfd328fd638b6274e993371c63cf273fd121d | refs/heads/master | 2021-10-26T02:53:43.604118 | 2019-03-11T03:09:41 | 2019-03-11T03:09:41 | 88,815,003 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 2017年5月5日
@author: chenyitao
'''
import json
import time
import datetime
from collections import defaultdict
class Singleton(type):
"""
单例metaclass
"""
def __init__(cls, name, bases, dict):
super(Singleton, cls).__init__(name, bases, dict)
cls.... | UTF-8 | Python | false | false | 1,290 | py | 70 | util.py | 69 | 0.559429 | 0.55309 | 0 | 57 | 21.140351 | 76 |
kalekseev/django-stubs | 8,881,992,368,129 | e41e4fcd2b80f835d9f1b4e756996ee1e29456e4 | c564a1244a6e63396b5800238092b10f6b8b4d8a | /django-stubs/contrib/gis/geos/polygon.pyi | d6aac49cefa74c87fbfdf6b4f58e41616e87beb5 | [
"MIT"
] | permissive | https://github.com/kalekseev/django-stubs | efc12c8a2003efdf5d4562c1e81e7df286f0fd43 | 1a36c6c379693ed4a472058748e00473cd229eac | refs/heads/master | 2022-05-27T21:16:42.218106 | 2022-05-06T06:00:21 | 2022-05-06T06:00:21 | 176,074,455 | 1 | 0 | MIT | true | 2022-05-06T08:51:10 | 2019-03-17T08:22:55 | 2022-03-24T21:40:59 | 2022-05-06T08:51:09 | 2,558 | 1 | 0 | 0 | Python | false | false | from typing import Any
from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
class Polygon(GEOSGeometry):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __iter__(self) -> Any: ...
def __len__(self): ...
@classmethod
def from_bbox(cls, bbox: Any): ...
@proper... | UTF-8 | Python | false | false | 509 | pyi | 199 | polygon.pyi | 189 | 0.579568 | 0.579568 | 0 | 19 | 25.789474 | 73 |
sm2774us/Algorithms | 6,236,292,513,969 | 1bf6b4c8709d9ba37bc5097679b3ff6be41baa3d | a79e3ffc9d8bc92d3c05d3900917811ada4a2e7e | /run_all_tests.py | ad055216a0ddfadc387a06c9862ea4be8078d4ae | [] | no_license | https://github.com/sm2774us/Algorithms | 93b99e67468363db5fd87a1fb296e25cfa1421cf | 917af20e4780ef9af061b5d585e5ae1650f52135 | refs/heads/master | 2021-12-02T16:57:03.767556 | 2021-10-06T03:46:27 | 2021-10-06T03:46:27 | 163,911,523 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os
if __name__ == "__main__":
# working_dir = os.getcwd()
working_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = "."
# Use a one-line list comprehension to get all the files in a given directory with a given file basename.
res = [
os.pat... | UTF-8 | Python | false | false | 1,505 | py | 37 | run_all_tests.py | 22 | 0.631229 | 0.631229 | 0 | 29 | 49.896552 | 126 |
Wolfwalker96/ImageProcessing-RoadDetection | 816,043,825,944 | be06760eaef945e4ac8fd009f0187ea4129dde39 | c4f9fc7e4118ca471ede37c0c037e5822b24f6e4 | /methode_one/methode_one.py | a960ddc4ed458c46245e326fde01d8076c76ca0e | [
"MIT"
] | permissive | https://github.com/Wolfwalker96/ImageProcessing-RoadDetection | a5a635fee462be222d601f2caf85f4cb03b950d4 | a1321012b12e3b63c3a63cb3d2518cccc701b2ec | refs/heads/master | 2021-01-24T12:12:22.599190 | 2018-05-05T19:10:43 | 2018-05-05T19:10:43 | 123,124,044 | 5 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Road contourdetection - Step : FreeScale Cup
Algorithm One - Test
"""
import cv2
import imageio
import time
import numpy as np
import os
def algorithm(filepath):
img_i = cv2.imread(filepath)
img = cv2.cvtColor(img_i,cv2.COLOR_BGR2GRAY)
# Contrast increase
# img = np.array([np.array([ 0 if pixel <... | UTF-8 | Python | false | false | 2,541 | py | 11 | methode_one.py | 9 | 0.605274 | 0.575364 | 0 | 83 | 29.614458 | 131 |
brekkanegg/cram | 17,291,538,374,844 | 574115d9e1c484206df7470e4604d24c3ed7723c | 5ecd254500a753ed33cd6fcca12c165ffd6ed551 | /inputs.py | 04a778fcd5a4dff27b2a4de4bc44d4474e2c4092 | [
"MIT"
] | permissive | https://github.com/brekkanegg/cram | 121a3738b09bf198107c9ef5734f54bc0b97bdba | fa5a7b6921a5e2473980504b85a41bc2d5d6b9f8 | refs/heads/master | 2020-03-07T20:23:52.182434 | 2018-08-22T01:54:54 | 2018-08-22T01:54:54 | 127,696,263 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
import os
import numpy as np
from glob import glob
from PIL import Image
import random
from tensorflow.python.keras.utils import to_categorical
slim = tf.contrib.slim
"""
issue: 이미지 스케일: 0-1
feed_dict로 변경
"""
def unpickle(file):
import pickle
with open(file, 'rb') as fo:
dict... | UTF-8 | Python | false | false | 18,968 | py | 6 | inputs.py | 5 | 0.510449 | 0.489446 | 0 | 511 | 36.082192 | 119 |
duanbibo/UIAUTO | 7,988,639,204,051 | 219df97801d51620d1cbe1888fcb372bff06910f | 0e9f9ec47457fe148120601b75b31b89e8180a62 | /pages/index/patientPage.py | b0f9a3d50f3e6e477da48a1f48edb570552ab0ce | [] | no_license | https://github.com/duanbibo/UIAUTO | 5a2beef7fc48d5692e58406b29c212b80c84c9ea | 97b7ea508146cf293d90756e80161eeb4b91b4b6 | refs/heads/master | 2020-06-23T06:24:53.070009 | 2019-07-24T08:20:42 | 2019-07-24T08:20:42 | 198,543,153 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
患者页面
'''
from common import basePage
import time
class PatientPage (basePage.BasePage):
'''
心之力机构患者相关元素
'''
xzl_intohuanzhe=('xpath','//*[@class="institution-department"]/ul/li[3]/a')
xzl_addone=('xpath','//*[@id="wrapper"]/div/div/div[2]/div/section/div[2]/div/div/div/div[2]/div[1]/b... | UTF-8 | Python | false | false | 1,391 | py | 30 | patientPage.py | 18 | 0.578781 | 0.569279 | 0 | 46 | 26 | 115 |
refikkocoglu/report-generator | 4,604,204,956,443 | 3b8c4e397c302a938a0db1f33a46405831f5e4ff | 63de37890d4cb99f4925a7f27aa25faff3c76b09 | /utils/getent_group.py | 781d3d36cbb24852c9c6ff8bfcc95911b7b85b3c | [] | no_license | https://github.com/refikkocoglu/report-generator | e2aeeb54009d0d063a7ad37615732c07252834a9 | 16feabcaeb68933b1536d392fc09821a78c4f87b | refs/heads/master | 2020-09-06T15:59:59.032588 | 2020-02-10T14:44:23 | 2020-02-10T14:44:23 | 220,472,931 | 1 | 0 | null | true | 2019-11-08T13:31:12 | 2019-11-08T13:31:11 | 2019-09-13T10:22:47 | 2019-09-13T10:22:57 | 247 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2019 Gabriele Iannetti <g.iannetti@gsi.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... | UTF-8 | Python | false | false | 1,314 | py | 27 | getent_group.py | 20 | 0.66895 | 0.659056 | 0 | 45 | 28.155556 | 71 |
KylieLAnglin/agileteacher | 5,231,270,168,497 | 25d3cbcc9ee954e6c849d3a71de4aa6b0b6b3216 | 71211e5435c4eb6f2ab847a5ccd2eb0c1b300b69 | /EAD/hear_vs_hope.py | 49ae916baebeba10079ce999d34abf852f6e6fb7 | [] | no_license | https://github.com/KylieLAnglin/agileteacher | 586d247fd276071dec14e1e9495e7423f74581a1 | 682c3c70debe8e71314b61b166339aec7becc647 | refs/heads/main | 2023-04-05T19:48:59.623705 | 2021-05-10T11:30:32 | 2021-05-10T11:30:32 | 313,020,186 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # %%
import pandas as pd
import statsmodels.formula.api as smf
HEAR = start.RAW_DATA_PATH + "LIWC_Q65.csv"
HOPE = start.RAW_DATA_PATH + "LIWC_Q66.csv"
hear = pd.read_csv(HEAR)
hope = pd.read_csv(HOPE)
hear = qualtrics.select_valid_rows(hear)
hope = qualtrics.select_valid_rows(hope)
cols = qualtrics.search_column_... | UTF-8 | Python | false | false | 2,328 | py | 24 | hear_vs_hope.py | 24 | 0.679124 | 0.667955 | 0 | 83 | 27.048193 | 109 |
hr9457/EDD_1S2019_P1_201314296 | 5,686,536,708,191 | f8f10d1a3829feb5d74a1c65ecbb7a087026d48f | dd72a26fb61f22078a900603ff2ce174595b7f38 | /Cola.py | 2c1a3d8052e39e953f8bf529bf7c3316e648b8d5 | [] | no_license | https://github.com/hr9457/EDD_1S2019_P1_201314296 | 43cf029139b03b9af5a98d2cd70bb9577abf0818 | 4e487e537dd640d41bb2d7899c536b078f474d60 | refs/heads/master | 2022-02-05T21:44:17.759332 | 2019-08-15T05:04:42 | 2019-08-15T05:04:42 | 200,438,152 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
# importaciones
# importacion para lectura y escritura de un archivo
from io import *
# clase nodo
# estructura del nodo
class Nodo:
# metodo contructor
def __init__(self,nombreUsuario,score):
self.nombreUsuario = nombreUsuario
self.score = score
self.siguienteCola = None
#---... | UTF-8 | Python | false | false | 5,695 | py | 16 | Cola.py | 11 | 0.482177 | 0.471115 | 0 | 134 | 41.477612 | 173 |
rileyjohngibbs/hard-twenty | 9,603,546,905,460 | c0140a33e226de272808407beb837d416b341c2a | 3b5afb3c5d274d2068d9d7115d751cab71572843 | /compose_and_test/test_compose.py | 3b3f813cf07ea8e919aa645874caa68272dff349 | [] | no_license | https://github.com/rileyjohngibbs/hard-twenty | 15ace68e7367813cf1594c5f453c4107cc825927 | 02dfc697554058e87575df4b3f8707387e9e95c6 | refs/heads/master | 2022-11-09T02:01:57.099232 | 2022-10-19T16:19:22 | 2022-10-19T16:19:22 | 58,075,059 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
from compose import *
from compose_oneline import compose as compose_oneline
class SimpleTestCase(unittest.TestCase):
def test_compose(self):
c = compose(add, mult, square)
self.assertEqual(144, c(5))
def test_oneline(self):
c = compose_oneline(add, mult, square)
self.assertEqual(144, c(5)... | UTF-8 | Python | false | false | 1,092 | py | 41 | test_compose.py | 35 | 0.698718 | 0.684982 | 0 | 52 | 20 | 54 |
gschen/where2go-python-test | 12,068,858,114,472 | 747160b74c65d80f6cf810c8f89014e0000f9aab | dd4622390bb7122db37a889e647f28004a265ccd | /1906101059王曦/11月/day20191105/10.7.py | 60ac11a5ba0549540f45cbda95d4866c7e19a1a3 | [] | no_license | https://github.com/gschen/where2go-python-test | c8adaa095aa8a095401f98c7b3f8f17c72d0532d | eb9e6011b8d33fa45a6b1ef853affd01a296db21 | refs/heads/master | 2022-12-13T19:45:09.874691 | 2020-10-15T13:12:52 | 2020-10-15T13:12:52 | 211,591,156 | 4 | 1 | null | false | 2022-12-05T07:46:12 | 2019-09-29T02:35:00 | 2020-10-15T13:13:10 | 2022-12-05T07:46:11 | 79,858 | 3 | 1 | 24 | Python | false | false | s = input('请输入一串字符:')
list1 = list(s)
list2 = []
list3 = []
for i in range(len(list1)+1):
for n in range(len(list1)+1):
if i<n and len(list1[i:n])==len(set(list1[i:n])):
list2.append(len(list1[i:n]))
list3.append(list1[i:n])
print(max(list2))
print(list3[list2.index(max(list2))])
| UTF-8 | Python | false | false | 332 | py | 1,595 | 10.7.py | 1,420 | 0.575472 | 0.522013 | 0 | 11 | 27.818182 | 57 |
DJones0101/PHYS201 | 4,750,233,875,096 | d4acbf44b02d60e371b04880c4210ed8a66c468a | 85dc3ec228502c10aa32110cba934e1d181d0f8d | /lab5.py | c5ea9b3e422171db62e5c5e8b0cc737ea98a1b29 | [] | no_license | https://github.com/DJones0101/PHYS201 | 5ce878e581e71dfe256c99481c80e6e3f2e55dfb | 60d7699b8e0de93c1d36428584713b19d60028f9 | refs/heads/master | 2020-03-31T01:16:10.276503 | 2018-12-06T19:02:09 | 2018-12-06T19:02:09 | 151,774,101 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import matplotlib.pyplot as plt, pylab
def part1():
# I (amps)
x = [3.12, 6.18, 9.28, 12.36, 15.52, 18.62, 21.8, 24.9, 28.0, 31.4]
# V (Volts)
y = [ float(v) for v in range(1, 11)]
# This gives m,b from (y = mx + b)
m, b = pylab.polyfit(x, y, 1)
# This calculates the slope for us
sl... | UTF-8 | Python | false | false | 1,723 | py | 4 | lab5.py | 3 | 0.583865 | 0.516541 | 0 | 76 | 21.684211 | 86 |
szabowexler/Udacity | 9,792,525,436,141 | c275cdc891fc5e2631f4acdae4ae1cf7a47d2f14 | 3f66f99ecd3a44d1b70465225fd3f0ccb78e9e5c | /ud120-intro-to-machine-learning/ud120-projects/svm/svm_author_id.py | 79279ee4408ff2cd26bac1b8429aa829944dd3f7 | [] | no_license | https://github.com/szabowexler/Udacity | e32461d61b99a75a8e0809100fd6e2dd64d489ab | 01dc6d9995c74151320ab8ebaa89fe67e498accc | refs/heads/master | 2021-01-09T06:49:56.304451 | 2017-03-31T05:34:01 | 2017-03-31T05:34:01 | 81,118,679 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
"""
This is the code to accompany the Lesson 2 (SVM) mini-project.
Use a SVM to identify emails from the Enron corpus by their authors:
Sara has label 0
Chris has label 1
"""
import sys
from time import time
sys.path.append("../tools/")
from email_preprocess import preproce... | UTF-8 | Python | false | false | 1,229 | py | 7 | svm_author_id.py | 6 | 0.633849 | 0.612693 | 0 | 43 | 27.534884 | 76 |
jin2313/gis_web_01 | 18,176,301,615,495 | 58e6d5bea1cae39f68e1dab11d364c3cb4a237aa | fcef97d8553d4fc179d69af09475df3cb72a4b1b | /articleapp/models.py | d4c1a763fa435c133c978695c883a46908a51809 | [] | no_license | https://github.com/jin2313/gis_web_01 | 642ec6bdeef7fb80fb8294874f7da4702097da5b | 0aab339077919bff476e1fe53022e39e3dee9546 | refs/heads/master | 2023-08-20T13:37:46.742513 | 2021-10-06T00:43:08 | 2021-10-06T00:43:08 | 381,541,653 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib.auth.models import User
from django.db import models
# Create your models here.
from projectapp.models import Project
class Article(models.Model):
writer = models.ForeignKey(User, on_delete=models.SET_NULL, related_name='article', null=True) # null: 입력하지 않아도 된다는 게 아니라 db 내에서 null이 가능하다는 것
... | UTF-8 | Python | false | false | 1,511 | py | 6 | models.py | 5 | 0.714932 | 0.710407 | 0 | 21 | 51.666667 | 146 |
Jash271/azadi | 5,007,931,906,882 | 76ff306bd6804ab6a387868631c8d06a0cf2eb60 | 61bc416290d76f6ed6168d6e5b7a38a10f39990b | /AzadiApp/migrations/0006_watch_trusted_users.py | 52650330d7ecfbe2decdcda765ad822cbacdd8f6 | [] | no_license | https://github.com/Jash271/azadi | fe502408583f15afc496c124a640997f77bddbfc | 5beb19c5a3df721d1dbbef97f9528c71dc223df9 | refs/heads/master | 2020-12-29T12:14:04.939280 | 2020-01-30T04:45:17 | 2020-01-30T04:45:17 | 238,603,813 | 1 | 0 | null | true | 2020-02-06T04:00:28 | 2020-02-06T04:00:27 | 2020-01-30T04:45:32 | 2020-01-30T04:45:30 | 1,458 | 0 | 0 | 0 | null | false | false | # Generated by Django 3.0.2 on 2020-01-29 19:02
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('AzadiApp', '0005_watch_under_attack'),
]
operati... | UTF-8 | Python | false | false | 535 | py | 16 | 0006_watch_trusted_users.py | 10 | 0.642991 | 0.607477 | 0 | 20 | 25.75 | 94 |
bellyfat/mws-orders-webhook | 16,466,904,629,986 | d105940a37460cd941a21eb75d86155d7818bcd7 | 9d1f2a8f878f19da3c787f62fe757649ecdcd133 | /mws/handler.py | 17bc6929ae3e67e4571d7b856a86d4a89d8aef82 | [
"MIT"
] | permissive | https://github.com/bellyfat/mws-orders-webhook | 8151820853ab16c73f86efea35d98360fc2e70a4 | e2b67429ced8c3f54c305d4f1198315d7d86417b | refs/heads/master | 2022-02-26T19:19:39.987322 | 2018-11-16T11:32:10 | 2018-11-16T11:32:10 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from mws import mws
import pymysql
import xmltodict
import json
import logging
import sys
import os
import settings
import boto3
from utils import to_amazon_timestamp
from datetime import datetime, timedelta
logging.basicConfig()
logger = logging.getLogger()
logger.setLevel(logging.INFO)
try:
conn = pymysql.conne... | UTF-8 | Python | false | false | 3,909 | py | 10 | handler.py | 4 | 0.606037 | 0.598619 | 0 | 103 | 36.951456 | 268 |
Canisback/jupyterlab-git | 1,941,325,221,391 | 25788e8d6918a673cda79d9562ae3f99cf4d9d53 | 2f22d004a5defd88102d4c00b33382ef61387c9f | /tests/unit/test_handlers.py | 37e264dc9c903b82bf1de68a31cbb7a4a869c479 | [
"BSD-3-Clause"
] | permissive | https://github.com/Canisback/jupyterlab-git | ccbcec6950f725f31b75290370d396db04dd53bf | 276a42d772e0a13eb4b880c1ea45044cd5821a45 | refs/heads/master | 2020-04-07T13:37:50.672812 | 2018-10-28T20:44:59 | 2018-10-28T20:44:59 | 158,414,790 | 0 | 1 | null | true | 2018-11-20T15:53:41 | 2018-11-20T15:53:41 | 2018-11-19T15:07:49 | 2018-10-28T20:45:00 | 746 | 0 | 0 | 0 | null | false | null | import pytest
from mock import Mock, ANY
from jupyterlab_git import handlers
def test_mapping_added():
mock_web_app = Mock()
mock_web_app.settings = {
'base_url': 'nb_base_url'
}
handlers.setup_handlers(mock_web_app)
mock_web_app.add_handlers.assert_called_once_with(".*", ANY)
| UTF-8 | Python | false | false | 310 | py | 2 | test_handlers.py | 2 | 0.664516 | 0.664516 | 0 | 14 | 21.142857 | 64 |
hsfzxjy/hsfzmun | 10,033,043,632,063 | e5db76a7955f93f1a537b1ff4035135f8a4520e7 | 265712980e01464f92a786e190ef5d4fbe4abbf7 | /server/articles/migrations/0006_auto_20170130_1857.py | 5f25e4bcc7579aab1f1d43a66ce24c5268f66169 | [] | no_license | https://github.com/hsfzxjy/hsfzmun | cde4657deeb3567725ce70751ee2486273ee8882 | 9849cf1904b965cba08680d6bf653dbcb960efc8 | refs/heads/master | 2021-01-11T08:32:01.058823 | 2017-03-02T13:07:41 | 2017-03-02T13:07:41 | 76,778,356 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-30 10:57
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('articles', '0005_article_mentions'),
]
operations = [
migrations.AlterModelOptions(... | UTF-8 | Python | false | false | 435 | py | 138 | 0006_auto_20170130_1857.py | 106 | 0.597701 | 0.549425 | 0 | 19 | 21.894737 | 68 |
frague/ganttchart | 12,137,577,605,058 | aa73c70f40e9bbd41f5b30bfe43c71aa2e7e55b7 | 994139ecd9bc4da96fde512b9711ef4b292534c7 | /ganttchart/category.py | c1af20b8f70227b9c16cba07f53a3fa73cb86976 | [] | no_license | https://github.com/frague/ganttchart | 2cfad5190a93b436224fb2390429c5f8793ac828 | d3b4e10d934c0c2ac05bf7407a52496e5e8905a8 | refs/heads/master | 2021-01-01T16:26:35.706394 | 2013-07-08T08:02:32 | 2013-07-08T08:02:32 | 5,430,823 | 5 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
from exceptions import *
from logging import getLogger
LOGGER = getLogger()
category_color_index = 0
category_colors = [
"#00CCFF", "#CCFFFF", "#88FFA4", "#FFFF99",
"#99CCFF", "#FF99CC", "#CC99FF", "#FFCC99",
"#3366FF", "#33CCCC", "#99CC00", "#FFCC00",
"#FF9900", ... | UTF-8 | Python | false | false | 1,567 | py | 14 | category.py | 11 | 0.567326 | 0.493299 | 0 | 49 | 30.979592 | 63 |
petrov-sergiu/RC_proiect | 1,967,095,062,536 | 682c8db70f9253979f5f33f465035b4c69942326 | 1dff424908804db0e40ea29b78f547fcdd1cb037 | /CoAP.py | f47d4dda97eda5ab29f2ff32feeb79c0a2bcd75b | [] | no_license | https://github.com/petrov-sergiu/RC_proiect | 662c24a995fcd6b3c5724944a84b9c27138a6d6a | 4ccdc688dfda54aa4cfb9f1a72ac0d7737c31e38 | refs/heads/main | 2023-02-18T14:48:28.936964 | 2021-01-22T09:53:57 | 2021-01-22T09:53:57 | 302,594,768 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import socket
import select
import time
from Header import *
from Mesaj import Mesaj
from random import randint
from define import *
import threading
class Coap:
def __init__(self):
self.sock = None #initializez socket cu none
self.port=0 #initializarea portului
self.result="" #initiali... | UTF-8 | Python | false | false | 9,414 | py | 7 | CoAP.py | 7 | 0.608562 | 0.599958 | 0 | 211 | 43.545024 | 191 |
thejqs/pa_wine_shippers | 4,337,916,986,169 | 3299fbb71df868c811a868badcc255f027489afd | 396f44dee6dc79cc311a1228a4c9eb1ad26e904e | /scraper/geolocator.py | b9ba515be4012850712e81c2477382ba8d4e80c3 | [] | no_license | https://github.com/thejqs/pa_wine_shippers | dd4d4cc553c8a31c563c75c5769817d2a72f06de | 0cbf6254d46dada5c47364ab9518498d75536ad2 | refs/heads/master | 2020-06-13T17:20:11.110339 | 2018-10-19T16:59:47 | 2018-10-19T16:59:47 | 75,576,056 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!usr/local/bin/env python3
# python imports
import os
import json
from datetime import date
from collections import namedtuple
import uuid
from pprint import pprint
# external imports
import requests
# project imports
from scraper_config.settings_local import geojson_stub, geojson_key
import file_writer
Geolocator =... | UTF-8 | Python | false | false | 6,943 | py | 19 | geolocator.py | 12 | 0.590379 | 0.587066 | 0 | 240 | 27.904167 | 95 |
Jonathan-aguilar/DAS_Sistemas | 15,453,292,353,081 | b39ec1678dee30a020e667c5ebf0f4440497bacd | 05a70c12df808455100598d8a6fdb5635c641ab8 | /Ago-Dic-2020/rodriguez-martinez-diego-jose/Practica 3/IIterableCollection.py | 0d260f971187c613aaa97968e91caec075d04d3f | [
"MIT"
] | permissive | https://github.com/Jonathan-aguilar/DAS_Sistemas | 991edcc929c33ba9bb8bc84e741b55c10a8420a3 | 4d02efc64161871084df1bff258112351e5d1241 | refs/heads/development | 2023-07-24T12:26:54.698452 | 2021-09-02T20:52:26 | 2021-09-02T20:52:26 | 289,764,892 | 1 | 0 | MIT | true | 2021-09-02T20:52:27 | 2020-08-23T20:54:55 | 2021-06-19T21:30:38 | 2021-09-02T20:52:27 | 173,441 | 0 | 0 | 0 | Python | false | false | from abc import ABC, abstractmethod
class IIterableCollection(ABC):
""" ''Interfaz'' para las collecciones a iterar """
@abstractmethod
def create_iterator(self):
pass
| UTF-8 | Python | false | false | 202 | py | 4,519 | IIterableCollection.py | 1,777 | 0.643564 | 0.643564 | 0 | 9 | 20.222222 | 55 |
tensi3165/Esports_platform | 12,575,664,252,769 | efff1daae2a9dea31e4b3ebc33caba0066d6f6b5 | 153d70a7b7bbada98f937aed470257367e3b6d4f | /esportsplatform_main/forms.py | ecf635330c72abdcc49da64bf98290f9a802ed75 | [] | no_license | https://github.com/tensi3165/Esports_platform | e5992e4a4e5a32142f7a0b27eb41eff6ce8b3093 | 3993892cf5c16675df242eb543acc3cc7f6dd5ec | refs/heads/master | 2020-08-10T09:22:32.865087 | 2020-05-15T12:37:38 | 2020-05-15T12:37:38 | 214,315,384 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from .models import *
class Cmopetition_info_Form(forms.ModelForm):
class Meta:
model = Cmopetition_info
fields = ('c_contact', 'c_rule', 'c_rule_file', 'c_prize', 'c_schedule')
def __init__(self, *args, **kwargs):
super(PostForm, self).__init__(*args, **kwargs)... | UTF-8 | Python | false | false | 373 | py | 11 | forms.py | 7 | 0.619303 | 0.619303 | 0 | 10 | 36.3 | 80 |
alexmorozov/django-template | 3,367,254,402,382 | cd43f022efde0e6a03c797f8ac6ba053d95d1b37 | d641f746f217ab2ee569be7e99457b6a6d645db9 | /{{ cookiecutter.project_name }}/{{ cookiecutter.project_name }}/settings/common.py | 18bc5107498be1a2db90c3bc1d34881c6a6c470b | [] | no_license | https://github.com/alexmorozov/django-template | dc3bf1c23802818bab0bada71c8354a299b83c67 | 3f8d355ab8fce497fe7f04f7aa249866dce15e61 | refs/heads/master | 2021-01-18T21:52:44.234274 | 2016-12-22T13:36:14 | 2016-12-22T13:36:14 | 41,729,382 | 3 | 3 | null | false | 2016-12-22T13:36:15 | 2015-09-01T09:25:12 | 2016-07-21T08:39:54 | 2016-12-22T13:36:14 | 25 | 1 | 2 | 0 | Python | null | null | import os
import sys
TEST = 'test' in sys.argv
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def path(*a):
return os.path.join(BASE_DIR, *a)
# This trick allows to import apps without that prefixes
sys.path.insert(0, path('apps'))
sys.path.insert(0, path('lib'))
sys.path.insert(1, pat... | UTF-8 | Python | false | false | 4,028 | py | 18 | common.py | 7 | 0.518371 | 0.514896 | 0 | 144 | 26.972222 | 79 |
tmpereira/SPC | 7,481,833,043,089 | b4faf13417b1ef2e8277f5ae3422aa0f9c0ce373 | b036c301a4e579e933bfcf27b449ffd6a32c8c40 | /thermo.py | 423a1ca49cd0e9903f4a5fcc5deb1cb29c52fcc1 | [] | no_license | https://github.com/tmpereira/SPC | cab35eb0eb9ae5e3dabb00efe74daae6d0d61501 | 095667743ab449783eacbaa5f94a21d0cba921e3 | refs/heads/main | 2023-01-04T14:46:09.363730 | 2020-11-03T19:36:53 | 2020-11-03T19:36:53 | 309,788,419 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import glob
import matplotlib.pyplot as plt
# funçao para leitura de um arquivo unico
def read_one_file(arq):
f = open(arq, 'r')
matrix = []
for i in f.readlines():
ver = i.split(';')
wn = ver[0].replace(',','.')
wn = np.array(wn).astype('f4')
abss =... | UTF-8 | Python | false | false | 875 | py | 6 | thermo.py | 6 | 0.539519 | 0.531501 | 0 | 31 | 26.16129 | 60 |
Rudra0711/The-Hangman-Game_python | 15,582,141,364,915 | 0ab0f72d16ebaf31d823e1c0654d8024e3213304 | 3f9daccd966a4033fa399e0cd53d543fec67447a | /app.py | dd5711bd74186a2fced2a2badd47f1b8dec4d11e | [] | no_license | https://github.com/Rudra0711/The-Hangman-Game_python | 71842600013e24349ae9d5c713e9f09205f7335e | ec48392eb105cd09c121d97ab31e0c2d2634ae6d | refs/heads/master | 2022-01-05T21:00:17.516210 | 2019-04-29T16:38:21 | 2019-04-29T16:38:21 | 184,107,500 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
WORDS=[];
with open('words.txt','r') as wordsFile:
WORDS=[name.strip() for name in wordsFile.readlines()]
random=random.randrange(1,100,1)
WORDS[random]="decision"
ques_word=["*" for letter in WORDS[random]]
wa=ques_word.count('*')
def genList(ques_word):
for i in ques_word:
print(i,end... | UTF-8 | Python | false | false | 937 | py | 2 | app.py | 1 | 0.559232 | 0.547492 | 0 | 39 | 23.025641 | 84 |
dupoy/ucrm | 9,070,970,959,258 | d536d86348eea2755cb7491915622f98e1926e03 | f62a1f6ae632835283ab9980355785a478988165 | /orders/admin.py | 1539d922645ac54a32869597a7337ae138138e8b | [] | no_license | https://github.com/dupoy/ucrm | b9d014ece41e6f57c544380667c51533a58a1bda | 88692df9f0ee146c8d8fd04be297de9ad5c80f10 | refs/heads/master | 2023-05-07T17:51:44.126929 | 2021-05-27T07:01:35 | 2021-05-27T07:01:35 | 366,280,181 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from orders.models import Order, OrderItem
@admin.register(Order)
class OrderAdmin(admin.ModelAdmin):
list_display = ['customer', 'created_at', 'get_price']
@admin.register(OrderItem)
class OrderItemAdmin(admin.ModelAdmin):
list_display = ['order', 'product', 'quantity', 't... | UTF-8 | Python | false | false | 333 | py | 74 | admin.py | 45 | 0.735736 | 0.735736 | 0 | 13 | 24.615385 | 66 |
Koredotcom/KnowledgeGraphGenerator | 7,164,005,499,375 | 7ccb9605fc50a7b7ead26d89782493d87b9c7936 | e31cc5ed229d10d4fb8fd68a2f93d9f2cccd450c | /strategy/NGramStrategy.py | 1f528104a913df7bb0326d1ba86cf5a9598d777b | [] | no_license | https://github.com/Koredotcom/KnowledgeGraphGenerator | 6ffb8ba8301e131b85b28ba23a95e1a873aa2843 | fc9de1d7cfa68833981e8c7af200845304cea925 | refs/heads/master | 2023-07-06T13:48:07.042219 | 2022-02-28T12:42:54 | 2022-02-28T12:42:54 | 202,364,674 | 14 | 11 | null | false | 2023-06-30T22:20:04 | 2019-08-14T14:15:11 | 2023-05-12T10:58:29 | 2023-06-30T22:20:00 | 2,267 | 10 | 10 | 5 | Python | false | false | from collections import defaultdict
from tqdm import tqdm
from common import nlp, BOT_NAME
from strategy.phrase_finder import PhraseFinder
from log.Logger import Logger
import copy
import traceback
import re
from analyzer.kg_export.language.Lemmatize import Lemmatizer
logger = Logger()
phrase_finder_obj = PhraseFinder... | UTF-8 | Python | false | false | 4,440 | py | 23 | NGramStrategy.py | 20 | 0.500225 | 0.496171 | 0 | 113 | 38.292035 | 112 |
cambridge-cares/TheWorldAvatar | 12,824,772,352,928 | 34297f629903f19b8d8ddf09fa890c83f907e845 | 65c84146c9f3871f54fe51ab437bd14927ade706 | /JPS_ARBITRAGE/python/caresjpsarbitrage/CPO_to_FAME_Aspen.py | 20bd042845860fe0971c7d10a70579c6734314f0 | [
"MIT"
] | permissive | https://github.com/cambridge-cares/TheWorldAvatar | 3a227c629acb10b9be7effe58696aef48b27dd21 | 01a7d108754e0249d8d3b5b75708345c399c1ee9 | refs/heads/main | 2023-08-21T11:05:09.147655 | 2023-08-18T07:46:57 | 2023-08-18T07:46:57 | 345,141,689 | 57 | 26 | MIT | false | 2023-09-13T14:16:57 | 2021-03-06T16:33:07 | 2023-09-13T10:16:00 | 2023-09-13T14:16:57 | 433,486 | 48 | 19 | 149 | Java | false | false | ##
# @file
# File documentation
# This file is a set of functions designed to work as an arbitrage spotter for a chemical plant converting a reagent into a product. The spotter looks through the chemical futures markets for profitable opportunities to purchase the reagent, convert it into the product and then sell the... | UTF-8 | Python | false | false | 18,332 | py | 9,300 | CPO_to_FAME_Aspen.py | 4,926 | 0.688652 | 0.666776 | 0 | 311 | 57.935691 | 482 |
sahu1993/Data-Analytics-Pipeline-Using-Apache-Spark | 4,672,924,451,047 | a09864717deb419ce244500f0476c72815d8c39a | 1abb87f9bbcc40ab026b0f4637c29c8c28c2bd24 | /lab3_pyspak.py | 548bbefe1fb79da876aed4b7a1672f4fec440355 | [] | no_license | https://github.com/sahu1993/Data-Analytics-Pipeline-Using-Apache-Spark | c3dad3d05efa2390f24693399dca962cd89a7608 | c78b2a49a25710c180cd190359075da22e8be02d | refs/heads/master | 2020-03-27T00:39:57.806138 | 2018-08-22T02:28:06 | 2018-08-22T02:28:06 | 145,643,650 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from pyspark import SparkConf, SparkContext
from pyspark.sql import SQLContext
from pyspark.ml.feature import HashingTF, IDF, NGram
from pyspark.sql import SparkSession
from pyspark.ml.feature import StopWordsRemover
from operator import add
from pyspark.ml.classification import LogisticRegression
from pyspark.ml.evalu... | UTF-8 | Python | false | false | 6,305 | py | 37 | lab3_pyspak.py | 2 | 0.72276 | 0.714036 | 0 | 156 | 39.416667 | 107 |
Arash-Pouya/electroshop | 8,727,373,580,423 | 1f61ec9b3f4946e624e5f2234213c2e3aad60c39 | cee3857fc3380501b2d510574db75a2a811f4150 | /shop/models.py | 98b28df6b1df8700a39070dd776a04db4f0c1aed | [] | no_license | https://github.com/Arash-Pouya/electroshop | c0d08da42aee9455b42a31b243fe6fccab37329d | 9ec6d31cd4b353fa6507a0ca82b0f6cc5b7fd5ea | refs/heads/master | 2023-06-19T21:44:00.806592 | 2021-07-14T18:39:53 | 2021-07-14T18:39:53 | 386,035,942 | 1 | 0 | null | true | 2021-07-14T18:41:12 | 2021-07-14T18:16:37 | 2021-07-14T18:39:56 | 2021-07-14T18:41:01 | 2,441 | 0 | 0 | 2 | Python | false | false | from django.db import models
from django.urls import reverse
from django.conf import settings
from django.utils.text import slugify
from django.core.validators import MinValueValidator, MaxValueValidator
from django.contrib.contenttypes.fields import GenericRelation
from wagtail.core.fields import RichTextField
from ... | UTF-8 | Python | false | false | 5,013 | py | 62 | models.py | 49 | 0.635348 | 0.629164 | 0 | 145 | 33.572414 | 108 |
shakibaniataha/script-manager | 5,686,536,713,826 | 50f1af949336a7c9bccb54cbf67b65b3ccdf6d64 | ec80e84042e87a01da51937b6d4ffc01eb87c848 | /main/models.py | b1983c10c0223a8a79b533727e8beddded08e3f7 | [] | no_license | https://github.com/shakibaniataha/script-manager | 276fd5fb4e5426b388c7da17603d835fe4625967 | 55c78afb6a138b536e7f9c049bac23fab4ab81d5 | refs/heads/master | 2021-09-03T13:10:26.711594 | 2018-01-09T08:51:08 | 2018-01-09T08:51:08 | 113,153,933 | 1 | 1 | null | false | 2022-11-20T19:10:03 | 2017-12-05T08:24:28 | 2018-01-06T10:29:21 | 2018-01-09T08:51:14 | 236 | 1 | 0 | 0 | JavaScript | false | false | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from validators import validate_comma_separated, validate_command
class API(models.Model):
name = models.CharField(max_length=100, unique=True)
date_added = models.DateTime... | UTF-8 | Python | false | false | 1,301 | py | 20 | models.py | 12 | 0.704074 | 0.68947 | 0 | 35 | 36.2 | 112 |
suiguan/WebPageRecommander | 5,823,975,668,817 | 809c14bcbda1f95d10bb5887ad79891aab9b996f | ee982a4821094c96c377df3c87e25f697602a194 | /WeblogParser.py | a78c537e428a522c4842b814190d16c814a00a3c | [] | no_license | https://github.com/suiguan/WebPageRecommander | 837f2477de48043eaf42aec6bfa04cd9a4cbcfa8 | fd55958fb82d120417d165e08cfbe42213a9aa16 | refs/heads/master | 2021-01-19T15:25:39.571487 | 2017-05-08T23:39:29 | 2017-05-08T23:39:29 | 88,214,691 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import operator
class Weblog_Parser:
def __init__(self, input_weblog):
self.weblog = input_weblog
self.next_web_id = 0
self.web_id_table = {}
self.user_access_log_table = {}
def get_web_id(self, webpage):
if not webpage in self.web_id_table:
self.web_id_table[... | UTF-8 | Python | false | false | 3,533 | py | 5 | WeblogParser.py | 3 | 0.60685 | 0.591282 | 0 | 92 | 37.402174 | 191 |
jraygauthier/nixos-secure-factory | 2,765,958,971,024 | dc3fd311dd296dee68525a723fa4ffbea734e78d | 41c71d20b60754b0e1a3cfbace693b863d03c977 | /scripts/factory-install/py/tests/test_misc.py | 1ab9ac3aaa873f0ebcfa3ba9366927a78d75b3bf | [
"Apache-2.0"
] | permissive | https://github.com/jraygauthier/nixos-secure-factory | e4f85cc67cdee472ac9273dcebe34e036432bf67 | 67adb93b153902226301d4a68e7b6e3a0af660c2 | refs/heads/master | 2022-10-02T06:04:38.479606 | 2021-03-31T16:44:29 | 2021-03-31T16:45:43 | 199,702,396 | 2 | 2 | Apache-2.0 | false | 2021-11-11T13:46:02 | 2019-07-30T18:00:37 | 2021-04-17T10:13:42 | 2021-11-11T13:45:39 | 931 | 1 | 2 | 0 | Shell | false | false | from nsf_factory_install import my_fn
def test_misc():
my_fn()
| UTF-8 | Python | false | false | 69 | py | 332 | test_misc.py | 216 | 0.666667 | 0.666667 | 0 | 5 | 12.8 | 37 |
juraj80/myPythonCookbook | 1,623,497,653,866 | 78f3b646e0397c229dd4b5e5b3801211de3f7ecb | a24391f3bc3ba4f73db66c723964fe3e91a2f63c | /days/52-54-feedparser/code_starter/parser.py | d80a822bd46cee504281928918efd277d8d837b9 | [] | no_license | https://github.com/juraj80/myPythonCookbook | 41ccbe6262ea53428f04ba2ea80c90c624e2751d | f543d962ec75a3adadf0164c7ebf848b4e149296 | refs/heads/master | 2020-04-14T05:38:32.689829 | 2019-03-31T20:33:26 | 2019-03-31T20:33:26 | 163,664,856 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import feedparser
FEED_FILE = "newreleases.xml"
print(FEED_FILE)
# feed = feedparser.parse(FEED_FILE)
feed = feedparser.parse('newreleases.xml')
print('Feed Title: {}'.format(feed['feed']['title']))
if 'title' in feed.entries[0]:
for entry in feed.entries:
print(f'{entry.published} - {entry.title} : {en... | UTF-8 | Python | false | false | 332 | py | 83 | parser.py | 55 | 0.677711 | 0.674699 | 0 | 13 | 24.538462 | 66 |
TrendingTechnology/hspylib | 12,051,678,274,976 | 1402a2a640041594e464cddeff1e5e224a4bdfce | 153da69b35f032f5b83a06f17008ba41a1b336b4 | /src/main/hspylib/core/enums/http_code.py | 95211125328f1be82ad6c933f1f68a3f7ae5cb16 | [
"MIT"
] | permissive | https://github.com/TrendingTechnology/hspylib | 6400cadf9dfe6ab5733712dcfeccf8022d61c589 | c79a2c17e89fe21d00ccd9c1646a03407cd61839 | refs/heads/master | 2023-06-20T15:47:35.962661 | 2021-07-19T22:12:18 | 2021-07-19T23:45:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
TODO Purpose of the file
@project: HSPyLib
hspylib.main.hspylib.core.enum
@file: http_code.py
@created: Tue, 4 May 2021
@author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior"
@site: https://github.com/yorevs/hspylib
@license: MIT - Please ... | UTF-8 | Python | false | false | 3,401 | py | 311 | http_code.py | 249 | 0.752132 | 0.743311 | 0 | 83 | 39.975904 | 80 |
SebastianFGarcia/Django-AngularLearn | 3,530,463,150,767 | ba411d4ce91518247b4e0b4113b64dddefb5281f | 5db9b8951392c439d209d4a8d4433c331337839b | /DjangoAPI/EmployeApp/models.py | b14042319b4708b3ca3372bf1c7bd3f4ce0b37bd | [] | no_license | https://github.com/SebastianFGarcia/Django-AngularLearn | 72e9bddef792ac9eeec77a9cecd8c7e34f07177f | 11ceac7c6b68bc9dc89cdb405b39c0654882e6cd | refs/heads/master | 2023-03-27T16:39:01.617173 | 2021-03-28T05:43:37 | 2021-03-28T05:43:37 | 350,046,851 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
class Departaments(models.Model):
DepartamentId = models.AutoField(primary_key = True)
DepartamentName = models.CharField(max_length = 100)
class Employes(models.Model):
EmployeId = models.AutoField(primary_key = True)
EmployeName = models.CharField(max_length = 100)
D... | UTF-8 | Python | false | false | 461 | py | 13 | models.py | 10 | 0.741866 | 0.715835 | 0 | 12 | 37.5 | 56 |
merc-devel/merc | 17,248,588,670,981 | 9a3e4ab029242b6436d328d4c6ebd32301ae8df6 | c02b157399f2ede41abf5119e57f94bfe18c713d | /merc/features/rfc1459/ban.py | a7c2fda51ae99dcb094c2cfbdeb739610fc56e99 | [
"MIT"
] | permissive | https://github.com/merc-devel/merc | b366befb6285af984c2da7eabdd1063f16e0414e | 15e010db2474b5d9f9720fc83983b03c95063a02 | refs/heads/master | 2021-01-18T17:15:33.553125 | 2014-11-08T03:02:30 | 2014-11-08T03:02:30 | 25,289,852 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import collections
import datetime
from merc import errors
from merc import feature
from merc import message
from merc import mode
BanDetail = collections.namedtuple("BanDetail", ["server", "creation_time"])
class BanFeature(feature.Feature):
NAME = __name__
install = BanFeature.install
class BanList(message... | UTF-8 | Python | false | false | 2,710 | py | 83 | ban.py | 80 | 0.670111 | 0.66679 | 0 | 103 | 25.31068 | 76 |
mottosso/cortex | 12,343,736,016,481 | c1b5033ccefcd7c372bf44f05c4067b8843c9e97 | ee3785eb0205893a3c5a0946119f59482bd8edc6 | /contrib/IECoreArnold/test/IECoreArnold/RendererTest.py | 2a0a63b75be8a9dddbc555d89e01c5aa4a31ea49 | [
"MIT"
] | permissive | https://github.com/mottosso/cortex | 46f80d093a80bfe1926fd8f6b73d915dcd87f1dd | e2600cef60d380e4fd5e06b8f2fe18c9b52f5afd | refs/heads/master | 2021-01-22T21:27:52.079668 | 2016-08-24T06:52:48 | 2016-08-24T06:52:48 | 66,432,611 | 0 | 0 | null | true | 2016-08-24T05:22:41 | 2016-08-24T05:22:40 | 2016-08-13T09:42:18 | 2016-08-22T22:13:51 | 107,482 | 0 | 0 | 0 | null | null | null | ##########################################################################
#
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
# Copyright (c) 2012, John Haddon. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | UTF-8 | Python | false | false | 28,909 | py | 17 | RendererTest.py | 15 | 0.66315 | 0.635892 | 0 | 848 | 33.090802 | 148 |
fabiogoro/flask-base | 13,005,161,001,450 | d899033d7740accf50b32eb4742667469e0a7c22 | d218947bd5fd4f5d07127eedf1395f68b0c42ed8 | /models.py | ad5dc84bc06bf13c2bc85b9102e4c3c163ec7c6d | [] | no_license | https://github.com/fabiogoro/flask-base | da2e13e4fc3e681cea4375a316965166aec3ea30 | 4afe4db93ab64b51152d214266c0dc66ada4e215 | refs/heads/master | 2023-03-25T21:29:04.526421 | 2020-05-21T00:27:58 | 2020-05-21T00:27:58 | 262,611,046 | 0 | 8 | null | false | 2021-03-20T03:54:23 | 2020-05-09T16:22:37 | 2020-05-21T00:28:51 | 2021-03-20T03:54:23 | 16 | 0 | 10 | 1 | Python | false | false | ## models.py
from banco import bd
class Post:
def __init__(self, titulo, autor, texto):
self.titulo = titulo
self.autor = autor
self.texto = texto
def gravar(self):
sql = '''insert into posts (titulo, autor, texto) values (?, ?, ?)'''
primeiro_interrogacao = self.titul... | UTF-8 | Python | false | false | 1,075 | py | 11 | models.py | 6 | 0.614166 | 0.614166 | 0 | 30 | 34.766667 | 98 |
WillDrug/modelwrapper | 18,580,028,558,705 | 4e23bba14917ad01d6adf1e9dcb457569b8a5bf6 | e7ff00f035457cf6adc22dd7bcb9955a826dc0f6 | /models_handler/core.py | b263835db0c0b5037ace5f73ca1defbc7132bf9f | [] | no_license | https://github.com/WillDrug/modelwrapper | 800ec4e70f0d2f9158e57a40a5bf63094add1939 | e64f40870f9be4c10bf64296bd43a923a6541865 | refs/heads/master | 2022-12-10T18:32:18.570692 | 2018-08-13T17:59:59 | 2018-08-13T17:59:59 | 144,338,927 | 0 | 0 | null | false | 2022-12-08T01:01:46 | 2018-08-10T22:53:08 | 2018-08-13T18:00:08 | 2022-12-08T01:01:45 | 35 | 0 | 0 | 3 | Python | false | false | import base64
import hashlib
from enum import Enum
import importlib
import json
import os
import pkgutil
import shelve
from abc import ABCMeta, abstractmethod
from datetime import datetime
from sklearn.exceptions import NotFittedError
class Config(Enum):
LATEST_TAG = 'latest'
MODELS_FOLDER = 'models'
MODEL... | UTF-8 | Python | false | false | 6,741 | py | 26 | core.py | 21 | 0.600949 | 0.598873 | 0 | 194 | 33.747423 | 119 |
rdecks155/FormFit | 2,216,203,125,282 | f269b1c81df5c0876d9dd69d9a5bb73169427d76 | c04755a61505b52328e2f314bbf2af7058369d72 | /video_processing.py | 256f062d35908d33e59fbe6e68e392244e964e8a | [] | no_license | https://github.com/rdecks155/FormFit | 0c9546c5b6aefcd393f0a754cbb993e3cb9543ec | 70f1bfc8f6da0d702656eaa20f0cb3c68f7c67ae | refs/heads/master | 2023-06-13T22:34:18.800731 | 2021-07-14T19:51:42 | 2021-07-14T19:51:42 | 225,216,573 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # from PIL import Image
# import csv
# im = Image.open('./bar_closeup.jpg', 'r')
import cv2 # for capturing videos
import math # for mathematical operations
import matplotlib.pyplot as plt # for plotting the images
#%matplotlib inline
import pandas as pd
from keras.preprocessing import image # for ... | UTF-8 | Python | false | false | 1,623 | py | 4 | video_processing.py | 3 | 0.602588 | 0.468885 | 0 | 38 | 40.710526 | 166 |
BehzadBozorgtabar/LTS5-ADAS-ME-tool | 377,957,138,726 | e11d5e0f3283978be76c3d970c4b0f9ae330c17f | 131103784ee2cd9d2553a5ab3636ea7ab9e73e7b | /interface/data.py | 6a32129fc79f886b46bc0504d6063cd49cf7d181 | [] | no_license | https://github.com/BehzadBozorgtabar/LTS5-ADAS-ME-tool | c9d32c16d07a1050262b1d60c7b8bce6ce91ad8e | 35e2641932762caced5be2e560c5284520891ebf | refs/heads/master | 2020-03-28T15:44:44.282496 | 2019-01-08T13:01:58 | 2019-01-08T13:01:58 | 148,622,171 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # constant for all
stick = "nesw"
pad = 5
defaultSavePath = "data/files/"
MAX_SEGMENT_SIZE = 1000
SMB_HEADER_SIZE = 20
#constants for video
first_frame = 1
first_index = first_frame - 1
FRAME_INDEX = 1
NBR_FRAMES = 7
MIN_SEGMENT_SIZE = 20
window_width = 640
window_height = 480
SEGMENT_SIZE = 5
delay = 15
#constant fo... | UTF-8 | Python | false | false | 726 | py | 7 | data.py | 6 | 0.705234 | 0.65978 | 0 | 36 | 19.166667 | 68 |
QWQ-pixel/practice_python_2 | 7,447,473,307,050 | 5cd9e0d4f30e15afc6f758246c3667ed014f3182 | c1973d141f0168abcd107ceb28355b7c3e523b60 | /num_12/12.7.py | b34a59a7392cce996f89dfc54411e00a5922b37a | [] | no_license | https://github.com/QWQ-pixel/practice_python_2 | 1a47de7efd0ebf2d7b461007eebe570f92c0c5b4 | 5165b65715223e7192458de8b33b908d371d08d7 | refs/heads/main | 2023-04-05T09:38:35.594789 | 2021-04-14T17:08:06 | 2021-04-14T17:08:06 | 357,983,337 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def scale(n_, m_):
strings = []
for i in range(n_):
strings.append(input())
a, b = round(n_ / 2), round(m_ / 2)
strings = change_string(n_, m_, a, b, strings)
print(*strings, sep='\n')
def change_string(n_, m_, a, b, strings):
count, res = 0, []
for i in range(n_ - a):
if c... | UTF-8 | Python | false | false | 754 | py | 47 | 12.7.py | 47 | 0.506631 | 0.498674 | 0 | 31 | 23.322581 | 50 |
sigfrido/sigdoku | 9,371,618,644,206 | 8b4e54875f41b60ce12bc253305c948c6d193abc | 7fc02c1122de8cc76a22a23ac766981110d59642 | /sigdoku/sudoku.py | 52d3b2f5256ddda6f8a759f3771fa3f322cb2b6c | [] | no_license | https://github.com/sigfrido/sigdoku | 7bf63ef661944263fdab67d526ad13be9f2d85fb | 217fa13aede9b9fe5f1306b7d2567649c4d162b7 | refs/heads/master | 2020-05-27T13:35:10.328186 | 2016-08-19T11:10:35 | 2016-08-19T11:10:35 | 6,645,771 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import solvers
class SudokuException(Exception):
"""
Base class for all sudoku exceptions
"""
pass
class DeniedMoveException(SudokuException):
"""
User attempted a denied move
"""
pass
class OutOfRangeException(SudokuException):
"""
User specifi... | UTF-8 | Python | false | false | 8,943 | py | 7 | sudoku.py | 6 | 0.530694 | 0.52734 | 0 | 356 | 24.047753 | 106 |
qcgm1978/formula | 5,325,759,460,685 | 0375c667df84c0a52cce9832f688847d563e151d | 17e2b54170b0a37153e2ddc894842115b569d45f | /py/datatype.py | d7c2c7271a2b73e4e58a23eef4da5a788bb9d750 | [
"Apache-2.0"
] | permissive | https://github.com/qcgm1978/formula | 7bc9e25d9a29125a425632a1fa6b681c04e1f3b3 | fee12667b585e37b21768f4d165b8bc5f2d4f448 | refs/heads/master | 2022-12-13T05:49:49.416723 | 2020-08-30T04:49:43 | 2020-08-30T04:49:43 | 290,834,162 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas
from sklearn import linear_model, tree
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import r2_score
from sklearn.tree import DecisionTreeClassifier
import pydotplus
from scipy import stats
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib.image as pl... | UTF-8 | Python | false | false | 8,407 | py | 11 | datatype.py | 5 | 0.553467 | 0.545736 | 0 | 248 | 32.899194 | 167 |
averdier/epsi_pt_oracle_api | 17,282,948,420,705 | a2746c0228372ded3c8bdfe5f197c3ca1ccda7bb | f99eac90a1f9cfb87c1f2d584fec61ee04cec8aa | /app/db.py | 9e8c73c2f0a6bfba299a5c293ec3077e25ff030e | [] | no_license | https://github.com/averdier/epsi_pt_oracle_api | 435f4e377b6316c60779a01064e4eacb9d89fb86 | 174ce12ed0aeb67969880d0ddf2fbc59a5cd80fe | refs/heads/master | 2020-03-18T12:42:11.759034 | 2018-07-01T18:27:35 | 2018-07-01T18:27:35 | 134,739,663 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cx_Oracle
conn = None
def connect(uri):
"""
Connect to database
:param uri:
:return:
"""
global conn
if conn is None:
conn = cx_Oracle.connect(uri)
def get_conn():
return conn
| UTF-8 | Python | false | false | 230 | py | 37 | db.py | 32 | 0.565217 | 0.565217 | 0 | 20 | 10.5 | 37 |
SpIinty/league-of-stats | 944,892,811,550 | d02c3e90cfcfa2d7543f21e642a5540f03d4ae2c | 25f6abb8db551f2160d8a0a8376200ff110a15a9 | /runes.py | ebee70e27b5b83cc0352855efe3ba3a82a330adf | [] | no_license | https://github.com/SpIinty/league-of-stats | 59ce203b1e190159dda4ce24c444220707ba7805 | 93d7ee416489c8107694d6294c840e98deb824e8 | refs/heads/main | 2023-05-07T00:06:29.780029 | 2021-06-04T06:05:55 | 2021-06-04T06:05:55 | 370,393,806 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
global RUNES
with open('runesReforged.json') as outfile:
RUNES=json.load( outfile)
class Rune:
def __init__(self,identification):
self.id=identification
for i in RUNES:
for j in i['slots']:
for k in j['runes']:
if(k['id']==s... | UTF-8 | Python | false | false | 984 | py | 15 | runes.py | 8 | 0.410569 | 0.409553 | 0 | 36 | 25.333333 | 54 |
statsmodels/statsmodels | 16,956,530,912,697 | 8f1b735690f2a39ea1590b43fd41783ecc241dce | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/multivariate/factor_rotation/_wrappers.py | e5a5e4b574129e376728a8656dae37189f72634d | [
"BSD-3-Clause"
] | permissive | https://github.com/statsmodels/statsmodels | 98ca67192c08bcc611ed3a75edaded2c7181ab98 | 01b19d7d111b29c183f620ff0a949ef6391ff8ee | refs/heads/main | 2023-09-05T13:05:49.497076 | 2023-09-01T10:54:50 | 2023-09-01T10:54:50 | 1,885,237 | 8,666 | 3,023 | BSD-3-Clause | false | 2023-09-13T17:51:48 | 2011-06-12T17:04:50 | 2023-09-13T17:43:18 | 2023-09-13T17:51:48 | 53,160 | 8,844 | 2,772 | 2,667 | Python | false | false | # -*- coding: utf-8 -*-
from ._analytic_rotation import target_rotation
from ._gpa_rotation import oblimin_objective, orthomax_objective, CF_objective
from ._gpa_rotation import ff_partial_target, ff_target
from ._gpa_rotation import vgQ_partial_target, vgQ_target
from ._gpa_rotation import rotateA, GPA
__all__ = []... | UTF-8 | Python | false | false | 13,637 | py | 1,711 | _wrappers.py | 1,082 | 0.583339 | 0.576813 | 0 | 353 | 37.631728 | 83 |
sdesai95/web_scrape | 3,728,031,661,212 | d2bc28f567300c31f221d90ca839d4d8d1bf6200 | 959098a6a5ccb680ac5088f2da110e55ab4b5485 | /1 rss_scrape/scrape_govt.py | ed6fc70bf1a91dc880c1c93f0503c53a1460308c | [] | no_license | https://github.com/sdesai95/web_scrape | f672f2a73d41350e49c4b3c105c126be9ee22343 | c76b634f322796b8dddc371163f2613bf5c6e723 | refs/heads/master | 2018-07-06T13:06:28.609662 | 2018-07-05T20:10:42 | 2018-07-05T20:10:42 | 128,091,180 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import feedparser
from send_server import get_time, send_data, play_sound, write_file
from get_tickers import get_tickers
webpages = {'https://api2.fcc.gov/edocs/public/api/v1/rss/': 'fcc edocuments',
'http://www.imf.org/external/rss/feeds.aspx?category=WHATSNEW': 'imf news',
'https://www.epa.g... | UTF-8 | Python | false | false | 3,402 | py | 38 | scrape_govt.py | 37 | 0.6408 | 0.627866 | 0 | 57 | 58.684211 | 166 |
Sidetalker/SplatPal | 2,422,361,596,875 | c36d963300b6973a7f170d67b8e12d0c4d5feae7 | c6da11a55afd759357e0fa89c41bb154233a873d | /SplatScripts/weaponImageParse.py | f69a2e0b0af2a285958df790fa484a6cd9311eb9 | [] | no_license | https://github.com/Sidetalker/SplatPal | 8fb40084704cdb318205f85c4e61d5e5de013738 | c391c3b0a1118f033570c6870c4aa332ef561b26 | refs/heads/master | 2021-05-04T10:32:33.058093 | 2016-03-21T23:19:08 | 2016-03-21T23:19:08 | 47,736,068 | 4 | 1 | null | false | 2016-02-24T03:17:37 | 2015-12-10T03:43:11 | 2016-02-19T13:07:04 | 2016-02-24T03:17:37 | 33,249 | 1 | 1 | 13 | Swift | null | null | import pickle
from shutil import copy
from os import listdir
src = '/Users/kevin/Downloads/wikiteam-master/splatoonwikiorg_w-20151212-wikidump/images'
destA = '/Users/kevin/Documents/github/SplatPal/SplatPal/Images/weapons/'
destB = '/Users/kevin/Documents/github/SplatPal/SplatPal/Images/specials/'
destC = '/Users/kev... | UTF-8 | Python | false | false | 1,107 | py | 65 | weaponImageParse.py | 24 | 0.658537 | 0.636856 | 0 | 31 | 34.741935 | 89 |
linlufeng/LufengLearnPython | 6,425,271,117,208 | 2d5c5ea3aa3e8e5b770867a89caea195f7e15c31 | 692eceac2533150b86aa173b451698b7a12ff735 | /PycharmProjects/lession18/Source14.py | 976ee2bba655bd9886ad2b7e22e6a5a4102b708d | [] | no_license | https://github.com/linlufeng/LufengLearnPython | cb74f34926663dc9b7d4d6789e6e7e044dd73db3 | bedcbf4fea6d048a3903a623a4386ac5d484a70d | refs/heads/master | 2022-09-12T22:14:19.243757 | 2022-08-25T02:54:13 | 2022-08-25T02:54:13 | 200,183,327 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
class A(object):
a = 1
b = "b"
obj = A()
print hasattr(obj, 'a')
print hasattr(obj, 'b')
print hasattr(obj, 'c')
print hash(obj)
v = memoryview('abcd')
print v
print v[1]
print v[1:2]
print v[1:3].tobytes()
print round(3.1415, 1) # 3.1
print round(3.1415, 3) # 3... | UTF-8 | Python | false | false | 448 | py | 124 | Source14.py | 96 | 0.591518 | 0.488839 | 0 | 30 | 13.966667 | 31 |
bssrdf/pyleet | 6,227,702,626,731 | d9c38d0e79acd6df275242fd93e858f261ac3a18 | cdb7bb6215cc2f362f2e93a040c7d8c5efe97fde | /S/SplitaStringIntotheMaxNumberofUniqueSubstrings.py | 8a1adc29ab280cf6a62d060b11d874a9bbaa83c6 | [] | no_license | https://github.com/bssrdf/pyleet | 8861bbac06dfe0f0f06f6ad1010d99f8def19b27 | 810575368ecffa97677bdb51744d1f716140bbb1 | refs/heads/master | 2023-08-20T05:44:30.130517 | 2023-08-19T21:54:34 | 2023-08-19T21:54:34 | 91,913,009 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
-Medium-
*Backtracking*
Given a string s, return the maximum number of unique substrings that the given string can be split into.
You can split string s into any list of non-empty substrings, where the concatenation of the substrings forms the original string. However, you must split the substrings such that all... | UTF-8 | Python | false | false | 3,351 | py | 1,959 | SplitaStringIntotheMaxNumberofUniqueSubstrings.py | 1,951 | 0.561623 | 0.552372 | 0 | 101 | 32.178218 | 203 |
jagrusy/UnsupervisedLearning | 7,576,322,340,777 | e01fd7a52a4d165bc2b07cf410981176acfaae09 | 8dd54e94e0b5bb66f29d01cebe34ea79dd5e271d | /01b_clustering_EM_visualization.py | 9074d27352a0084cf17cf7737251a18b720e9410 | [] | no_license | https://github.com/jagrusy/UnsupervisedLearning | 0670111989f2e15170447a1abd3065d8ffaf0977 | 1dbac2de7ba6386df636ccda11636f9bdde983be | refs/heads/master | 2020-09-03T04:30:53.670893 | 2019-11-04T01:44:52 | 2019-11-04T01:44:52 | 219,386,728 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import itertools
from scipy import linalg
import matplotlib.pyplot as plt
import matplotlib as mpl
from sklearn import mixture
from sklearn.datasets import load_digits
from util import getCreditCardData, getWineData
# Number of samples per component
n_samples = 500
# Generate random... | UTF-8 | Python | false | false | 2,325 | py | 27 | 01b_clustering_EM_visualization.py | 8 | 0.568602 | 0.553118 | 0 | 68 | 32.220588 | 73 |
euske/python3-toys | 5,652,176,977,000 | 1453d62a8a4df1295879f9cc177e749845afae9f | c64269774427d81b474b923839c0ed24a8ac38f1 | /namemerge.py | 0360487d89ea79f2bf96b7c72ab59d333daad2d5 | [
"LicenseRef-scancode-public-domain"
] | permissive | https://github.com/euske/python3-toys | ba6be94c61e75473426909d0a23d65b9eb54bf2a | 9945f22167e580f6e3ba1dc4a1513d25f2e6bafa | refs/heads/master | 2023-04-01T04:55:20.477855 | 2023-03-27T02:54:28 | 2023-03-27T02:54:28 | 45,541,191 | 8 | 7 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
##
## namemerge.py - merge organization names.
##
import re
FULLWIDTH = (
' !”#$%&’()*+,\uff0d\u2212./0123456789:;<=>?'
'@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
'‘abcdefghijklmnopqrstuvwxyz{|}'
)
HALFWIDTH = (
' !\"#$%&\'()*+,--./0123456789:;<=>?'
'@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_... | UTF-8 | Python | false | false | 3,477 | py | 28 | namemerge.py | 27 | 0.424187 | 0.397448 | 0 | 102 | 31.264706 | 76 |
charlihi/bridges-python | 2,791,728,758,618 | 965c931c9a4366be6bf7a9edd21ba3b6bc89ab84 | 9d9d627df1ccee130c2bbb13aa04f87166f6c94a | /bridges/audio_clip.py | fad155610542eb5b1383fa40958db241e89e1fa4 | [
"MIT"
] | permissive | https://github.com/charlihi/bridges-python | b82c6ad57dda14a3da08e9eec6b6b343cb788d14 | 6385e84ff754e52662464bf85eb6537fb1ff9a5f | refs/heads/master | 2023-04-08T08:48:05.341114 | 2021-04-14T18:32:45 | 2021-04-14T18:32:45 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import base64
import wave
import json
import array
import math
from bridges.audio_channel import AudioChannel
class AudioClip(object):
"""
@brief This class provides support for reading, modifying, and playing, audio waveform.
This class provides a way to represent an AudioClip (... | UTF-8 | Python | false | false | 12,807 | py | 60 | audio_clip.py | 59 | 0.60912 | 0.591083 | 0 | 292 | 42.859589 | 211 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.