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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
modoboa/modoboa | 1,340,029,830,674 | 5e06f0bd7d7002eabb07fc5d2b364eed0e0fe935 | bbf0c3294b8aac4cbabf255c2904556144c85610 | /modoboa/lib/imap_utf7.py | c40348ab8827643f9ab1e89d4724411f535c4540 | [
"ISC"
] | permissive | https://github.com/modoboa/modoboa | 4a170fabcb15b892fe627795b02a02d4c16783d6 | df699aab0799ec1725b6b89be38e56285821c889 | refs/heads/master | 2023-08-30T12:58:51.313642 | 2023-08-29T13:22:14 | 2023-08-29T13:22:14 | 9,469,271 | 2,201 | 370 | ISC | false | 2023-09-13T12:47:28 | 2013-04-16T09:43:55 | 2023-09-13T04:53:03 | 2023-09-13T12:47:28 | 28,656 | 2,665 | 361 | 79 | Python | false | false | # -*- coding: iso-8859-1 -*-
"""
Imap folder names are encoded using a special version of utf-7 as
defined in RFC 2060 section 5.1.3.
5.1.3. Mailbox International Naming Convention
By convention, international mailbox names are specified using a
modified version of the UTF-7 encoding described in [UTF-7]. Th... | UTF-8 | Python | false | false | 6,088 | py | 807 | imap_utf7.py | 478 | 0.61693 | 0.586627 | 0 | 217 | 26.981567 | 76 |
iamsureshtumu/CRUD-CBV-school-students | 2,705,829,412,641 | 686c3bc567dedc916d7c9e3459869437e34f95f2 | 542b26197f7a5abe46bd2df594aadc6cafb62a82 | /CBV_DEMO/urls.py | 2cbaba4b961a9102de59b2287ecea403d1cffbcf | [] | no_license | https://github.com/iamsureshtumu/CRUD-CBV-school-students | c57f83e5366cc7f32491ea069a01070bb6be3cb5 | 6fdbdd1888e1317ec8abcc94b8dd0cf7d9761bd4 | refs/heads/main | 2023-05-28T23:33:56.603855 | 2021-06-08T18:00:38 | 2021-06-08T18:00:38 | 324,770,664 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """CBV_DEMO URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | UTF-8 | Python | false | false | 1,810 | py | 5 | urls.py | 2 | 0.701657 | 0.697238 | 0 | 36 | 49.277778 | 183 |
Jimmy-INL/google-research | 1,778,116,460,777 | 218a90a306b0b1c5be4d39718e05d556dd976164 | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /disarm/categorical/experiment_launcher.py | bb16f3cdc23244dc7b84954340768b710cd43fa8 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | https://github.com/Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | true | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | 2020-07-26T13:45:43 | 2020-07-24T10:45:03 | 239,465 | 0 | 0 | 0 | null | false | false | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | UTF-8 | Python | false | false | 23,526 | py | 6,251 | experiment_launcher.py | 4,585 | 0.627136 | 0.61872 | 0 | 642 | 35.64486 | 80 |
uzdun/CodeableModels | 13,116,830,169,227 | d5d229ff26108d77fe90013fc2726ee0f1725de9 | 3ce6edccac106cdc656d50db5010909b0c88b235 | /samples/shopping_model1.py | fee61ba7bfbdc642efbc582e747805a7c6d84db2 | [
"Apache-2.0"
] | permissive | https://github.com/uzdun/CodeableModels | 48ef6c84b8aae78ff005e257e23abb5cd8d4fec8 | b60b1aaa7ffc407b14b7610f43ca8a7dbfee5591 | refs/heads/master | 2022-04-26T01:45:49.092396 | 2022-03-24T08:06:46 | 2022-03-24T08:06:46 | 126,474,037 | 13 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
*File Name:* samples/shopping_model1.py
This is a Codeable Models example realizing a simple sample shopping domain model.
It is inspired by the model at:
`<https://www.uml-diagrams.org/examples/online-shopping-domain-uml-diagram-example.html>`_
The example is explained in :ref:`first_class_model`.
"""
from code... | UTF-8 | Python | false | false | 1,567 | py | 135 | shopping_model1.py | 78 | 0.683472 | 0.678366 | 0 | 48 | 31.645833 | 101 |
POA-WHU/POA-spiders | 17,033,840,306,732 | d982b81ea569575cb0e828fa015bb8335ef4f091 | e6e3871f8e0b781e5ae3cbd779a6f124311e0d28 | /src/config.py | 3654a98b189348616b8df092e1e16abc0b7bd419 | [
"MIT"
] | permissive | https://github.com/POA-WHU/POA-spiders | afd578fc0ec602ad80be919cfa6dc61f57e0ec3b | e61a1620cc0e84e10abfbdc85f22cf8ea85481c2 | refs/heads/main | 2023-04-15T02:27:20.464224 | 2021-04-11T11:02:42 | 2021-04-11T11:02:42 | 343,425,763 | 0 | 0 | MIT | false | 2021-03-21T14:54:58 | 2021-03-01T13:27:41 | 2021-03-21T14:41:10 | 2021-03-21T14:54:57 | 92 | 0 | 1 | 0 | Python | false | false | from pathlib import Path
project_path = Path(__file__).absolute().parent.parent
class Database:
user = 'root'
password = ''
host = 'localhost'
port = '3306'
database = 'test_db'
server = f'mysql+pymysql://{user}:{password}@{host}:{port}'
class Log:
format = '[%(name)-10s] %(levelname)... | UTF-8 | Python | false | false | 478 | py | 23 | config.py | 21 | 0.627615 | 0.612971 | 0 | 23 | 19.782609 | 71 |
LGamez/Mobike | 9,070,970,935,108 | 7c00e6f9b4b27d9754a18c8094880575529c739d | 4aeb8f0cd9bb2ee4d1909b9c856c5b37bdea38db | /misperris/migrations/0009_auto_20181028_1506.py | 6d36544c639ea4eb3c3dfea04099f59b8f0990d0 | [] | no_license | https://github.com/LGamez/Mobike | fb21c845f69b3313d3dc47c429733f8525979014 | 85ea4030a61b8f7490212b212b101d74037f10e9 | refs/heads/master | 2020-07-22T01:06:09.546421 | 2019-12-06T01:21:56 | 2019-12-06T01:21:56 | 207,024,708 | 0 | 0 | null | false | 2019-12-06T01:21:57 | 2019-09-07T20:53:43 | 2019-12-06T01:16:26 | 2019-12-06T01:21:56 | 8,736 | 0 | 0 | 0 | Python | false | false | # Generated by Django 2.0.9 on 2018-10-28 18:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('misperris', '0008_auto_20181028_1449'),
]
operations = [
migrations.AlterField(
model_name='mascota',
name='foto',
... | UTF-8 | Python | false | false | 409 | py | 39 | 0009_auto_20181028_1506.py | 26 | 0.589242 | 0.513447 | 0 | 18 | 21.722222 | 72 |
Harish752/harish | 3,229,815,425,674 | 5202bff75f78a60c740bf0ade5abf573f3f1c9f7 | bd8e33b3d7cb24d69a75f05b3b1848d8fa290864 | /fac.py | a9f8ff2ca6b2f7c6f6d4fe3c1b046fddd6deb38c | [] | no_license | https://github.com/Harish752/harish | f590b606dc3ee6a34d288e40aa0018a6b67b2094 | 4db687ad72cd69b59a46ffba70ae1f307ad28f0a | refs/heads/master | 2020-05-23T00:56:02.619517 | 2019-08-30T17:02:19 | 2019-08-30T17:02:19 | 186,579,708 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ab=int(input())
for i in range(1,ab+1):
if(ab%i==0):
print(i,end=" ")
| UTF-8 | Python | false | false | 73 | py | 79 | fac.py | 78 | 0.547945 | 0.506849 | 0 | 4 | 17.25 | 23 |
sagiraju19/django-sorcery | 10,599,979,335,205 | 9da4f04ad767fb10708a208110ca6f29701d0f52 | e32f6e0804e9ed9d5b868523c7762d21d39732eb | /tests/db/test_models.py | c38cbbd2b45784027ddb84def6f96084ac469a9a | [
"MIT"
] | permissive | https://github.com/sagiraju19/django-sorcery | 736a999d0da34e466216a36a91235bf3cc8c4a10 | 9b9cbecad6bde88943db56d3f63a07d0562eb860 | refs/heads/master | 2020-03-25T12:18:44.647427 | 2018-08-06T17:41:50 | 2018-08-06T17:41:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from django_sorcery.db import models
from django_sorcery.utils import make_args
from ..base import TestCase
from ..models import (
Address,
Business,
CompositePkModel,
ModelOne,
ModelTwo,
Option,
... | UTF-8 | Python | false | false | 11,481 | py | 12 | test_models.py | 10 | 0.571901 | 0.561101 | 0 | 322 | 34.65528 | 109 |
rspeer/dominionstats | 3,650,722,249,852 | 7646fdc7533384492ec81d02ea24d1fe45716118 | ea836aaf2e563ae1dd4bbddf1ba57f05dc8b2396 | /queries.py | 08599fc884b2617df456214c716a8757cf0499b1 | [] | no_license | https://github.com/rspeer/dominionstats | 8a4a2827d6093bcaac8ccdbfc75ae4b4ba1eb713 | bfc0132aed6827559173511b83e1726e04b92e42 | refs/heads/master | 2016-09-06T05:04:25.680582 | 2011-11-26T06:51:47 | 2011-11-26T06:51:47 | 1,540,471 | 9 | 5 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pymongo
if __name__ == '__main__':
c = pymongo.Connection()
db = c.test
games = db.games
ct = 0
print games.find({'players': 'rrenaud'})
for g in games.find({'players': 'rrenaud'}).min({'_id': 'game-2011'}):
print g['_id']
#print games.find({'turns.plays': ["Fishing Village"]... | UTF-8 | Python | false | false | 491 | py | 75 | queries.py | 49 | 0.480652 | 0.470468 | 0 | 15 | 30.266667 | 74 |
zhiwei-Feng/Coursera-Machine-Learning-Assignment-Solutions | 34,359,740,321 | 12a8864bc03de830a4b64737e04f04f5e1542a76 | f05b5a08981b13dc68fd4429b6b2f819c302a00d | /machine-learning-ex3/predictOneVsAll.py | 1b663c5e25c15b003b34556a513270988b94c4dc | [] | no_license | https://github.com/zhiwei-Feng/Coursera-Machine-Learning-Assignment-Solutions | a7bbdfe863607c075913f3a6c2910d0e649cd44f | 11716efcc512c2b9473f585a91c60fc6c88eb393 | refs/heads/master | 2020-06-03T12:15:24.805203 | 2019-07-21T03:18:15 | 2019-07-21T03:18:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from sigmoid import sigmoid
def predict_one_vs_all(all_theta, X):
m = X.shape[0]
X = np.c_[np.ones(m), X]
h_theta = sigmoid(X @ all_theta.T)
p = np.argmax(h_theta, axis=1) + 1 # based-0 thus add one
return p
| UTF-8 | Python | false | false | 251 | py | 73 | predictOneVsAll.py | 49 | 0.609562 | 0.593625 | 0 | 11 | 21.818182 | 62 |
chiaminchuang/Leetcode | 8,452,495,658,187 | 7f465ec1af9edf980e2a077447559ea4602dacc5 | f17c46839a6309f8c9618ae3406d71a771840816 | /Easy/217-Contains Duplicate/217.py | 2bcf8a25dde1f6b3f2a6204beec25bc78792ef17 | [] | no_license | https://github.com/chiaminchuang/Leetcode | a3c9332dadc17961cfaa5ccaa6363b47305787b5 | 8b10d93d804ba19922c04e4b511b9ad71fc24f5b | refs/heads/master | 2021-09-26T08:46:02.583348 | 2018-10-28T09:42:28 | 2018-10-28T09:42:28 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def containsDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
nums = self.quickSort(nums)
for i in range(0, len(nums)-1):
if nums[i] == nums[i+1]:
return True
return False
... | UTF-8 | Python | false | false | 828 | py | 154 | 217.py | 154 | 0.450483 | 0.442029 | 0 | 28 | 27.642857 | 71 |
mfraezz/osf.io | 12,343,736,045,538 | d1f4a6896b268c812353056509342908962624c0 | 608cf796ec871f2cba9edb5b7b22475a9a42f515 | /osf/models/registration_bulk_upload_row.py | 65e5a7c77c3eac55bce873180240964a45de05c9 | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | https://github.com/mfraezz/osf.io | 2a8f694d871437b581528096c5793e9fdcd6f286 | 04810812a89e4d2a990a44898969576e4d174e13 | refs/heads/develop | 2023-08-25T20:31:22.287806 | 2021-12-01T02:17:39 | 2021-12-01T02:17:39 | 26,929,858 | 0 | 0 | Apache-2.0 | true | 2021-08-03T05:23:21 | 2014-11-20T20:12:10 | 2019-11-14T17:39:54 | 2021-08-03T05:23:16 | 192,581 | 0 | 0 | 88 | Python | false | false | import hashlib
from django.db import models
from osf.models.base import BaseModel
from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField
from osf.utils.fields import ensure_bytes
class RegistrationBulkUploadRow(BaseModel):
"""Defines a database table that stores information about to-be-created (dr... | UTF-8 | Python | false | false | 1,761 | py | 8 | registration_bulk_upload_row.py | 3 | 0.725724 | 0.723453 | 0 | 39 | 44.153846 | 112 |
amanvats/latestNewsReader | 12,017,318,508,878 | b27a2e2a08e1a1de4e61a90e325685761be8124e | 6caf47029db69694ca23da5071693bf3b0025e5a | /news.py | 47d92c98a7bb3ce63713e3dfe6bdc92b39305fd9 | [] | no_license | https://github.com/amanvats/latestNewsReader | 39d11e9aaaa2e6712cb4ea615942768604be3324 | 9e7183cf90904728ccc60158d663abcd00086c8c | refs/heads/master | 2020-12-02T09:58:26.673764 | 2017-07-09T07:17:22 | 2017-07-09T07:17:22 | 96,667,437 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import os
from bs4 import BeautifulSoup
from gtts import gTTS
def news():
content = " "
# the target we want to open
url = 'http://www.hindustantimes.com/top-news'
# open with GET method
resp = requests.get(url)
# http_response 200 means OK status
if resp.status_code == ... | UTF-8 | Python | false | false | 1,173 | py | 2 | news.py | 1 | 0.608696 | 0.601023 | 0 | 42 | 26.904762 | 93 |
shjang1013/Algorithm | 850,403,559,936 | b9aed4c997113c4a17af8ee56a1311777c37bf31 | 52cb25dca22292fce4d3907cc370098d7a57fcc2 | /BAEKJOON/다이나믹 프로그래밍/2748_피보나치 수2.py | a308a3b851ae4dfbe9fd640c1f0a479e9f4dac3c | [] | no_license | https://github.com/shjang1013/Algorithm | c4fc4c52cbbd3b7ecf063c716f600d1dbfc40d1a | 33f2caa6339afc6fc53ea872691145effbce0309 | refs/heads/master | 2022-09-16T12:02:53.146884 | 2022-08-31T16:29:04 | 2022-08-31T16:29:04 | 227,843,135 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 동적 계획법(다이나믹 프로그래밍)을 이용한 피보나치
def fibo(N):
f = [0, 1]
for i in range(2, N+1):
f.append(f[i-2]+f[i-1])
return f[N]
N = int(input())
print(fibo(N))
| UTF-8 | Python | false | false | 212 | py | 279 | 2748_피보나치 수2.py | 278 | 0.517857 | 0.482143 | 0 | 9 | 17.666667 | 31 |
foamliu/Mobile-Image-Colorization | 12,859,132,106,746 | 529a08ef5c5d8e8ed083e5da85bfdbc59bd4d0f2 | 6d0a111cee48492ec52f738fd9df7215defe8aff | /config.py | 58311c4a911f5017ad6bfda0c0e853ec4e554c62 | [
"MIT"
] | permissive | https://github.com/foamliu/Mobile-Image-Colorization | 852f7cc39cca0a1825f2ba6dee2695a66023b52b | ce7556100c04fe11120e1796de419355672eea17 | refs/heads/master | 2020-09-08T15:58:09.864899 | 2019-12-12T15:10:22 | 2019-12-12T15:10:22 | 221,177,716 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # sets device for model and PyTorch tensors
im_size = 256
channel = 3
batch_size = 32
epochs = 10000
# Training parameters
num_workers = 4 # for data-loading; right now, only 1 works with h5py
grad_clip = 5. # clip gradients at an ... | UTF-8 | Python | false | false | 615 | py | 11 | config.py | 9 | 0.723577 | 0.64878 | 0 | 24 | 24.625 | 114 |
seonghunYang/TIL | 171,798,692,893 | be815854b239d307bc59cb6ca3e70a2fff837fdd | a2d55794a22bc6e3572c9f4b06736b1f2511847d | /python 기본/built_in_fuction.py | 122838fef04bdac3a5ee9748d33c582b01436ad1 | [] | no_license | https://github.com/seonghunYang/TIL | 2d3061b0cd565d7c70658c2fc6b13a01716d9541 | 1ada140a5e9f1cc6280bc01448c5daaf9a43bf86 | refs/heads/master | 2023-01-21T21:38:45.652946 | 2020-12-01T21:36:51 | 2020-12-01T21:36:51 | 278,396,931 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a = [1, -1, -3, 4]
print(abs(-1))
print(all([1, 2, 3]))
print(any([1, 2, 3, 0]))
print(chr(97))
print()
print(a)
def positive(x):
print(x)
return x > 1
a = [1, -3, 2, 0, -5, 6]
print(list(filter(positive,a)))
print(a)
print(max("ABS")) | UTF-8 | Python | false | false | 244 | py | 57 | built_in_fuction.py | 23 | 0.540984 | 0.454918 | 0 | 14 | 16.5 | 31 |
Yousef11111/tensorD | 13,297,218,777,793 | 136da2cd1d1e86995a178bad0e1ef3c6b015b384 | 6a8a93fae7503f4fc0d127fd36a363c170356adf | /tensorD/dataproc/provider.py | 4852b528cf2e67ea5dad699a065ddb2a525c6cf6 | [
"MIT"
] | permissive | https://github.com/Yousef11111/tensorD | 3ae34b44dd95eb4b9c2a894a9daeeb94cd4c64c5 | 342e360d348713a18b4e80fcc0f840a136748b66 | refs/heads/master | 2020-04-10T00:47:35.499414 | 2018-12-09T21:57:50 | 2018-12-09T21:57:50 | 159,216,309 | 1 | 0 | MIT | true | 2018-11-26T18:44:10 | 2018-11-26T18:44:09 | 2018-10-04T14:44:34 | 2018-02-02T16:13:51 | 12,481 | 0 | 0 | 0 | null | false | null | # Created by ay27 at 17/2/7
import numpy as np
class Provider(object):
"""
Base Data Provider, should be noted that the batch size should be given in initializer.
"""
@property
def batch_size(self):
raise NotImplementedError
def full_tensor(self):
"""
Returns
... | UTF-8 | Python | false | false | 3,140 | py | 67 | provider.py | 47 | 0.520064 | 0.515924 | 0 | 111 | 27.288288 | 106 |
kolaSamuel/CodeChef | 12,979,391,211,437 | 840f0f5c53976a244cdad0ea31bf02f9f0e0bb1f | ed0dc3aa118dd058a2b10127d367bcbcd46234fe | /Chef and Sign Sequences.py | 51112bfa04b91716481a4abd0220a7aa0f33a69b | [] | no_license | https://github.com/kolaSamuel/CodeChef | a73cd3593d76d59e633a5c279c05a782159ccddd | 2d531de1194b8b139540c9a1967f036272925193 | refs/heads/master | 2020-03-14T02:36:42.763221 | 2018-04-28T11:07:12 | 2018-04-28T11:07:12 | 131,402,458 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | t = input()
for i in xrange(t):
s = raw_input()
ans = 0;state = 0
#print s
for j in s:
if j == '>':
state+=1
ans = max(state,ans)
elif j == '<':
if state == 0 :ans+=1
else:state-=1
print ans+1 if ans > 1 else 0
| UTF-8 | Python | false | false | 295 | py | 57 | Chef and Sign Sequences.py | 56 | 0.410169 | 0.379661 | 0 | 13 | 21.692308 | 33 |
Kontowicz/Daily-coding-problem | 6,193,342,843,057 | 5219ff67f06b5b052c0d7b4336daaa7ec026aa9f | 3947d30d4362a7bffc1f42a28610d902f5ce6760 | /day_206.py | 5ed16fcb1bddcd99ff6ad4c399d1978a780be54b | [] | no_license | https://github.com/Kontowicz/Daily-coding-problem | 899b5978cd076fe86883ad01938c5704a7d88003 | edd97375bc48c243950622651dd6286f3611f3c2 | refs/heads/master | 2021-06-29T17:22:09.357868 | 2020-10-01T19:21:44 | 2020-10-01T19:21:44 | 161,390,419 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # A permutation can be specified by an array P,
# where P[i] represents the location of the element at i in the permutation.
def solution(array, order):
result = []
for item in order:
result.append(array[item])
return result
assert solution(["a", "b", "c"], [2, 1, 0]) == ["c", "b", "a"]
| UTF-8 | Python | false | false | 302 | py | 171 | day_206.py | 170 | 0.635762 | 0.625828 | 0 | 12 | 24.166667 | 76 |
LucBanda/icfp17_Punters | 14,688,788,183,371 | 1c338afff067bb6e6c4b5eebd87eba08dd48d9a9 | 72a2a2fe4c5dbbcd8b991e108f0d19b1253df144 | /UCT.py | 9f8882f4ed19318e224ce3d81961ac6b1123a71e | [] | no_license | https://github.com/LucBanda/icfp17_Punters | 94280c2f008b6dcafea939beec7e0f4cfc75c3c4 | b8f0242764cbe132c7a64df24ee0b9493de2779a | refs/heads/master | 2021-01-02T23:51:13.875698 | 2017-09-04T07:59:22 | 2017-09-04T07:59:22 | 99,509,536 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # This is a very simple implementation of the UCT Monte Carlo Tree Search algorithm in Python 2.7.
# The function UCT(rootstate, itermax, verbose = False) is towards the bottom of the code.
# It aims to have the clearest and simplest possible code, and for the sake of clarity, the code
# is orders of magnitude less eff... | UTF-8 | Python | false | false | 7,197 | py | 9 | UCT.py | 6 | 0.593442 | 0.586216 | 0 | 169 | 41.591716 | 199 |
BlackLacost/.dotfiles | 6,021,544,194,459 | f83c3b8c2b80edee5f23f6b99b749685fb290ff6 | dc8c31f934fbdc9e99acae19a149f490608f85d5 | /config/anki/addons21/814349176/awesometts/gui/__init__.py | 950e5f546d27f0c613708aa6458bddf18630a196 | [] | no_license | https://github.com/BlackLacost/.dotfiles | db54b64c648f2a22c1e580543b8e2b2ddd8eb35e | 9df3c2b2811b6b134b5ba2f3d7bb3c7bdc42e691 | refs/heads/master | 2023-05-28T12:41:12.718697 | 2023-05-12T16:05:52 | 2023-05-12T16:05:52 | 181,217,550 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# AwesomeTTS text-to-speech add-on for Anki
# Copyright (C) 2010-Present Anki AwesomeTTS Development Team
#
# 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, eithe... | UTF-8 | Python | false | false | 1,477 | py | 142 | __init__.py | 84 | 0.670278 | 0.666215 | 0 | 64 | 21.078125 | 71 |
lgrosz/machine_learning_library | 16,441,134,815,104 | d3c01c466b80eabc7aa378656c2ae90e005611d6 | ea8e1a3c66a2174708f0e527e762f5ebde490d1a | /myml/perceptron.py | f8c9e4cbcdb99bcc7bf8d19f9ab2306e78a457ad | [] | no_license | https://github.com/lgrosz/machine_learning_library | 9a8a0877cb803eb3ad0136147ee6f8da3d1fd4be | 218e8595ffab8ee3c82d33334be7e08651278204 | refs/heads/master | 2023-04-30T02:54:23.247215 | 2020-12-09T00:02:11 | 2020-12-09T00:02:11 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
class Perceptron:
def __init__(self, rate, niter):
self.rate = rate
self.niter = niter
def fit(self, X, d):
"""
Creates the hypothesis w from X and d.
Keyword arguments:
;param numpy.ndarray X: the training input domain
;param numpy.n... | UTF-8 | Python | false | false | 2,609 | py | 21 | perceptron.py | 16 | 0.516673 | 0.505174 | 0 | 86 | 29.313953 | 97 |
adandamudi/hlast | 12,266,426,615,613 | b91c177e7f9042f771e39250832f18f6244df45b | 295d62b0d1abe97f8a3d1500c44666040870d4b0 | /tests/toy-simple/v2/ex6.py | f9ae471c3e95edf2feae3ac20e18eaae19434938 | [] | no_license | https://github.com/adandamudi/hlast | 3c5e493e15ce9c64a5644ca1d3138e7c87629cbb | 94d3e2b12434c137399546a71da5ad063d32d201 | refs/heads/main | 2023-02-02T13:56:00.955051 | 2020-12-18T06:45:17 | 2020-12-18T06:45:17 | 311,791,616 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | i=0
# Variable name change + adding a new statement
b = 0
if b == 0:
c = (3, None)
b = b - 1
| UTF-8 | Python | false | false | 95 | py | 50 | ex6.py | 45 | 0.568421 | 0.515789 | 0 | 6 | 14.833333 | 47 |
LuisPuelloCP/Validador_Contrase-a | 8,005,819,075,095 | 082ea5f8a66116b01f9829ca3b68a2f225074ead | 50122bee3d0c3a268c8d55ea333881d80937844b | /Ventana.py | 977d5572f8ae20980354fdde7c7c4eae92238c76 | [] | no_license | https://github.com/LuisPuelloCP/Validador_Contrase-a | 90adb65ec459bce9e8c39410e30aefc603e4aeac | 9a53d412371509e629ad238acb678c4df19a8264 | refs/heads/master | 2021-03-06T17:22:52.161108 | 2020-03-14T21:36:34 | 2020-03-14T21:36:34 | 246,212,306 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
import re
class Ventana:
def __init__(self):
self.ventana = Tk()
self.ventana.title("validador De Contraseña")
self.ventana.iconbitmap("password.ico")
self.frame = Frame(self.ventana, width = 1200, height = 600)
self.frame.pack()
self.labe... | UTF-8 | Python | false | false | 2,150 | py | 6 | Ventana.py | 5 | 0.610669 | 0.566214 | 0 | 49 | 42.612245 | 123 |
BlenderCN-Org/compAS | 558,345,794,576 | 309fa8c2658c3abe8e7e3110fbe86a7dcb66c453 | 60a267a7136b3cec2727824122bc6cda28c331e5 | /tools/MeshTools/meshtools.py | fe16d03c15fc4ef56694fdbe101cd963d27e1531 | [
"MIT"
] | permissive | https://github.com/BlenderCN-Org/compAS | 4a257637d181188c0b68210f1126fa826be226d5 | 9796066a2dc26f39fe6ad0a0d44a1ef8a84a608a | refs/heads/master | 2020-05-30T02:11:18.495302 | 2017-03-21T13:42:17 | 2017-03-21T13:42:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """A Toolbar providing an interface to common mesh tools."""
from compas.geometry.elements.polyhedron import Polyhedron
from compas.datastructures.mesh.mesh import Mesh
from compas.datastructures.mesh.algorithms.tri.subdivision import loop_subdivision
from compas.datastructures.mesh.algorithms.subdivision import qu... | UTF-8 | Python | false | false | 12,308 | py | 311 | meshtools.py | 105 | 0.550699 | 0.547449 | 0 | 340 | 35.2 | 105 |
bitsteller/cells2flows | 17,858,474,052,106 | 1dc6262f8eab2e592cc69bae41153263cb38d7fe | e28085b6d31b107abd5b21209dccd636e5112009 | /util.py | 6b021690cb125b19d72a9810dcf98a3342226364 | [] | no_license | https://github.com/bitsteller/cells2flows | 7ea5bfa68dfbb89ca1627b12d88efc7f06d2e3dc | 00b5714697926a1183d45eb93ed42f9f8b1642de | refs/heads/master | 2016-08-11T20:52:03.574094 | 2015-09-07T14:26:58 | 2015-09-07T14:26:58 | 36,836,400 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import collections, sys, itertools, multiprocessing, re, datetime, time
from exceptions import KeyboardInterrupt, ValueError
import psycopg2
import config
def parse_trajectory(linestr):
"""Reads a line from csv file and parses the trajectory
Args:
linestr: one-line string from the a STEM csv file
Returns:
A tu... | UTF-8 | Python | false | false | 14,338 | py | 66 | util.py | 52 | 0.688938 | 0.68315 | 0 | 446 | 31.14574 | 162 |
IlyaTrofimov/mlforhealthlabpub | 4,329,327,049,664 | 308e0e093d512710d78b3bc253d94ef105009d42 | 653eaef652627b155569b5fe9ab9bb3607fc1e78 | /alg/survivalquilts/class_SurvivalQuilts.py | babc2f6edf03db481774a13f51de72da928e3b25 | [
"BSD-3-Clause"
] | permissive | https://github.com/IlyaTrofimov/mlforhealthlabpub | 11ab86a83bd2ffd2574364a956b322b0c62406ae | 190cbad2faae9e559ffe7a68143df7f747d70adc | refs/heads/main | 2023-04-16T03:58:38.423288 | 2021-04-21T10:22:43 | 2021-04-21T10:22:43 | 358,528,623 | 0 | 0 | NOASSERTION | true | 2021-04-16T08:25:26 | 2021-04-16T08:25:25 | 2021-04-15T13:41:13 | 2021-04-13T20:43:17 | 17,437 | 0 | 0 | 0 | null | false | false | import warnings
warnings.filterwarnings("ignore")
import pandas as pd
import numpy as np
import sys, os
import GPyOpt
from sklearn.model_selection import train_test_split, StratifiedKFold
#user defined
from class_UnderlyingModels import CoxPH, CoxPHRidge, Weibull, LogNormal, LogLogistic, RandomSurvForest
from util... | UTF-8 | Python | false | false | 13,399 | py | 422 | class_SurvivalQuilts.py | 287 | 0.488619 | 0.477349 | 0 | 311 | 42.083601 | 160 |
brave-experiments/regional-filterlist-gen | 9,972,914,068,658 | a5c0e2722551b13c8dc2304c62e2c9887795ad32 | cb9da139a319a3096674fab3dbb4d426e0a039b6 | /statistics/python/page_graph_vanity_stats.py | 24ad6b0028fff6efdf287cf3ea85932121d63dc9 | [] | no_license | https://github.com/brave-experiments/regional-filterlist-gen | 24820af8aee4a7ffdcc8d25bde8f348a0b2aa98a | 3ecffd2134a9b4aed8a96985e3207900d932249c | refs/heads/master | 2022-12-01T20:04:53.103477 | 2020-08-14T21:36:26 | 2020-08-14T21:36:26 | 199,906,188 | 0 | 1 | null | false | 2020-08-14T21:36:28 | 2019-07-31T18:07:45 | 2020-08-14T21:36:19 | 2020-08-14T21:36:27 | 637,815 | 0 | 1 | 0 | Python | false | false | from networkx import graphml
import argparse
import os
import psycopg2
import psycopg2.extras
from s3fs.core import S3FileSystem
from tempfile import TemporaryDirectory
from urllib.parse import urlsplit
from tqdm import tqdm
import html
def generate_vanity_stats(bucket, s3, region):
pg_conn = psycopg2.connect(... | UTF-8 | Python | false | false | 2,430 | py | 45 | page_graph_vanity_stats.py | 17 | 0.62963 | 0.618519 | 0 | 68 | 34.75 | 110 |
sjmiller609/crack_vigenere | 816,043,829,435 | c812ee2e65b0223e3f85d36e72af26729b884a67 | c6bc7ac73e9378eac3a8d476d59c20fd6388d005 | /crack.py | 2cb6e0e1b565ccc74b6e448caf129100b17bc6cf | [] | no_license | https://github.com/sjmiller609/crack_vigenere | 5df3987ed9e01392dee11c85dffd5d128ae1aef0 | cb0237841c820999c7adb181cad00cfc851792d4 | refs/heads/master | 2021-01-01T06:16:45.306471 | 2017-07-17T22:43:26 | 2017-07-17T22:43:26 | 97,402,370 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import enchant
import sys
import requests
import re
from cryptolib.crypto import Vigenere_Key, Vigenere_Cipher, Vigenere_Message
alphabet = {\
"a":0,
"b":1,
"c":2,
"d":3,
"e":4,
"f":5,
"g":6,
"h":7,
"i":8,
"j":9,
"k":10,
"l... | UTF-8 | Python | false | false | 4,072 | py | 3 | crack.py | 2 | 0.566798 | 0.547397 | 0 | 148 | 26.513514 | 110 |
sntciitbhu/sntc_website_beta | 18,622,978,229,236 | 212829b98ec3ef78060264a439e8f6be261f002d | 5f6874113f86669d3220c9d5c247dab0a8abca01 | /apps/clubs/urls.py | 528372318f34f62d754321b2184da8d1bde9926b | [] | no_license | https://github.com/sntciitbhu/sntc_website_beta | f5e0f0b0deec9b291b7c4c6cf0d54b7cf069596c | 26a17ac7a401229a53fd428132fe072bdbb260b9 | refs/heads/master | 2021-12-23T19:26:03.161225 | 2020-05-18T09:54:25 | 2020-05-18T09:54:25 | 252,948,125 | 0 | 0 | null | false | 2021-09-22T18:50:51 | 2020-04-04T08:35:08 | 2020-05-18T09:54:29 | 2021-09-22T18:50:49 | 38,516 | 0 | 0 | 4 | JavaScript | false | false | """sntc_website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | UTF-8 | Python | false | false | 1,195 | py | 62 | urls.py | 45 | 0.679498 | 0.672803 | 0 | 31 | 37.548387 | 77 |
parkerjackman/Project-Portfolio | 6,622,839,587,578 | 2350f5b9d8f19711e997e681998484ebe33bd002 | 9028ab13db23394dc79ab974d0d70991261640eb | /CS 1 - Python/Assignment 13/polygon.py | ae1d6a7970ec4b6e6c95b3751bea93ac0e8f1bfa | [] | no_license | https://github.com/parkerjackman/Project-Portfolio | ff1eb8cc629470faf97e42cec653bdf4e1dd5189 | da8d69eb829adf3f57bb62b1a74cfca52dffa765 | refs/heads/master | 2020-12-01T16:22:47.693359 | 2019-12-30T17:11:52 | 2019-12-30T17:11:52 | 230,696,969 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Parker Jackman
Assignment 13
Polygon Class
"""
class Polygon:
def __init__(self, sides):
self.__sides = sides
def getNumSides(self):
return self.__sides
def __add__(self, other):
return self.__sides + other.getNumSides()
def __sub__(self, other):
... | UTF-8 | Python | false | false | 765 | py | 75 | polygon.py | 66 | 0.538562 | 0.534641 | 0 | 33 | 21.242424 | 67 |
ArcticGizmo/Thesis | 7,722,351,246,584 | 82a25340f966c0eb7266fc6d34f6ab16129a1da4 | eacddb32685fdf6a25c062b1eae87945a61325c3 | /Application/packages/guiComponents/winForms.py | dd4e46ae1d0fcc77d7d11fcd6dbb9deaa18111d2 | [] | no_license | https://github.com/ArcticGizmo/Thesis | 4f48a82f679a1014096ae6d42cde886aebc98f21 | 7cbd8db2eeb0666566bbbae1e28500fff65ee807 | refs/heads/master | 2021-08-23T23:40:47.731801 | 2017-12-07T03:43:01 | 2017-12-07T03:43:01 | 113,398,661 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import npyscreen as ns
import PyCapture2
from .. other import Utilities as u
from .. opencvController import cvWindowController as wc, cvWindowObjects as wo
import winButtonSets as bs
# base class that allows instantiation of un instantiated windows
class winFormBase():
# give a return form id for on_ok and a ... | UTF-8 | Python | false | false | 14,760 | py | 20 | winForms.py | 19 | 0.614431 | 0.609214 | 0 | 436 | 32.837156 | 116 |
internnos/Wave-Classification | 4,698,694,231,480 | b460b84fd410b0e981196e5c854a578d30285b76 | d67223485d10c4749205f00182d49be76f0ae45d | /data juli nov 2013 sinabung/Run/merge_training_set.py | d2556ada739fafd0edf7164d4311180cd94cd052 | [] | no_license | https://github.com/internnos/Wave-Classification | 9db5bb2ac70de55a2faa6c87ffcb4c2719d202a8 | 706eac724b2ad78462ae055b2dec439ac27afc9e | refs/heads/master | 2022-06-12T19:16:59.919501 | 2017-08-25T01:14:03 | 2017-08-25T01:14:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 6 14:50:50 2017
@author: Amajid Sinar
"""
import pandas as pd
import numpy as np
#---------------------------------------------------------------------------------
#Merge training set
VTA_training_set = pd.read_csv("dataset/VTA-training-set.csv", delimiter=";", header=... | UTF-8 | Python | false | false | 905 | py | 14 | merge_training_set.py | 7 | 0.646409 | 0.633149 | 0 | 24 | 36.708333 | 97 |
shasfin/begfor | 5,136,780,889,825 | 6aa749e0f58e67958a8cdb5149a2b926f43a68ea | 90820dc5862b39406116a3d7067afa39b88b8bc1 | /Kurs2-Solutions/Woche4/Teil1/exercise1_0.py | 35b1ed8ca3df4cb6f66c27ef5f530d0a39668df8 | [] | no_license | https://github.com/shasfin/begfor | 860470fdc301d819dc0f25829fa266a97d580aab | 0ae3991569b6cab3b0e66c9d9e0368a06cd05ae7 | refs/heads/main | 2023-02-15T03:24:38.462368 | 2021-01-09T21:05:30 | 2021-01-09T21:05:30 | 305,988,691 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from gturtle import *
makeTurtle()
hideTurtle()
setPenColor("Light Sea Green")
setPenWidth(10)
def bar(l):
forward(l)
back(l)
right(90)
penUp()
forward(20)
penDown()
left(90)
groesse = 5
repeat 22:
bar(groesse)
groesse += 10
| UTF-8 | Python | false | false | 269 | py | 73 | exercise1_0.py | 71 | 0.605948 | 0.557621 | 0 | 21 | 11.809524 | 30 |
jonparrott/Darth-Vendor | 16,209,206,594,160 | 6b7e776e5ed4e267ec83525fc3440f5996922944 | 0f4dd9e486832834ece5d35ac052d91432a3f89f | /darth_bootstrap.py | 2055372f7d6c1e26718a0f8ec8923c55e9bd512b | [
"Apache-2.0"
] | permissive | https://github.com/jonparrott/Darth-Vendor | b5a6c686e50e0005a249406747c24131a40f9d69 | bf97b8d51e12a875c6fe7ce8bd9131f3afe16ea2 | refs/heads/master | 2016-09-05T21:53:46.134513 | 2015-06-01T20:49:02 | 2015-06-01T20:49:02 | 24,393,952 | 11 | 4 | null | false | 2015-03-22T08:31:32 | 2014-09-24T00:00:51 | 2015-02-07T18:03:04 | 2015-03-22T08:31:32 | 231 | 7 | 2 | 2 | Python | null | null | import os
import shutil
import darth
def bootstrap():
cwd = os.getcwd()
appengine_config_path = os.path.join(cwd, 'appengine_config.py')
print('Copying darth.py to the current directory...')
shutil.copyfile(darth.__file__.replace('pyc', 'py'), os.path.join(cwd, 'darth.py'))
print('Copied!')
if os.path.e... | UTF-8 | Python | false | false | 976 | py | 7 | darth_bootstrap.py | 6 | 0.705943 | 0.705943 | 0 | 35 | 26.885714 | 112 |
Aasthaengg/IBMdataset | 7,301,444,445,330 | c22635e94f7d7f5c99783ecf1b05db4a76846889 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p04030/s512344805.py | b845e58b760e57c45c9acefc047ded74c82eaf3d | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s = input()
ans = ''
for i in range(len(s)):
if s[i] == '0':
ans += '0'
elif s[i] == '1':
ans += '1'
else:
if ans == '':
continue
else:
ans = ans[:-1]
print(ans) | UTF-8 | Python | false | false | 229 | py | 202,060 | s512344805.py | 202,055 | 0.349345 | 0.327511 | 0 | 13 | 16.692308 | 26 |
tete1987/selenium_code | 15,169,824,527,785 | e80da9d886eabf2f6849d2cf2f2348d2b2c28c50 | 6dcc75f2c4d700db6d95024a2ffbca0566e1641f | /test_chromede.py | 31348cfc34dd81b89c9914e72ebc4d788bd55dc9 | [] | no_license | https://github.com/tete1987/selenium_code | a5d7cfa3d2cc614399c63fa039cd6b43153882f4 | 44867e6eb1aa27963c6c96586e6ed22deb533794 | refs/heads/main | 2023-02-15T04:20:23.218946 | 2021-01-08T03:37:25 | 2021-01-08T03:37:25 | 317,390,025 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/12/1 16:33
# @Author : TETE
# @File : test_chromede.py
from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
class TestChrome:
def setup_method(self,me... | UTF-8 | Python | false | false | 712 | py | 25 | test_chromede.py | 25 | 0.661517 | 0.629213 | 0 | 25 | 27.52 | 82 |
jkrlr/BlogWebApp | 2,207,613,218,932 | 0b6c11c6cae86610e2d6d0221e79e6582faf7ef5 | 724880942a300ed9d471f998f10ed2a3834827f5 | /BloggingApp/mysite/account/admin.py | 8ca6f7f539a5d27f99bfa7d50bfa6c65e0a76465 | [] | no_license | https://github.com/jkrlr/BlogWebApp | b1bbcb2e8c8cc1bc3721650a38e64a9e408212bd | 82778f81840a5d82610cafd99abb6d1d1e760854 | refs/heads/master | 2023-02-08T03:59:56.899657 | 2021-01-04T10:43:01 | 2021-01-04T10:43:01 | 285,786,796 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import MyUser, Request
# Register your models here.
admin.site.register(MyUser, UserAdmin)
admin.site.register(Request)
| UTF-8 | Python | false | false | 216 | py | 3 | admin.py | 1 | 0.814815 | 0.814815 | 0 | 8 | 26 | 47 |
shengg/pyscf | 9,371,618,683,527 | d2e6ec0435429e0add21a8f3e08c60380621e3e1 | 2efa12def6387c8dc68314845b31c1c8ab581b89 | /lib/vhf/test/test_nrdirect.py | a650a6b4d819f568a916436ae42b05cb3211ef07 | [
"BSD-2-Clause"
] | permissive | https://github.com/shengg/pyscf | 49ece585e9b7b4c3c3c2e5eff2ce97caa8a4a826 | 5cb6ab6e85c123c912500a534252097da2f79e03 | refs/heads/0.11 | 2020-12-24T08:32:27.182845 | 2015-03-09T14:58:24 | 2015-03-09T14:58:24 | 31,979,613 | 0 | 0 | null | true | 2015-03-10T20:17:24 | 2015-03-10T20:17:23 | 2015-03-09T14:43:03 | 2015-03-09T14:43:23 | 4,523 | 0 | 0 | 0 | null | null | null | #!/usr/bin/env python
import os
import ctypes
import _ctypes
import unittest
import numpy
from pyscf import lib
from pyscf import scf
from pyscf import gto
from pyscf import ao2mo
libcvhf1 = lib.load_library('libcvhf')
mol = gto.Mole()
mol.verbose = 0
mol.output = None#'out_h2o'
mol.atom = [
['O' , (0. , 0. ... | UTF-8 | Python | false | false | 7,058 | py | 34 | test_nrdirect.py | 26 | 0.560074 | 0.508926 | 0 | 186 | 36.94086 | 73 |
Trackerming/bitcoin-sv | 17,798,344,480,193 | 82c6cede1d0ca8bcff6c14932763d858dce480f8 | 89b76f3a8d1e790b19d4aff0ff2cd6fc938b7741 | /test/functional/genesis_upgrade_tests/sigops_count_limit.py | 0a1529c9010dd6ead9dbef9b4c40dfb01f76432f | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/Trackerming/bitcoin-sv | 27a47d57887fde8445fee5a7d8719c47a95d7f16 | fb50a64e3ea0334a86b2c80daf5147c5bc2693c4 | refs/heads/master | 2021-07-07T07:20:26.060533 | 2020-08-05T02:35:56 | 2020-08-05T02:35:56 | 160,283,904 | 0 | 0 | MIT | true | 2020-08-05T02:35:57 | 2018-12-04T02:24:56 | 2018-12-04T02:25:01 | 2020-08-05T02:35:56 | 69,417 | 0 | 0 | 0 | C++ | false | false | from genesis_upgrade_tests.test_base import GenesisHeightBasedSimpleTestsCase
from test_framework.height_based_test_framework import SimpleTestDefinition
from test_framework.script import CScript, OP_TRUE, OP_CHECKSIG, OP_RETURN, OP_DROP
from test_framework.cdefs import MAX_TX_SIGOPS_COUNT_POLICY_BEFORE_GENESIS, MAX_TX... | UTF-8 | Python | false | false | 5,916 | py | 261 | sigops_count_limit.py | 230 | 0.576572 | 0.558654 | 0 | 94 | 61.946809 | 145 |
diljots99-old/Django-Movie-APi | 5,514,738,026,178 | fbbd62d1f05d842192f39586c74af9fd6b536a08 | 5a846f56fe1e91e3d76b5bdaebea257bce845964 | /MediaStreaming/ApiApp/urls.py | 10cb8baed9a0c2851f1a84135d3b9c0dc67eef31 | [] | no_license | https://github.com/diljots99-old/Django-Movie-APi | 6dfe2118cc6875cfc38ae3b67810b4370e18cae4 | beba716d5cd10c833cbf22da8fb1074ca10a28dd | refs/heads/main | 2023-02-19T17:52:45.543379 | 2021-01-21T11:41:25 | 2021-01-21T11:41:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path,include
from rest_framework import routers
from ApiApp import views,movies,users,people,torrent
from rest_framework.urlpatterns import format_suffix_patterns
# router = routers.DefaultRouter()
# router.register("movies",views.MovieApi)
# router.register("users",views.UserApi)
# router.... | UTF-8 | Python | false | false | 1,974 | py | 39 | urls.py | 27 | 0.695035 | 0.695035 | 0 | 53 | 36.226415 | 107 |
Save-Pets/Save-Pets-ML | 14,199,161,887,341 | 03ba24504d9007878e2285811ad0e71d5aaf2754 | 6c5b99b113915155845da1c119c13a364d14c34a | /SVM-Classifier/preprocess.py | 1ba65c0dec40448c783417885f93717de10d39e8 | [] | no_license | https://github.com/Save-Pets/Save-Pets-ML | b5228ef182f7593891898db2babd1a5f56767ace | fcd9ff0256b71000765e35c799641ab657dd2ddb | refs/heads/main | 2023-06-06T04:07:27.768355 | 2021-06-13T12:05:16 | 2021-06-13T12:05:16 | 339,622,073 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import argparse
import cv2
import numpy as np
from PIL import Image
from histo_clahe import histo_clahe
parser = argparse.ArgumentParser(description='Argparse Tutorial')
parser.add_argument('--dir', default='0',help='dataset directory')
parser.add_argument('--savedir', default='./Dog-Data/train',h... | UTF-8 | Python | false | false | 1,628 | py | 7 | preprocess.py | 3 | 0.609296 | 0.585427 | 0 | 51 | 29.176471 | 86 |
abdo3247/addons | 8,186,207,710,959 | 8563e438418906cebfbebadb0651aad3f87d14cf | ea07b85d8ebf242ada2ca331befdec9a16773cf2 | /product_dimension/sale.py | 42a9d984cfb4b0ffdb13e665da7bcfcbf4bade24 | [] | no_license | https://github.com/abdo3247/addons | 88386d1c16b5f657086c9be136dbcc57c4d9f63e | 33a8d50a36beb1375a07e450995360f2bc44dd60 | refs/heads/master | 2021-01-15T18:58:59.089160 | 2016-01-30T13:08:34 | 2016-01-30T13:09:17 | 52,379,103 | 0 | 0 | null | true | 2016-02-23T17:46:39 | 2016-02-23T17:46:39 | 2016-01-30T12:57:33 | 2016-02-22T21:53:04 | 318 | 0 | 0 | 0 | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2015 BADEP. All Rights Reserved.
# Author: Khalid Hazam<k.hazam@badep.ma>
#
# This program is free software: you can redistribute it and/or modi... | UTF-8 | Python | false | false | 4,845 | py | 7 | sale.py | 5 | 0.613017 | 0.609298 | 0 | 103 | 46 | 183 |
cfe-lab/stocky | 9,517,647,554,983 | e74e2bcbc7e966b98bc9b7ec65b9edd31d54e2cd | 176fa7e597c2f2337f80a9d4e393e636e5823129 | /stocky-devel/stocky/deprecated_code/datawidgets.py | e218dbc27bad613fd41847ad0ac3140905e72ad2 | [
"Apache-2.0"
] | permissive | https://github.com/cfe-lab/stocky | 0133abf16bbf068d8ef3684af4d7b22e96756e37 | 6c4114551d9b61c5ba3db2c237e995fecdd2f6b3 | refs/heads/master | 2021-04-15T17:01:15.610547 | 2019-04-08T18:51:52 | 2019-04-08T18:51:52 | 126,519,914 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from org.transcrypt.stubs.browser import FormData, __new__
import qailib.common.serversocketbase as serversocketbase
import qailib.common.dataelements as dataelements
import qailib.transcryptlib.guiforms as guiforms
class socket_controller(base_controller):
"""The base class of all main programs on the client s... | UTF-8 | Python | false | false | 4,471 | py | 134 | datawidgets.py | 69 | 0.628047 | 0.627153 | 0 | 94 | 46.521277 | 88 |
Evgen1177/alco | 541,165,924,545 | bbb0199e5ab1b12c277f5d6cd45b97031ce2db4e | d509c3ab42df4e78609f1ab575dd17c53f5862d0 | /src/beer/urls.py | 26b02ad364eae4bfb51b582dbf295f703f1c8b23 | [
"Apache-2.0"
] | permissive | https://github.com/Evgen1177/alco | 84588553b5e053580d5fe0a218e0e064aa0e4aca | 04c2b41a8c570e505c44bd5b08895e9be9d10d8d | refs/heads/master | 2022-04-30T14:01:46.884494 | 2019-12-03T10:26:54 | 2019-12-03T10:26:54 | 213,933,194 | 0 | 0 | Apache-2.0 | false | 2023-03-27T20:44:42 | 2019-10-09T13:57:57 | 2019-12-03T10:27:10 | 2022-04-22T22:38:48 | 5,033 | 0 | 0 | 4 | Python | false | false | from django.urls import path
from . import views
urlpatterns = [
path("",views.beerView.as_view(), name="beer")
]
| UTF-8 | Python | false | false | 127 | py | 30 | urls.py | 22 | 0.637795 | 0.637795 | 0 | 7 | 16.142857 | 50 |
robertdfrench/break | 6,708,738,955,188 | bc742b6dd729e3dfdc010a3d63af7de26ba26c4f | c3fca8e9e94c670522feadb9ca71b06a4a45a7f8 | /tests/test_provides.py | 394da5d6dd9f434d8b5bb97642eb6eb2b1f5bb74 | [
"MIT"
] | permissive | https://github.com/robertdfrench/break | d3c0e95a18867011f20de00eae675bfd04459f8e | 726b187892817d8b6ea7413e46ceed306d330e21 | refs/heads/master | 2021-01-12T11:52:30.345164 | 2019-07-25T20:31:05 | 2019-07-25T20:31:05 | 69,597,626 | 0 | 0 | null | false | 2016-10-12T20:45:26 | 2016-09-29T18:49:36 | 2016-09-29T19:41:30 | 2016-10-12T20:45:26 | 22 | 0 | 0 | 1 | Python | null | null | import breakable
import unittest
class TestProvides(unittest.TestCase):
def test_run_if_not_exists(self):
@breakable.provides("nothing")
def dummy(self):
return 5
self.assertEqual(dummy(self), 5)
def test_dont_run_if_exists(self):
@breakable.provides("README.md")
... | UTF-8 | Python | false | false | 409 | py | 22 | test_provides.py | 16 | 0.618582 | 0.611247 | 0 | 16 | 24.5625 | 43 |
hangdragon/DNN | 5,437,428,609,734 | b1eedf881e47a44f80bb2a7e8b85c0a1eace4d39 | 4749276f3075c477598eba4be32db32e23226f86 | /pypy/speed.py | d9236465352be678f4b794ad02b7a71b5d33c285 | [] | no_license | https://github.com/hangdragon/DNN | 1eca7268f72e412cca4624e3236736e3f22d7921 | 1bc80d067a74168d8eaf452e54eb2f1e97a62036 | refs/heads/master | 2022-07-31T18:04:47.551383 | 2020-05-25T13:34:45 | 2020-05-25T13:34:45 | 266,782,474 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding : utf-8 -*-
print("{}문의 {} : {}".format("for", "iterable" , "dictionary"))
dict_a = {"key1" : 12 , "key2" :34}
for i in dict_a:
print(i,end = ' ')
print("\n")
print("{}문의 {} : {}".format("for", "iterable" , "dictionary.items()"))
dict_a = {"key1" : 12 , "key2" :34}.items()
for i in dict_a:
p... | UTF-8 | Python | false | false | 1,201 | py | 105 | speed.py | 91 | 0.549953 | 0.53408 | 0 | 49 | 20.877551 | 99 |
hsaransa/std2 | 3,539,053,100,771 | d79db3d2bf4e8264c29337330a11688fb5d822ec | 8dac8141dcd231de445b8676b6c82ac6b07a2b95 | /scripts/xcb2.py | 4fcd693acbe8ad9445a228f925d5f450211d30c9 | [] | no_license | https://github.com/hsaransa/std2 | 8e6a14962bd44ddedc134152ea21029d23829a77 | f0787cecfe6935ea514925824dbf977e0b1e4c87 | refs/heads/master | 2021-01-17T12:32:03.329648 | 2010-05-06T16:50:29 | 2010-05-06T16:50:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os, sys, fnmatch, time, re
import xml.parsers.expat
consts = []
classes = []
funcs = []
int_types = ['CARD8', 'INT16', 'CARD16', 'CARD32', 'BYTE', 'BOOL', 'INT32', 'INT8']
ignore_types = []
struct_types = []
def mangle(n):
if n.isupper():
return n.lower()
s = n[0].lower() + ''.join(['_' + i.low... | UTF-8 | Python | false | false | 7,981 | py | 44 | xcb2.py | 6 | 0.486029 | 0.478136 | 0 | 241 | 32.116183 | 101 |
rajisarma/CSC326SearchEngine | 532,575,971,835 | e4874337d1049e0a020b5fbbf7cf65fd574c63a4 | e38db199f2d61ec14e44c3cc8577d2288482fcff | /Lab1.py | 3b743e42569e9088d8d99536cbd917ceabfd9992 | [] | no_license | https://github.com/rajisarma/CSC326SearchEngine | 4e7bf4e086b16d06871b41b02a7aa6b31e5f9406 | a6ac2d63e8a027e32dcf1e862c029618f18f98fe | refs/heads/master | 2021-07-24T17:35:44.796115 | 2017-11-05T18:40:55 | 2017-11-05T18:40:55 | 105,304,959 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from bottle import *#route, run, request
from collections import OrderedDict
import re
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.client import flow_from_clientsecrets
from googleapiclient.errors import HttpError
from googleapiclient.discovery import build
import httplib2
import json
from str... | UTF-8 | Python | false | false | 9,952 | py | 10 | Lab1.py | 6 | 0.590635 | 0.571342 | 0 | 328 | 29.341463 | 181 |
LukaszMalucha/Linkedin-Analytics | 13,511,967,123,126 | baa670b83e3c2e88eecd89eb1d64a701eb9f0081 | f8ba5d8ce3c2439afb6d14caeeebe20300b16a02 | /app/core/tests/test_permissions.py | b258513db8bea3b30f67130eb58f3c1cfd83f44b | [
"MIT"
] | permissive | https://github.com/LukaszMalucha/Linkedin-Analytics | 37644d8e047e82f082f7e23427fdcbc3562e7074 | 8ee8cba29f313a1cc38772e2928d3c52614819af | refs/heads/master | 2023-03-10T18:49:28.372749 | 2022-09-03T11:55:17 | 2022-09-03T11:55:17 | 142,476,957 | 13 | 6 | MIT | false | 2023-03-05T14:54:40 | 2018-07-26T18:08:15 | 2022-12-01T13:53:03 | 2023-03-05T14:54:40 | 3,846 | 10 | 5 | 12 | Python | false | false | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.permissions import IsAdminOrReadOnly
COMPANIES_URL = reverse("api:companies-list")
class TestIsAdminOrReadOnly(TestCas... | UTF-8 | Python | false | false | 1,964 | py | 42 | test_permissions.py | 23 | 0.681263 | 0.672607 | 0 | 54 | 35.37037 | 74 |
Herna7liela/New | 2,997,887,195,998 | da821ba825b696929f33f2f6fe4c483cd3466e85 | b72ba14c048ae402f424da508938fe3ca2743897 | /Python_project/Project_trying.py | d677f0500a6d77a6de10c313f4ae4598d08494b6 | [] | no_license | https://github.com/Herna7liela/New | d517205b9f80d045278ab5c1026b2dcff76ab276 | 63bccd23d4118ceffb62b3b03981773ee75a6802 | refs/heads/master | 2021-01-16T21:16:19.777030 | 2015-05-01T10:50:00 | 2015-05-01T10:50:00 | 32,325,269 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # STEP 1:
# get the file in the correct format .gb to be able to work with it
# have to start by opening a a reader. The file to open is the argument to the python program
# python3 Project_final_code.py file.gb (use the sys.argv function after importing sys)
# STEP 2:
# get the .gb file content into exp text = "...."... | UTF-8 | Python | false | false | 2,161 | py | 85 | Project_trying.py | 83 | 0.655252 | 0.639519 | 0 | 83 | 25.048193 | 117 |
minhqlrt/python | 5,360,119,202,403 | 0d80c6b0b885b8e6094b961f7cae19b6845d5a91 | ba8ccfeded36d9565bbb9dd266ed5b23767b75ac | /auto pull push script.py | 610e847fd3f09769990f1d668496b6bf90589f2a | [] | no_license | https://github.com/minhqlrt/python | 2fb225b1c535903454b60ae2b6f48bd59a29bd3e | c6b70edebac8043d796f1ce5ccf09e3412b7381c | refs/heads/master | 2020-05-21T20:23:42.412959 | 2018-07-27T23:43:43 | 2018-07-27T23:43:43 | 62,386,629 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import subprocess
def myprocess(data):
proc = subprocess.Popen(data,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
procOutput, procError = proc.communicate()
print("")
print(procOutput)
print(procError)
print("")
return proc.returncode
defaultPath = 'G:\GitHub'
fileOrF... | UTF-8 | Python | false | false | 1,450 | py | 104 | auto pull push script.py | 18 | 0.597241 | 0.594483 | 0 | 40 | 35.25 | 163 |
JavonDavis/Competive-Programming-Python | 15,453,292,372,341 | e0d7f32e93d9ad5d3bd1bb177d25c5fd049ebaff | ae13f3efbe664b81417786e992919040033e23b1 | /toolbox/loop_subsets.py | 7103244a1edf924806a4212228919a29c20e94d5 | [] | no_license | https://github.com/JavonDavis/Competive-Programming-Python | 266044c2c8d5e6c10ad9ece8955d86aa385ff6c8 | 09ff389067397016858345f5ce0962f816bf4d4b | refs/heads/master | 2021-07-02T09:17:48.259626 | 2017-09-22T07:11:09 | 2017-09-22T07:11:09 | 87,370,735 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/bin/python
import sys
# Nice algo to loop subsets
def solve(n, a):
bit_array = [0 for _ in xrange(n)]
bit_array[n-1], bit_array[n-2], bit_array[n-3] = 1, 1, 1
subset_rep = snoob(7) # Decides length of subset
while len(subset_rep) <= n:
subset_rep = snoob(int(subset_rep, 2))
print "done"... | UTF-8 | Python | false | false | 600 | py | 119 | loop_subsets.py | 105 | 0.553333 | 0.525 | 0 | 28 | 20.428571 | 60 |
lucidvoci/ResearchProjectPortal | 3,590,592,675,593 | 970d6ada7f34e34bf0e27cdb1bc4319dc43ca87f | 24532792200e38657d863152fe9368c9cdc5dd5f | /src/portal/portal.py | c2c0de06e890cb3412f0604ab82649fef58c16c1 | [] | no_license | https://github.com/lucidvoci/ResearchProjectPortal | 134870a87597ec6127225b8b8178b17399dc4065 | 860e15176df96864a9e63fad4918fa6aa38b7d17 | refs/heads/master | 2021-01-22T23:07:14.644847 | 2017-03-20T18:39:43 | 2017-03-20T18:48:43 | 85,612,355 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------- Autor: Lucie Dvorakova ----------------------#
#------------------- Login: xdvora1f ----------------------#
#----------------- Automaticky aktualizovaný webový portál -------------------#
#------------------- o evropskýc... | UTF-8 | Python | false | false | 6,798 | py | 5 | portal.py | 2 | 0.553592 | 0.547114 | 0 | 209 | 31.492823 | 128 |
lehvitus/arvestust | 3,607,772,576,679 | 943037341acd115c2295ca1082c6e3d95d45fe5c | 14152916a7833fe946ed2e1a75a3fda59aab0c8f | /arvestust/serializers/image.py | 3cffc0ef5a1b26b97e63661bc9c3fed6d59ca76a | [
"BSD-3-Clause"
] | permissive | https://github.com/lehvitus/arvestust | 313a3c17f4f5ca52c438a329fbf3f401384d492e | 2d508317b744eaf12a643a398ff95723893a046a | refs/heads/master | 2022-11-29T02:34:08.479358 | 2020-08-13T01:22:53 | 2020-08-13T01:22:53 | 260,359,666 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rest_framework import serializers
from ..models import Image
class ImageSerializer(serializers.ModelSerializer):
class Meta:
model = Image
exclude = (
'uuid',
'object_id',
'content_type',
)
| UTF-8 | Python | false | false | 262 | py | 111 | image.py | 102 | 0.572519 | 0.572519 | 0 | 13 | 19.153846 | 51 |
guirmoreira/cafeteira | 12,043,088,319,052 | 7b8f893b4449c7597da57946c15b4d3af30affd3 | 92aa4420077a0d60679860bcf9b7befa36885be6 | /profiles/migrations/0002_auto_20170327_0141.py | 9b5bd9d0d197a2ebd37ee395d8dd072741a99ca0 | [] | no_license | https://github.com/guirmoreira/cafeteira | 5c41ce469ff9b87da9fcceb9c2dd3a9bb7ffad6e | 670d9b2f1c13efcac416e4601643e464a9673d0e | refs/heads/master | 2020-12-03T08:07:22.663525 | 2017-06-28T10:45:58 | 2017-06-28T10:45:58 | 95,658,637 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-27 01:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | UTF-8 | Python | false | false | 563 | py | 13 | 0002_auto_20170327_0141.py | 8 | 0.566607 | 0.523979 | 0 | 24 | 22.458333 | 72 |
jrhartog/REDPyAlpha | 7,447,473,320,240 | 0e627b15d0a43eb537c2bc9893adcae8d35f7d17 | 2e124a41b56c03b64b9f624eeb9514228d6ba03c | /redpy/table.py | e857a7e7ae95e6ae3bb4b9edab6cd71dad79f1fb | [] | no_license | https://github.com/jrhartog/REDPyAlpha | 4027beaa3b6cab8a9ecaa8ccbb92b3accdbfba64 | e51444436bebfa383267019b61d670dc04dfe277 | refs/heads/master | 2021-01-14T08:29:53.787744 | 2015-12-02T19:09:17 | 2015-12-02T19:09:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tables import *
from obspy.core.trace import Trace
from obspy import UTCDateTime
import datetime
import numpy as np
import redpy.correlation
import datetime
import matplotlib
def Repeaters(opt):
"""
Defines the columns in the 'Repeater Catalog' table based on the Options in opt
id: unique ID num... | UTF-8 | Python | false | false | 14,931 | py | 8 | table.py | 5 | 0.644766 | 0.631371 | 0 | 439 | 33.01139 | 90 |
janeyeon/progressive_growing_of_points | 5,995,774,366,188 | 8bdcb1cb8867d685f8737b7181a892a4867fdac3 | 40932f17b5896560d900726e9aa3144220003933 | /models/auto_encoder.py | f7deb8aa0c73f701327965d35514f9c51f9ac8b6 | [
"MIT"
] | permissive | https://github.com/janeyeon/progressive_growing_of_points | 8d12131165e75f83bf8800f81aa79ec545d4612e | 17a7641cdf73f22e60eaf2ca378ac74e9a4d4572 | refs/heads/main | 2023-08-24T19:17:50.523796 | 2021-10-23T10:55:46 | 2021-10-23T10:55:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import torch.nn as nn
import os
import shutil
from layers.pointnet import pointnet
from layers.srtdecoder import SRTDecoder
from layers.srtdecoder_pg import SRTDecoderPG
from layers.mrtdecoder import MRTDecoder
from layers.mrtdecoder_pg import MRTDecoderPG
from layers.mrtdecoder_pg2 import MRTDecoderPGV2
f... | UTF-8 | Python | false | false | 7,757 | py | 38 | auto_encoder.py | 28 | 0.547505 | 0.545572 | 0 | 179 | 42.340782 | 101 |
CreativePhilip/OperatingSystemsLaboratories | 953,482,739,872 | 48f3040c25c14a343609d4eef45898d790411eb1 | e606e7a9d454a93330f15850e154723a0bd2a0e7 | /lab1/schedulers/sjf.py | 6d555951e1afca28b0b0448c61dacd136d110e17 | [] | no_license | https://github.com/CreativePhilip/OperatingSystemsLaboratories | 31404568a87b7d90a596528a21ea742d9f772c3b | 341ad098076021a89db7fd6ccd9583339e4a2201 | refs/heads/master | 2023-06-03T03:58:59.474727 | 2021-06-22T15:26:12 | 2021-06-22T15:26:12 | 344,957,645 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import Optional
from utils.process import Process
from utils.queue import ProcessQueue, ProcessSorting
def sjf_non_preemptive(queue: ProcessQueue, prev_proc: Process) -> Optional[Process]:
if prev_proc:
return prev_proc
if queue.is_empty():
return None
return queue.sort(Proc... | UTF-8 | Python | false | false | 671 | py | 27 | sjf.py | 21 | 0.691505 | 0.685544 | 0 | 26 | 24.807692 | 101 |
Itzharshit/Pyro-FileStreamBota | 19,550,691,145,403 | 740031e6b6324a518a0d2f6786534ff632739949 | c6c5d497101fcf0509a7b2530adae70e32026867 | /WebStreamer/bot/plugins/start.py | 7a320445f5a8d577a13af79dbae5b7ca44b7bb98 | [] | no_license | https://github.com/Itzharshit/Pyro-FileStreamBota | d375e866682b31ec62e28d0914d8f7b19ac5d0d1 | a0f2f19248e2c632cd24d97fe9744542dc99cab8 | refs/heads/main | 2023-08-25T06:10:17.667836 | 2021-10-09T19:08:21 | 2021-10-09T19:08:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # (c) @EverythingSuckz | @AbirHasan2005
from WebStreamer.bot import StreamBot
from WebStreamer.vars import Var
from WebStreamer.utils.human_readable import humanbytes
from WebStreamer.utils.database import Database
from pyrogram import filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from ... | UTF-8 | Python | false | false | 8,494 | py | 1 | start.py | 1 | 0.51779 | 0.517083 | 0 | 184 | 45.130435 | 165 |
DiamaiD/Studium | 16,398,185,175,948 | 5ef8fd2d43ee43b9c1633306dec589ad8089bbb9 | 059ffb0e6a296b20a381328ccbec3fdfc63433b6 | /Semester_1/programm1/Klausurvorbereitung/probeklausur WS2019_2020/ex_keywords.py | 87e4fcf215294ee59262fd9ee1ed4c20e2441909 | [] | no_license | https://github.com/DiamaiD/Studium | d6f589b7d76d031d74dae20e1304b6568a94cd8e | 5981e63e020db65e93299ac197bc7dcbefa6540c | refs/heads/master | 2020-09-11T09:04:26.855214 | 2020-07-29T17:59:33 | 2020-07-29T17:59:33 | 222,014,184 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def keywords(c: str, s: str) -> list:
indexes = []
x = 0
passages = []
for char in s:
if char == c:
indexes.append(x)
x += 1
for i in range(len(indexes)):
if i % 2 == 0:
passages.append(s[indexes[i]+1:indexes[i+1]])
return passages
| UTF-8 | Python | false | false | 306 | py | 187 | ex_keywords.py | 101 | 0.477124 | 0.457516 | 0 | 13 | 22.461538 | 57 |
yandexdataschool/everware | 10,934,986,761,250 | 261461d6aabaadda090097f9b3fd7e96429ee31b | 3ea75c8c4121f9da70e79ee82a5d38958762417c | /etc/local_config.py | 41ef63a43c317c05521c109848de6de7fb5a9403 | [
"BSD-3-Clause"
] | permissive | https://github.com/yandexdataschool/everware | 6e117fa18e75b5c9ecbd664b1edea724f7ed6185 | 78c3a02acfcf3f3170981f2319d061eaf9c407aa | refs/heads/master | 2020-03-19T07:49:56.579291 | 2018-06-18T18:30:26 | 2018-06-18T18:32:48 | 136,152,332 | 0 | 0 | BSD-3-Clause | true | 2018-06-06T09:54:17 | 2018-06-05T09:20:05 | 2018-06-05T09:20:07 | 2018-06-06T09:54:16 | 485 | 0 | 0 | 0 | Python | false | null | # Use this config file to run everware locally on linux or other systems
# that do not need to use a VM to run docker containers
c = get_config()
load_subconfig('etc/base_config.py')
load_subconfig('etc/github_auth.py')
| UTF-8 | Python | false | false | 221 | py | 41 | local_config.py | 27 | 0.751131 | 0.751131 | 0 | 6 | 35.833333 | 72 |
Dineshsgit/dea-airflow | 15,040,975,491,737 | c0995ea7898f1c7a3deae19247692ebf7be9c586 | 11cbf195ade6bf4aa77e24d3057c1c387d812638 | /dags/automated_reporting/utilities/copernicus_api.py | 6b1c18944589e473ec7cca1f127f2c862fe57708 | [] | no_license | https://github.com/Dineshsgit/dea-airflow | 9e1a81a3604f299a195d69ce231612818f53a8e2 | 4b29fb227d4b6e653c1c0a5ee6b4cd079e325493 | refs/heads/master | 2023-08-29T07:08:46.448263 | 2021-10-07T22:42:08 | 2021-10-07T22:42:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Utilities for copernicus api (scihub) queries
"""
import logging
import requests
from concurrent import futures
from datetime import timezone, timedelta, datetime as dt
from automated_reporting.utilities import helpers
from automated_reporting.aux_data import aoi
log = logging.getLogger("airflow.task")
def que... | UTF-8 | Python | false | false | 4,202 | py | 70 | copernicus_api.py | 63 | 0.584246 | 0.580438 | 0 | 122 | 33.442623 | 88 |
ipalongengi/algorithm-practice | 10,591,389,363,332 | c413554ac4a624d728d60a053e61dc6a006892fd | cadef9ab90eddcc5c2e212635eee262fd9b5c7c5 | /questions/say_it/test_solution.py | 1d429e4ee0027e6be1a33834ccd856afa813c3b4 | [] | no_license | https://github.com/ipalongengi/algorithm-practice | 83aeb5389eb82a2e8104cb2627fb31494bfe0b82 | 4a423e010ded51d8de38c809fa0ca113a91d836d | refs/heads/master | 2019-07-09T05:54:38.420691 | 2019-03-25T00:14:31 | 2019-03-25T00:14:31 | 90,082,886 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pytest
from solution import say_it
@pytest.mark.parametrize('n, output', [
(1, 1),
(6, 312211),
(10, 13211311123113112211)
])
def test_valid_inputs(n, output):
assert say_it(n) == output
@pytest.mark.parametrize('n, output', [
(0, 1),
(-25, 1),
])
def test_invalid_inputs(n, output):
... | UTF-8 | Python | false | false | 348 | py | 7 | test_solution.py | 4 | 0.617816 | 0.514368 | 0 | 18 | 18.388889 | 39 |
sofiane-fourati/Mistplay-Challange | 15,625,091,056,087 | 7263aed29bc9f85cd04009745e9f6f0592640c69 | 951ca4a054d4febe32f959d9d420f3faa1df8163 | /polls/forms.py | e0a3449dd3195556503cbdb0f7048c22213ffb04 | [] | no_license | https://github.com/sofiane-fourati/Mistplay-Challange | e6cc893ecea303c4c80ac165ac2ee7a883df5650 | b8a899b5a85adb94e9b7a8ff3e17e1a109bcd105 | refs/heads/master | 2020-12-10T22:07:45.209949 | 2020-01-14T01:53:01 | 2020-01-14T01:53:01 | 233,725,525 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
class FilesForm(forms.Form):
file = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': False})) | UTF-8 | Python | false | false | 141 | py | 7 | forms.py | 2 | 0.77305 | 0.77305 | 0 | 4 | 33.75 | 83 |
epu-ntua/qualichain-jobcrawler | 1,881,195,701,961 | 88bcc46d0b524dc0d6f0e3622eee7a8eab3201b2 | 01ae09eae33e3da27726c4eb0efc1b143358eae1 | /jobcrawler/postgres_client/PostgresClient.py | c84c270c7c6acfa9657c08e253b9fbb11cb77034 | [
"MIT"
] | permissive | https://github.com/epu-ntua/qualichain-jobcrawler | d9d5146fbe3613347723c50b5106e23781a0ef59 | 16f236a1f38af8502e9d039814ef2f4193d85071 | refs/heads/master | 2022-12-16T11:38:10.051858 | 2020-02-27T08:35:50 | 2020-02-27T08:35:50 | 235,815,570 | 3 | 1 | MIT | false | 2022-12-08T03:41:02 | 2020-01-23T14:47:23 | 2020-11-12T15:27:20 | 2022-12-08T03:41:01 | 96 | 3 | 1 | 7 | Python | false | false | from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import sessionmaker
from jobcrawler.settings import POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_HOST, POSTGRES_DB
from jobcrawler.postgres_client.models import Base, JobPost
class PostgresClient(object):
"""
This is a Python Object that handle... | UTF-8 | Python | false | false | 2,170 | py | 18 | PostgresClient.py | 13 | 0.582488 | 0.582028 | 0 | 71 | 29.56338 | 116 |
KhawajaAhmad/Genomage-Platform | 3,195,455,693,093 | 81dc7c53f602405af09499566429f000977c5be7 | 3acf67a9a2a0a33ffb7a4af586dc5ed5bfdb9769 | /pages/create_pipeline.py | f8fe13028deb3af17195099beeab51df49edb055 | [] | no_license | https://github.com/KhawajaAhmad/Genomage-Platform | a7cd58ef3221e9c6c9ac092ad1d5cce82bd6b0ee | 507ebd144a654dd7eaa7639fff5b5a7d0e3489ae | refs/heads/master | 2023-09-01T05:49:01.718742 | 2021-11-02T16:04:36 | 2021-11-02T16:04:36 | 411,681,492 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from utils.import_utils import *
from app import app
from pages import sidebar, topbar
import pandas as pd
# =================================== Genomage =================================================
def cards(image, text, card_id):
return html.Div([
dbc.Card([
dbc.CardBody([
... | UTF-8 | Python | false | false | 35,639 | py | 38 | create_pipeline.py | 18 | 0.510312 | 0.495861 | 0 | 784 | 44.457908 | 118 |
Govind-Jangid/cams_biometrics | 1,571,958,066,437 | 25a5903c53ac10870381e415bba1dae7660b9da4 | 5540f838b7d6437eb740cd3ce8b988168307d9e8 | /setup.py | 17b7fe1296a8e9b20ac92f5e123550e5d170b04b | [
"MIT"
] | permissive | https://github.com/Govind-Jangid/cams_biometrics | 9be994834ea320ace5f60105e44bcff6daac6cd0 | a969902c7ad4aa5512807807ed662f16cd402716 | refs/heads/master | 2022-03-03T12:13:17.852911 | 2018-11-05T06:46:46 | 2018-11-05T06:46:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import re, ast
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in cams_biometrics/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('cams_biometrics... | UTF-8 | Python | false | false | 719 | py | 6 | setup.py | 3 | 0.698192 | 0.694019 | 0 | 25 | 27.76 | 70 |
PCLC7Z2/self-sample | 7,533,372,658,751 | b5f499061558e762ccd99917281ac374daffba45 | 47c10ad5bd158de019d0c0200cf9e8d9a57eb94b | /options.py | a91d784815af85969ad248e96c0fb4cfd3ace250 | [] | no_license | https://github.com/PCLC7Z2/self-sample | 1ee5721b80eb5adfbc320bcced6cf3795e0432f5 | ad119c6fbef8fcf03e9fce4c1c2dbe61a85e2689 | refs/heads/master | 2023-07-08T20:29:46.156012 | 2021-08-15T13:43:57 | 2021-08-15T13:43:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
from pathlib import Path
import os
import util
import warnings
def get_parser(name='Self-Sampling') -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(description=name)
parser.add_argument('--lr', type=float, default=0.1, metavar='LR',
help='learning rate (def... | UTF-8 | Python | false | false | 2,562 | py | 18 | options.py | 15 | 0.65847 | 0.638954 | 0 | 57 | 43.947368 | 98 |
crystallistic/wallbreakers-hw | 6,957,847,047,840 | dd5d4b71c8fdfe7dd854234f9dc4e3de355eedc5 | 21c9fcd90fbfa368b60d747cedf9d5fa0eb60d32 | /week2/290.py | 2310a254a33fbed478f2a123fb5f8cf4fbf343e1 | [] | no_license | https://github.com/crystallistic/wallbreakers-hw | 0a2cff6d08b18b7705fc93565020fdf0d510c44e | e6e66e396d42662bba5c3042b4cf337a2506fa83 | refs/heads/master | 2020-06-08T06:00:35.744870 | 2019-08-05T05:07:31 | 2019-08-05T05:07:31 | 193,172,596 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def wordPattern(self, pattern, str):
"""
:type pattern: str
:type str: str
:rtype: bool
"""
words = str.split()
if len(pattern) != len(words): return False
seenValues = set()
lookup = dict()
for c,w in zip(patter... | UTF-8 | Python | false | false | 553 | py | 66 | 290.py | 65 | 0.484629 | 0.484629 | 0 | 18 | 29.777778 | 89 |
amd840/harajBeta | 13,640,816,144,128 | 1d5fa9c563a933e349d73dac72ecc79d993bff4d | 12837a0f5bb21a456e0a16d7a4553d3a9e77db18 | /polls/migrations/0006_auto_20200802_0921.py | aae14510805112828e23eafbb0a8d75fbb25f5ae | [] | no_license | https://github.com/amd840/harajBeta | 0e4f503294e2e38db85e517867466290fb1d3e50 | d9036438055e3f3f54b2ccfd79769eea70450d25 | refs/heads/main | 2023-05-01T14:42:49.920376 | 2021-05-20T20:39:14 | 2021-05-20T20:39:14 | 341,306,450 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.0.8 on 2020-08-02 09:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('polls', '0005_product_product_seller'),
]
operations = [
migrations.RemoveField(
model_name='ca... | UTF-8 | Python | false | false | 1,700 | py | 49 | 0006_auto_20200802_0921.py | 26 | 0.542353 | 0.524706 | 0 | 57 | 28.824561 | 111 |
karoonakar/ML | 10,050,223,475,981 | efead633d2514d2882019c27fcfc64ecd2a2c177 | 0f78cb7079b45e4f1dc8734c6f2c24f6720e4a1e | /Notebook/exception_classifier.py | 3ee6d0b4e293108be0baa03b4af0ebfb3ee481ca | [] | no_license | https://github.com/karoonakar/ML | 53cb274e98e026a9676f7148851db3d0c935657d | a669e593494b8afac50a15fd9e7b2265d4aba9db | refs/heads/master | 2022-10-30T08:42:22.964185 | 2018-08-27T20:16:20 | 2018-08-27T20:16:20 | 145,786,869 | 0 | 1 | null | false | 2022-10-07T03:03:54 | 2018-08-23T02:06:35 | 2018-08-27T20:17:14 | 2018-08-27T20:17:13 | 8,427 | 0 | 1 | 1 | Python | false | false | import pandas as pd
from sklearn import tree
from sklearn.naive_bayes import MultinomialNB
from sklearn.feature_extraction.text import CountVectorizer
path = 'data/exception_data.csv'
dataFrame = pd.read_csv(path)
df_master=dataFrame[["Module", "Language","Exception","CausedBy1","CausedBy2"]]
df_lable=dataFrame[["Se... | UTF-8 | Python | false | false | 3,058 | py | 15 | exception_classifier.py | 10 | 0.77894 | 0.751799 | 0 | 62 | 48.322581 | 265 |
paulhzq/cs61a | 2,989,297,277,719 | 2f673f8886012d4bd5c08b5ebe9139cd7388c2c6 | 108034973f9046a7603d5fe3f26c59b20a7e68da | /homework/hw12/tests/find.py | e6dc78ba21e592d75abdea7a11cd26190efdae02 | [] | no_license | https://github.com/paulhzq/cs61a | b1b1387cefbaaf1823c02d535891db7d085f3b04 | 9eee13df9ad113591dc55d106561951cea34abc5 | refs/heads/master | 2020-05-23T08:16:14.193086 | 2017-01-15T02:06:18 | 2017-01-15T02:06:18 | 70,255,875 | 8 | 8 | null | null | null | null | null | null | null | null | null | null | null | null | null | test = {
'name': 'find',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
scm> (find m even?)
2
scm> (find m (lambda (x) (= x 3)))
False
scm> (find m (lambda (x) (= x 1)))
1
""",
'hidden': False,
... | UTF-8 | Python | false | false | 551 | py | 64 | find.py | 60 | 0.344828 | 0.328494 | 0 | 29 | 18 | 57 |
awesome-liuxiao/leetcodesolution | 2,800,318,694,290 | 489ef4720ebf4017465747cf45b531f0ab1fdcae | e2468c60810764971f2dae2b959650b553042810 | /796_rotateStr.py | e827d3c541a6852bc1ab7fff30319c7fe8cc82e5 | [] | no_license | https://github.com/awesome-liuxiao/leetcodesolution | 9a01b6f36266149ae7fe00625785d1ada41f190a | 3637cd1347b5153daeeb855ebc44cfea5649fc90 | refs/heads/master | 2023-06-08T13:42:14.653688 | 2023-06-01T08:39:35 | 2023-06-01T08:39:35 | 213,380,224 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def rotateString(self, s: str, goal: str) -> bool:
if s == goal:
return True
sLen = len(s)
def rotateOnce(tmpS: str, sLen: int) -> str:
if sLen == 1:
return tmpS
tail = tmpS[0]
tmpL = list(tmpS)
for i... | UTF-8 | Python | false | false | 969 | py | 176 | 796_rotateStr.py | 173 | 0.474716 | 0.469556 | 0 | 44 | 21.045455 | 54 |
yifaan/CIT-590 | 2,619,930,095,578 | c9fd19f90c1dcc3cb4148b2729d052969c3f89b9 | 5e1ee67ddad12cc44b1e5270b2b2d2e0df686bd7 | /homework5/makeWebsite_tests.py | 6a0e0ffde76e4847ae244462fd3017194ef3f1ea | [] | no_license | https://github.com/yifaan/CIT-590 | 7b3d60f0cb5abbfabcf5ba7d360f89c09ce07999 | 69d6a793d99cbf0a196cc1dc464a1be0ab434d89 | refs/heads/master | 2020-06-14T16:03:16.078494 | 2015-04-08T23:10:23 | 2015-04-08T23:10:23 | 29,832,003 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from makeWebsite import *
import unittest
class makeWebtestcase(unittest.TestCase):
def setUp(self):
self.resume = 'resume.txt'
self.newresume = 'resume_unittest.txt'
def testGetName(self):
self.assertEqual(GetName(self.resume), 'Yifan Yang')
self.assertRaises(NameError, GetN... | UTF-8 | Python | false | false | 1,979 | py | 28 | makeWebsite_tests.py | 21 | 0.651844 | 0.646286 | 0 | 49 | 39.387755 | 137 |
flatironinstitute/binderhub | 1,812,476,226,212 | 127ef50cdc51ed7e67e3dff21cd9175a08363a7a | 49ad3bc3c96128e8f8b23d8b5aed06e7fbf03fa9 | /binderhub/repoproviders.py | 5269877aec55f56a6ea2408e343201014bd9dfb6 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | https://github.com/flatironinstitute/binderhub | 27ef1b58cf1a17b8ed254a683cd92102dc1b323d | e7da1b6dc9036fbb774043c321e847744abd6ffa | refs/heads/main | 2023-06-12T00:45:18.645048 | 2023-06-03T23:15:18 | 2023-06-03T23:15:18 | 175,685,187 | 1 | 1 | BSD-3-Clause | true | 2022-11-09T01:58:37 | 2019-03-14T19:19:38 | 2022-01-10T17:17:18 | 2022-11-09T01:58:36 | 7,570 | 1 | 2 | 0 | Python | false | false | """
Classes for Repo providers.
Subclass the base class, ``RepoProvider``, to support different version
control services and providers.
.. note:: When adding a new repo provider, add it to the allowed values for
repo providers in event-schemas/launch.json.
"""
import asyncio
import json
import os
import re
... | UTF-8 | Python | false | false | 44,813 | py | 6 | repoproviders.py | 2 | 0.578761 | 0.572646 | 0 | 1,339 | 32.467513 | 145 |
seanigami/QuickYOLO | 13,486,197,340,174 | 2f9fdf20119fd7b768b179dc047287a064fa1d08 | 90d6f90d35d0cf1778bd8282e78abdfcaaf4e4c9 | /export_larq_model.py | a97383eb1907b6dc2b3fc77729f5cc80a1778a7c | [
"MIT"
] | permissive | https://github.com/seanigami/QuickYOLO | adfb78df2e4305105fe4698794a84e4fde6ff0cf | 77d8c544ca564b1c0e26815ed5fe99dd855dfd23 | refs/heads/main | 2023-04-07T09:06:36.412880 | 2021-04-13T03:39:22 | 2021-04-13T03:39:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import cv2
import numpy as np
import larq_compute_engine as lce
import tensorflow as tf
from tensorflow.python.saved_model import tag_constants
from yolov3.dataset import Dataset
from yolov3.yolov4 import Create_Yolo
from yolov3.utils import load_yolo_weights, postproc... | UTF-8 | Python | false | false | 3,259 | py | 14 | export_larq_model.py | 11 | 0.677202 | 0.668917 | 0 | 74 | 43.054054 | 115 |
GNUCS-SYJ/AlgorithmStudy | 4,372,276,710,521 | e8ddb9581dd82c295e759afc83308753874784e0 | 88f65e4f83ea5fbfc7b2ce92d1a0372769c6013a | /suho/withpython/Graph/Q45.py | 902e33b55edfb68e019c9046728d35ca8124cd18 | [] | no_license | https://github.com/GNUCS-SYJ/AlgorithmStudy | e8bf85d5f77567ec17ba7925104feb2ef29fb9a2 | 7f17aca5163b83644c605993d73ef90e82fc5045 | refs/heads/main | 2023-04-23T02:44:22.214145 | 2022-06-11T06:39:55 | 2022-06-11T06:39:55 | 332,159,173 | 0 | 6 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import deque
import sys
t = int(input())
for _ in range(t):
n = int(input())
in_degree = [0] * (n+1)
graph = [[0] * (n+1) for _ in range(n+1)]
last_year = list(map(int, sys.stdin.readline().rstrip().split()))
for i in range(n):
for j in range(i+1, n):
graph[l... | UTF-8 | Python | false | false | 1,481 | py | 756 | Q45.py | 412 | 0.430115 | 0.411884 | 0 | 66 | 21.439394 | 69 |
evanjamesjackson/spotify_recommender | 18,717,467,515,367 | 00e70a2897dd1cf275e5fcfbfddb19fdaa62bff1 | a04ff8e343b4d3b2ef3193722dfbaf197df42a04 | /lastipy/spotify/token.py | bd3f39b233d622b015923b9e63a6d0d6c3627943 | [] | no_license | https://github.com/evanjamesjackson/spotify_recommender | 4a36ca6d87faacaaefccec876a29f5b390414264 | e011977ff2d13d85243dc69052b3f972dc84abee | refs/heads/master | 2020-05-09T19:18:08.674279 | 2020-05-08T20:06:16 | 2020-05-08T20:06:16 | 181,373,367 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import spotipy.oauth2 as oauth2
import webbrowser
import os
from lastipy import definitions
REDIRECT_URI = 'https://www.example.com/callback/'
#TODO test
def get_token(username, client_id_key, client_secret_key):
'''Returns a Spotify token for the given user. If a cached token file exists (with the format .cache... | UTF-8 | Python | false | false | 1,947 | py | 33 | token.py | 31 | 0.605547 | 0.604006 | 0 | 54 | 35.055556 | 118 |
jsqwe5656/MyPythonNote | 15,702,400,440,337 | 37b49a9efd53b703c7441867ca352e36da77fa94 | fa46150df2ed96a9177288929047f03a184b5c43 | /py_process/demo_dieloop.py | 79f6338bbcb63385f6f449307e30d94b211f678c | [] | no_license | https://github.com/jsqwe5656/MyPythonNote | e588202312f7e7929a5606266418b99f83f0ab3b | 7434c84f6fda4c2e13e00907f26f995d8e06251a | refs/heads/master | 2021-01-19T03:59:33.084181 | 2017-03-09T09:29:35 | 2017-03-09T09:29:35 | 84,422,061 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-*- coding: utf-8 -*-
import threading,multiprocessing
def loop():
x = 10
while True:
x = x+1
print(x)
for i in range(multiprocessing.cpu_count()):
t = threading.Thread(target=loop)
t.start() | UTF-8 | Python | false | false | 236 | py | 61 | demo_dieloop.py | 56 | 0.567797 | 0.550847 | 0 | 14 | 15.928571 | 44 |
DaTimsta/euler | 163,208,770,984 | 23315e0a7dd772a27ac7b233445359176bb34ad2 | ec4573f8b36c60a8175c63833f3015c697aa06a6 | /097.py | 2c3cb2053a692dc1bd84fb4b52b230359aa7429f | [] | no_license | https://github.com/DaTimsta/euler | 366702ac6567cc5adf41c6e273f2e8f8b6672c3c | 95a1508f2b0b17f62a5915658273098002f2e476 | refs/heads/master | 2018-01-07T23:36:27.847761 | 2017-11-18T16:20:14 | 2017-11-18T16:20:14 | 49,143,865 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://projecteuler.net/problem=97
from euler import num_digits
from time import time
T = time()
s = 28433
for i in range(0, 7830457):
s *= 2
if num_digits(s) == 11:
s %= (10**10)
print(s + 1)
print('Time elapsed:', time() - T)
# notice that python can do it easily (and faster) just by inputting th... | UTF-8 | Python | false | false | 380 | py | 88 | 097.py | 87 | 0.621053 | 0.513158 | 0 | 15 | 24.266667 | 80 |
Sibyx/mdns | 14,199,161,911,255 | e712b2ecd0382526b43d0563552b5ed7b5d6e92e | 39148a9cfd32be3f074810cdecbfe5f7342b0fc0 | /core/models/taxonomic_class.py | c156ee90933f861fd43e993cd4ff758bd32d4ff9 | [
"Apache-2.0"
] | permissive | https://github.com/Sibyx/mdns | 71d4e9c49e6106940d2bcb7b77c94f7d470b9788 | 6c65364ef04b413a734dd495fba85569e2648d73 | refs/heads/master | 2023-01-29T10:36:18.112606 | 2021-03-05T01:35:19 | 2021-03-05T01:35:19 | 170,988,517 | 1 | 0 | Apache-2.0 | false | 2023-01-07T04:29:56 | 2019-02-16T09:59:15 | 2021-03-05T01:35:21 | 2023-01-07T04:29:56 | 3,688 | 0 | 0 | 28 | Python | false | false | from django.db import models
from core.models.base import BaseModel
from core.models.taxonomic_phylum import TaxonomicPhylum
class TaxonomicClass(BaseModel):
class Meta:
app_label = 'core'
default_permissions = ()
db_table = 'taxonomic_classes'
taxonomic_phylum = models.ForeignKey(Ta... | UTF-8 | Python | false | false | 466 | py | 76 | taxonomic_class.py | 53 | 0.703863 | 0.699571 | 0 | 17 | 26.411765 | 83 |
GutuAlexei/Introducere_Afi-are_Calcule | 14,877,766,735,687 | 2702a9cb206c748e854a5f75564bef585fcac3a2 | e7228b2e25236cad4b5bc1a623f81fe1be2405d4 | /problema_7_AG.py | 89ac5cf87d5ebda5606b7f528f632498db0f45c7 | [] | no_license | https://github.com/GutuAlexei/Introducere_Afi-are_Calcule | 061efbd8fcc79cb9bc3fea8487f6a368263aef87 | c5b4380ee05e70ac6ff7f80cfb9a9410049a01b2 | refs/heads/master | 2022-12-24T19:00:34.477254 | 2020-10-03T22:39:09 | 2020-10-03T22:39:09 | 299,917,219 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a=int(input('intr virsta='))
Gr=2*a+8
I=5*a+80
print('greutatea ideala=', Gr , 'kg')
print('inaltimea ideala= ', I , 'cm') | UTF-8 | Python | false | false | 126 | py | 10 | problema_7_AG.py | 10 | 0.603175 | 0.563492 | 0 | 5 | 23.6 | 37 |
alexazf/mipt-python3 | 13,494,787,247,451 | fa0f3bdd7e890faa7d8298012fe078e1abea73f9 | 4458cf1abe59f89c43cab50b13b315f4fa49cc0d | /Lesson-2/task_17.py | 8b5af28c5c85a285ee812c6a579d04b9b39c6c57 | [] | no_license | https://github.com/alexazf/mipt-python3 | 04782a82a722501c645ab30340187fcb271f25ef | 822a03cc2c8cafcaad176b16b572060cc3e53ae4 | refs/heads/master | 2018-10-29T02:37:19.552317 | 2018-10-09T17:14:33 | 2018-10-09T17:14:33 | 144,759,635 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
from pyrob.api import *
from move.index import *
@task
def task_8_27():
move(move_up, cell_is_filled, False)
move_left()
if not cell_is_filled():
move_right(2)
if __name__ == '__main__':
run_tasks()
| UTF-8 | Python | false | false | 248 | py | 82 | task_17.py | 78 | 0.580645 | 0.560484 | 0 | 17 | 13.588235 | 40 |
Kreloc/python | 17,025,250,369,633 | 6515cf6553c4aeda6f56c88d39174bd7665aaf8a | e8ec8e30cbbeb9b1a27c7093509e655d4070bc43 | /getDinnerMenuForWeek.py | f32bb7744d2369ad0bd3a24016e1d5e57d050a3e | [] | no_license | https://github.com/Kreloc/python | b627f412470f638c305b0eacb30333420571a1eb | 93e9c532fc79caf7cce220b2440773d73236724e | refs/heads/master | 2021-01-19T04:39:21.269420 | 2019-04-05T23:37:48 | 2019-04-05T23:37:48 | 63,201,440 | 1 | 4 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! python3
# getDinnerSelection - Gets dinner selection for the week from list in script
import random
#import os
#Dictionary of dinners and their ingeredients
dinner_ingredients = {
'breakfast burritos': 'Eggs, tortillas(Burrito size), maple sausage, cheese, sour cream',
'chicken enchiladas': 'Boneless skinless chick... | UTF-8 | Python | false | false | 6,419 | py | 19 | getDinnerMenuForWeek.py | 8 | 0.728307 | 0.727372 | 0 | 114 | 55.307018 | 191 |
paul91125/abc | 2,680,059,622,648 | 298983ed0535518f6de3c656a876d42b679261ca | ca539d2edb215e2394019b8efcdb040198ee9b95 | /list.py | a59b4ed5e886e6e3147e2def5a91e54ba9ccff2f | [] | no_license | https://github.com/paul91125/abc | 4019b8eb836abe70faa6a2d3359dbcfbaeddc3dd | e3f7298ab5f1545f9ac2de528e16197329682649 | refs/heads/master | 2021-01-20T06:54:10.135928 | 2017-05-04T01:47:11 | 2017-05-04T01:47:11 | 89,942,620 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class slist:
class _node:
def __init__(self,info):
self._data=info
self._next=None
def __init__(self):
self._head=None
self._tail=None
self._length=0
def is_empty(self):
return self._length==0
def count(self):
return self._length
def get_first(self):
if not self.is_empty():
return self.... | UTF-8 | Python | false | false | 795 | py | 4 | list.py | 4 | 0.641509 | 0.636478 | 0 | 43 | 17.488372 | 33 |
louking/loutilities | 1,597,727,885,810 | d26013f788b4ca556dec9b1722177c9c93c2f07b | 85764904e918310f9e4a209f64570dcdcf099818 | /loutilities/user/__init__.py | 700c855acee9f0587253145d7d3055f798dfff01 | [
"Apache-2.0"
] | permissive | https://github.com/louking/loutilities | 05bb20994ae06d2e68989cd6a779c350a9a430ad | aaf7410849d0167001cd5f06ab0dae6563e58ec7 | refs/heads/master | 2023-07-24T18:32:36.128102 | 2023-07-15T10:02:43 | 2023-07-15T10:02:43 | 5,824,315 | 2 | 2 | null | false | 2023-05-10T09:59:37 | 2012-09-15T21:29:29 | 2023-01-18T18:28:06 | 2023-05-10T09:59:36 | 540 | 2 | 2 | 31 | Python | false | false | '''
user - package supports user management for xtilities products
=========================================================================================
'''
# pypi
from flask import Flask, g
from flask_security import Security, SQLAlchemyUserDatastore, LoginForm, ForgotPasswordForm
# homegrown
from loutilities.co... | UTF-8 | Python | false | false | 4,326 | py | 95 | __init__.py | 69 | 0.650948 | 0.649098 | 0 | 114 | 36.95614 | 129 |
k-gerst/NET-SS3-Dissertation | 16,011,638,093,244 | 2065bd1173d57a5c937428fd96dd0c17e65594d2 | b490d8b7ef30658cce73bac77d8cfb81fa1d383b | /src/egoNetClass.py | 4feeb17ae30ce74f203d8c1727658e5ce9de8b9c | [] | no_license | https://github.com/k-gerst/NET-SS3-Dissertation | 90f4f9366c64ac80d43ac5d54636aa6396aa6743 | 2b72ec2d5749402b73a5f33688e7c0d0e3f15b47 | refs/heads/master | 2021-09-09T22:25:27.622827 | 2018-03-20T01:17:40 | 2018-03-20T01:17:40 | 125,916,132 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import re # provides regular expression matching operations (https://docs.python.org/2/library/re.html#module-re)
import os
import networkx as nx
import matplotlib.pyplot as plt
def anon_alters(subid, node_list):
"""
Takes list of node names as input and returns an anonymized list of node... | UTF-8 | Python | false | false | 4,443 | py | 9 | egoNetClass.py | 6 | 0.538375 | 0.529147 | 0 | 116 | 37.301724 | 121 |
nkelton/Project-Litter-Bug-Front-End | 2,121,713,876,962 | 614a70203be4f4761326bfa1bc9691cdf95f9afe | a89133c42a75fea4003211cc6339a31264a1ec18 | /script/urls.py | 6c5c0923811a78ff8239b01789c938c07060ba80 | [
"MIT"
] | permissive | https://github.com/nkelton/Project-Litter-Bug-Front-End | cdbfe6ee30fa50d7e15dea60a538c8f5d531a089 | 366f1777091cac84c464204bfb39e1f54fa004f2 | refs/heads/master | 2022-12-09T16:06:12.658283 | 2020-11-10T21:06:02 | 2020-11-10T21:06:02 | 193,614,189 | 0 | 0 | MIT | false | 2022-12-08T01:22:26 | 2019-06-25T01:54:35 | 2020-11-10T21:06:06 | 2022-12-08T01:22:25 | 658 | 0 | 0 | 6 | C | false | false | from rest_framework.urlpatterns import format_suffix_patterns
from django.conf.urls import url
from . import views
urlpatterns = [
url('script/$', views.ScriptList.as_view()),
url('script/(?P<pk>\d+)/$', views.ScriptDetail.as_view()),
]
urlpatterns = format_suffix_patterns(urlpatterns)
| UTF-8 | Python | false | false | 299 | py | 42 | urls.py | 26 | 0.719064 | 0.719064 | 0 | 12 | 23.916667 | 62 |
harishankar18/SmartDisplay | 17,575,006,204,998 | 9e522824028e73fe1a4af5ab4d2e4ef4fd8b38fc | df3dd1c22324293db47c86b6574a872ec9652e6d | /web_interface.py | af4cc799a8bb409c78b6a35f58478d180ccff0b6 | [] | no_license | https://github.com/harishankar18/SmartDisplay | ec458562c5ab4297f62d922b081330dd8ec7c910 | bd0e4dfd193ecf21af491d8f304d0e479d604439 | refs/heads/master | 2020-04-14T11:44:45.687433 | 2019-01-02T09:50:06 | 2019-01-02T09:50:06 | 119,332,834 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask
from MessageQueue import MultiMessageQueue
from ConfigReader import ConfigReader
from Yammer import YammerHandle
from SmartLogger import SmartLogger
from WeatherReport import WeatherReport
from UploadHandler import UploadHandler
class FPDisplay:
"""
Main class for FPDispla... | UTF-8 | Python | false | false | 2,064 | py | 13 | web_interface.py | 12 | 0.621609 | 0.615795 | 0 | 59 | 32.983051 | 88 |
Amitabitbul/Bit2c.co.il.API.Python | 3,521,873,207,360 | 53ac5f8cdc9e4202beb3ef112b312e8044969fa0 | 23895f47a9fd6581f690b5bc9a4fd1abc2f99e06 | /Balance.py | a2e9f647d1906d7d9b8a8480e9115cf8730487d5 | [] | no_license | https://github.com/Amitabitbul/Bit2c.co.il.API.Python | c8e07f98b7d65d63503bd570b26c9aeac6665d2b | b57fe5c4f94ca2733eebe49d06079f9eb6f3ab3c | refs/heads/master | 2021-01-18T23:36:30.997176 | 2018-01-07T19:08:10 | 2018-01-07T19:08:10 | 15,962,470 | 1 | 6 | null | false | 2018-01-07T19:08:11 | 2014-01-16T08:41:18 | 2017-12-06T15:30:50 | 2018-01-07T19:08:10 | 174 | 1 | 6 | 1 | Python | false | null | class Balance:
def __init__(self,NIS,LTC,BTC):
# # Types
self.BalanceBTC = BTC # decimal
self.BalanceNIS = NIS # decimal
self.BalanceLTC = LTC # decimal | UTF-8 | Python | false | false | 217 | py | 21 | Balance.py | 19 | 0.502304 | 0.502304 | 0 | 7 | 30.142857 | 41 |
bgruening/ngsutils | 3,917,010,220,248 | 1f1ed1259dc99162d65c7fc9e95b425866d0f957 | 94bd032bc21bfd24e6dcbcfe642331f58829e574 | /ngsutils/gtf/t/test_junctions.py | 829573989fd9375f501363497c29204dc8eccee7 | [
"BSD-3-Clause",
"BSD-3-Clause-Open-MPI"
] | permissive | https://github.com/bgruening/ngsutils | 4c1d935eb0ff337de996ce9d71b8e79ebf2faee7 | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | refs/heads/master | 2021-01-21T20:33:45.678884 | 2019-06-25T20:48:45 | 2019-06-25T20:48:45 | 45,920,499 | 0 | 0 | BSD-3-Clause | true | 2019-07-16T10:09:01 | 2015-11-10T15:21:30 | 2015-11-10T15:21:32 | 2019-07-16T10:08:58 | 5,658 | 0 | 0 | 0 | Python | false | false | #!/usr/bin/env python
'''
Tests for gtfutils / junctions
'''
import os
import unittest
import StringIO
import ngsutils.gtf.junctions
from ngsutils.gtf import GTF
# >test1
# 1 2 3 4 5 6 7 8 9 100
# 123456789012345678901234567890123456789... | UTF-8 | Python | false | false | 4,359 | py | 126 | test_junctions.py | 121 | 0.663455 | 0.543014 | 0 | 136 | 31.051471 | 115 |
liqing9399/data_struct | 17,549,236,401,397 | 08d5a33aa12be84247845b629fd8808078168900 | d8f973a12bde4d0e000d66e61d46200cb1d8a8a1 | /feature_test/tpybind11/t.py | e735d20a38644a3d71c2f2703034efe06073ba3d | [] | no_license | https://github.com/liqing9399/data_struct | 2103d184ed4d95e0c8a2babfdbaf06ab412b0cd2 | d2cfe7a8d3af51e578d6bd8befc31323415b3776 | refs/heads/master | 2023-09-05T23:34:22.506292 | 2023-08-21T09:49:37 | 2023-08-21T09:49:37 | 157,897,147 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #######p############################################
#filename : t.py
#author : litao
#e-mail : 362085095@qq.com
#create time : 2023-05-23 17:43:04
#last modified : 2023-05-23 17:43:04
####################################################
#!/usr/bin/env python
import emp
emp.add(1,1)
emp.mul(2,3)
p... | UTF-8 | Python | false | false | 372 | py | 50 | t.py | 40 | 0.438172 | 0.327957 | 0 | 16 | 22.25 | 52 |
bpeterso2000/jsonjoin | 11,493,332,521,238 | 16d6f9e39fb9f224457b02dd4f27f1f334d64ec5 | 07b017b57cd5a5c17ac6773334209a12cef6e442 | /jsonjoin/core.py | 3273c9bdd99b1b2d275143202de10295d20c9a9b | [
"MIT"
] | permissive | https://github.com/bpeterso2000/jsonjoin | 68fcef8d164aac3feccb6c2828218bcd0607ce77 | 4a72d2660a641d904deab4d65934fa11be49beaa | refs/heads/master | 2021-01-19T11:49:17.683228 | 2017-04-19T00:04:43 | 2017-04-19T00:04:43 | 87,998,574 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Core code.
INNER JOIN LEFT JOIN RIGHT JOIN OUTER JOIN SYMMETRIC JOIN
+---+--+---+ +---+--+---+ +---+--+---+ +---+--+---+ +---+--+---+
| :**: | |***:**: | | :**:***| |***:**:***| |***| |***|
| L :**: R | |*L*:**: R | | L :**:*R*| |*L*:**:*R*| |*L*| |*R*|
| :**: | |***:**: ... | UTF-8 | Python | false | false | 2,742 | py | 6 | core.py | 4 | 0.525894 | 0.521517 | 0 | 67 | 39.925373 | 78 |
xeroborn/Intro-to-Programming-Quiz-Project | 18,708,877,543,333 | 07de6c1788ef312c176b16a7819308452fb8d8d8 | 2dfcbb819f1d6fc0693b2de69595c04dab19566b | /quizv3.py | f17a64fb7458efcf47a596f39e88c4ec76c0ed80 | [] | no_license | https://github.com/xeroborn/Intro-to-Programming-Quiz-Project | 3ee23fdd5e3cd38360a62c5d305a16fb7976a1aa | 7cdac6f4b15f7a668263b6fc0ec5dc00946fbcf5 | refs/heads/master | 2020-06-16T06:13:44.525188 | 2017-03-28T14:49:25 | 2017-03-28T14:49:25 | 75,239,138 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Quiz Game Project
#Michael Phillips
easy_questions = ["A ________ is a pointer to an object.", "_________, or procedures, contain code that is likely to be reused.",
"______ are passed to a function.", "_______ are returned from a function."]
med_questions = ["A ___ loop will iterate through through an entire list ... | UTF-8 | Python | false | false | 5,281 | py | 2 | quizv3.py | 1 | 0.689263 | 0.681121 | 0 | 141 | 36.460993 | 155 |
dan22m/friendly_telegram | 7,524,782,722,077 | 7a887ecef88e20a926874a1dde2302260b4c8ff0 | 482a314311240e2ca3b5326b908d532d0f41b2dd | /BackupManUA.py | e26298554001f0f41b16805defd16340d12b4301 | [] | no_license | https://github.com/dan22m/friendly_telegram | da3fcba5a542ced34e73614bec4c0c336edcf621 | dbbffb2301829b4bf2b762ff760c5c20a37450ad | refs/heads/main | 2023-08-19T08:20:26.600876 | 2021-09-27T12:58:01 | 2021-09-27T12:58:01 | 410,839,927 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Coded by D4n13l3k00 #
# t.me/D4n13l3k00 #
# This code under AGPL-3.0 #
# translated to UA from t.me/Daniel_Maklein
import ast
import io
from .. import loader, utils
@loader.tds
class BackupManMod(loader.Module):
"""BackupMan"""
strings = {'name': 'BackupManUA'}
async def c... | UTF-8 | Python | false | false | 4,377 | py | 3 | BackupManUA.py | 3 | 0.58352 | 0.575056 | 0 | 80 | 48.2125 | 299 |
Ioana-Ionel/server-client | 7,138,235,686,567 | e34182505b727046e9b65a2167dac7c13b96301d | 750c9b91d708f0b8932fc6b74150e72fd55fb07d | /server.py | 85a8f97ec7a216d8ad75533f78ca9be6c3ac80ac | [] | no_license | https://github.com/Ioana-Ionel/server-client | 5ab6613543e513b1d41ea26ef35f9b0327408e62 | eb3738472bfc8af4ac5c6c14c38958e389e3bf88 | refs/heads/master | 2020-04-05T13:48:36.492163 | 2018-11-09T19:47:21 | 2018-11-09T19:47:21 | 156,910,515 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import socket
# from __future__ import print_function
def prime_numbers(a):
if a is 0 or a is 1:
return False
for d in range(2, a/2):
if a % d == 0:
return False
return True
def server_program():
host = socket.gethostname()
port = 5000
# initiate connection
se... | UTF-8 | Python | false | false | 1,187 | py | 2 | server.py | 2 | 0.579612 | 0.567818 | 0 | 42 | 27.285714 | 91 |
grey-swan/furniture | 6,828,998,030,604 | 6c782c28d6dc466a2bf9a3ed26d0a0373461e0cd | f59019a50bdf13324b46853215745c97c7e149b7 | /product/models.py | 3f7161b43a746c8767913a065426ed5786f79c04 | [] | no_license | https://github.com/grey-swan/furniture | 70cd608c9dac2c32244bb18982764bc5194d40ea | 96efde9053cffa0da4a129de4601f3679f91d8fa | refs/heads/master | 2022-12-08T16:34:59.179270 | 2019-10-07T09:02:37 | 2019-10-07T09:02:37 | 201,612,028 | 0 | 0 | null | false | 2022-07-05T21:34:07 | 2019-08-10T09:58:54 | 2019-10-07T09:02:45 | 2022-07-05T21:34:03 | 1,077 | 0 | 0 | 9 | Python | false | false | from django.db import models
from django.contrib.auth.models import User
# class Category(models.Model):
# """商品分类"""
#
# name = models.CharField(max_length=32, verbose_name='名称')
# alias = models.CharField(max_length=32, verbose_name='别名')
#
# def __str__(self):
# return self.name
#
#
# class... | UTF-8 | Python | false | false | 5,505 | py | 25 | models.py | 21 | 0.625125 | 0.617136 | 0 | 133 | 36.639098 | 113 |
bdaskalov/pyhash | 3,667,902,101,404 | 37c374e992d0f733dd71f8adae5e7f4b64e2803d | a5468219e8fa3b8063ffd4d544b0f920ff674028 | /pyhash.py | 61a04e19495715d5a346f2de9d5c356d81ea751b | [] | no_license | https://github.com/bdaskalov/pyhash | 948644f6588524407506ddd32fd52e2db50c5751 | 8de688af2aa1924c57b0f7e3bbffb5399e274be2 | refs/heads/master | 2020-03-21T08:34:11.340658 | 2018-06-26T15:10:03 | 2018-06-26T15:10:03 | 138,351,491 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pyhash_ext
import collections
class SparseHashMap(collections.MutableMapping):
def __init__(self, key_type='L', value_type='O'):
self.store = pyhash_ext.IIMap(key_type, value_type)
def __getitem__(self, key):
return self.store[key]
def __setitem__(self, key, value):
self.st... | UTF-8 | Python | false | false | 509 | py | 4 | pyhash.py | 4 | 0.603143 | 0.603143 | 0 | 21 | 23.285714 | 59 |
etinaude/130A1 | 3,599,182,633,938 | f53b0cf567143ab83632ca88fa7e8ccbc6e44390 | 396c9ecbd8abef9dfb0b70554bd82c93bee4d8d1 | /A1GUI.py | c3d3d22db3e0a2156b5ecf377753e85db377d9d2 | [
"MIT"
] | permissive | https://github.com/etinaude/130A1 | b89d7a11af276989a73ea793ff1d8edda47942a0 | 5026ef80f2a23aaf53dfbb0e5d744dfd613aa708 | refs/heads/master | 2022-02-17T11:19:21.085220 | 2019-09-11T11:22:50 | 2019-09-11T11:22:50 | 207,794,442 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from tkinter import ttk
from A1 import A1
from Histogram import Histogram
from Table import Table
import sys
data2=[]
def redirector(inputStr):
textbox.insert(tk.END, inputStr)
def load_file():
data = A1(entry_file.get())
print(data.get_statistics())
def click():
pass #modif... | UTF-8 | Python | false | false | 1,819 | py | 7 | A1GUI.py | 7 | 0.664651 | 0.627817 | 0 | 77 | 21.597403 | 80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.