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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Grimoors/PythonBasics | 6,133,213,312,870 | 604744aa227519b9c051e8299da8462fc9f3b68f | 057b8397e243697b333796bf21eae53bb9eeaec1 | /Python_Tute1/F5-IterationsInLists.py | 1b779c894791d385d1f5dd268893291250833fb1 | [] | no_license | https://github.com/Grimoors/PythonBasics | cfd92759452e3fb831c33acbdff5c59aa83ba441 | 6e99a8dd34073e49bc05cd32dd0a9bcacf4bcc7e | refs/heads/main | 2023-06-24T21:30:23.112947 | 2021-07-18T13:58:42 | 2021-07-18T13:58:42 | 368,498,721 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import matplotlib
import string
import dataclasses
import importlib
import random
import copy
if __name__ == "__main__":
print("Running as Standalone, Taking Input")
print("here any initialization / input as a standalone program is to be inputted")
a=[]
a.append(1)
a.append("hello")
... | UTF-8 | Python | false | false | 1,237 | py | 19 | F5-IterationsInLists.py | 19 | 0.531124 | 0.503638 | 0 | 64 | 18.3125 | 137 |
jied314/IQs | 7,361,573,946,553 | b5a441fcbf2273d53575a13c1836b2ff461323aa | 9752ab9bfcb2f5d058086bbc6ad8c5c435b24b91 | /tags/linked_list/reverse_nodes_in_k_groups.py | 00575a718a51de96e9270ee6604bc6f3936a4692 | [] | no_license | https://github.com/jied314/IQs | e9b99068f2585f5eca2144395588302108c267bb | e41f4ac9e99b9272ed4718680f4d12fd7443db03 | refs/heads/master | 2021-01-10T09:07:46.805287 | 2016-03-14T05:56:27 | 2016-03-14T05:56:27 | 52,819,461 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
import lib
class Solution(object):
def reverseKGroup(self, head, k):
"""
:type head: ListNode
:type k: int
:rtype: ListNode
"""
if ... | UTF-8 | Python | false | false | 2,176 | py | 280 | reverse_nodes_in_k_groups.py | 278 | 0.472886 | 0.463235 | 0 | 82 | 25.54878 | 68 |
anchorhong/leetcode_python | 8,486,855,424,896 | 3313c2b0f42a78d98822dc49c2914ae2f238fb31 | a5113f37e3d5c73b7abb61202c008fe62a3a38e3 | /subjects/0973_kClosest/Solution.py | 14abaf3be76019d412351f31003f9398973844b4 | [] | no_license | https://github.com/anchorhong/leetcode_python | c67e095a389734560984e2b658412ec4981e59db | 40cdc510e048164aee82a5a64a3d8e187cb75920 | refs/heads/master | 2023-01-21T09:10:55.473407 | 2020-12-01T15:25:21 | 2020-12-01T15:25:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import List
import heapq
from collections import defaultdict
class Solution:
def kClosest(self, points: List[List[int]], K: int) -> List[List[int]]:
if K == 0:
return []
point_dict = defaultdict(list)
max_heap = list()
for point in points:
distan... | UTF-8 | Python | false | false | 1,179 | py | 94 | Solution.py | 94 | 0.506361 | 0.471586 | 0 | 36 | 31.75 | 102 |
python-kol/libkol | 16,320,875,727,228 | 913ffcf36849c3f0190ad3371c43e2602cb7f65a | d47004d217a3834140d9d11727b26b6381dbd890 | /libkol/Stat.py | a3812484b14be8e0f4b658647b0275f65afc78f0 | [
"BSD-3-Clause"
] | permissive | https://github.com/python-kol/libkol | 9f3e1accfa25e775a53aec776e96c2eee6c39c86 | bdc9aa8dbae64ead07e7dbc36f9d6ba802f65ddc | refs/heads/master | 2023-01-21T12:38:51.704144 | 2022-01-24T09:27:42 | 2022-01-24T09:27:42 | 172,836,521 | 8 | 10 | NOASSERTION | false | 2022-12-27T15:36:39 | 2019-02-27T03:31:32 | 2022-04-26T19:54:02 | 2022-12-27T15:36:38 | 18,371 | 3 | 7 | 5 | HTML | false | false | from enum import Enum
from typing import List
from .CharacterClass import CharacterClass
class Stat(Enum):
Muscle = "muscle"
Mysticality = "mysticality"
Moxie = "moxie"
def __contains__(self, character_class: CharacterClass) -> bool:
return character_class.stat == self
@property
def... | UTF-8 | Python | false | false | 823 | py | 261 | Stat.py | 211 | 0.562576 | 0.562576 | 0 | 30 | 26.433333 | 85 |
JominicDones/MTMW12Assn3 | 5,394,478,956,779 | 574901a91bffe4630a7d63cf4b858e8c07cf96b3 | b2c65ffa6eaf0bedf276967e4c73b63d82ed4d48 | /IntroToProgramming/Assignment3/ass3.py | 82652c0c0242ce007b143b79b10971247d1baa20 | [] | no_license | https://github.com/JominicDones/MTMW12Assn3 | a76dfbccdb07996a1440a97a7ab9512bf77f370f | aa6c0f55c3474e37341c75bebd42649adc609856 | refs/heads/master | 2021-05-08T09:14:26.125195 | 2017-10-16T09:26:52 | 2017-10-16T09:26:52 | 107,103,212 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
File that runs code necessary for MTMW12 Assignment 3. I wasn't able to get
nearly as much done as I'd hoped as I'm still getting to grips with Python and
Git and I also missed the class and wasn't able to catch up.
Hopefully the code is styled correctly and commented okay at lea... | UTF-8 | Python | false | false | 7,703 | py | 1 | ass3.py | 1 | 0.588083 | 0.57549 | 0 | 248 | 29.060484 | 82 |
Syncano/syncano-python | 8,796,093,040,712 | 66c3544d7a5a9df12ec702c80c74c91874e89eea | 4a83828a1e230582e6d41321da8984674c34cea7 | /tests/test_incentives.py | 6b2b3f41c9b2c421bbf393ab157328a0d611a7d6 | [] | no_license | https://github.com/Syncano/syncano-python | af0b20cd8d79cf6139d989dab2b780d73218d4c3 | 3a1cff87a565a075ca6f54bfe55089bb152fdbf3 | refs/heads/develop | 2021-03-24T10:27:20.994762 | 2016-11-17T14:45:27 | 2016-11-17T14:45:27 | 16,406,574 | 4 | 4 | null | false | 2016-11-17T14:53:11 | 2014-01-31T11:46:19 | 2016-10-28T14:26:45 | 2016-11-17T14:53:11 | 12,305 | 5 | 4 | 5 | Python | null | null | # -*- coding: utf-8 -*-
import json
import unittest
from datetime import datetime
from syncano.exceptions import SyncanoValidationError
from syncano.models import ResponseTemplate, Script, ScriptEndpoint, ScriptEndpointTrace, ScriptTrace
try:
from unittest import mock
except ImportError:
import mock
class S... | UTF-8 | Python | false | false | 4,125 | py | 76 | test_incentives.py | 61 | 0.646545 | 0.628848 | 0 | 106 | 37.915094 | 115 |
kazishimulbillah/SeleniumPython | 17,523,466,580,856 | c54841fcb840d1a33b584b5fb99e12b1628e1c86 | 98561bb45e3c6f84ed55113dd1a9082b3ddf90f4 | /SampleProjects/POMDemo/Pages/LoginPage.py | 2047a63b09bf44b0ea4f437b564f69f9a21bed54 | [] | no_license | https://github.com/kazishimulbillah/SeleniumPython | 0440c12904c9571a83677a168b7b43c91c5e878b | 0e80fd153530529d63808ffa6d8c9cc88351c71e | refs/heads/master | 2023-03-12T12:45:52.044376 | 2021-03-02T05:19:05 | 2021-03-02T05:19:05 | 343,652,913 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
from selenium.webdriver.common.by import By
from SampleProjects.POMDemo.Locators.locators import Locators
class LoginPages:
def __init__(self, driver):
self.driver = driver
self.login_Button = '//*[@id="js--main-header"]/div/div/div[3]/div/div[2]/a'
self.user_name = "j_usernam... | UTF-8 | Python | false | false | 1,047 | py | 4 | LoginPage.py | 4 | 0.69341 | 0.687679 | 0 | 35 | 28.914286 | 84 |
cherylzh0110/AgeEstimationApp | 9,921,374,468,883 | 59f3df3282274b74e5d7cc2ee15695e426a78896 | 40e94229e05aeea9854bd17713707c22d704d9b8 | /utkcamera.py | 80f2ca1486a622b9c245e82019a4111a962e3276 | [] | no_license | https://github.com/cherylzh0110/AgeEstimationApp | 6a273004b0e6480e5bbcfe9cea5734c521c9a13e | c108f03b5acfba04c017d019780b2f48eef8af47 | refs/heads/master | 2022-12-22T07:41:44.649150 | 2020-09-15T11:37:53 | 2020-09-15T11:37:53 | 181,218,238 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
from keras.models import Sequential, load_model
import numpy as np
facec = cv2.CascadeClassifier('./haarcascade_frontalface_default.xml')
def get_model():
global model
model = load_model('./models/utk.h5')
model._make_predict_function()
font = cv2.FONT_HERSHEY_SIMPLEX
print(" * Loadi... | UTF-8 | Python | false | false | 2,073 | py | 24 | utkcamera.py | 17 | 0.558128 | 0.449108 | 0 | 45 | 44.066667 | 144 |
jplobianco/bolao | 11,656,541,280,630 | cc1499f3c42755f592dec82e67126756b2b364ae | 3b07106c1148b23cba4889f754da2fc0bb33b157 | /principal/migrations/0004_auto_20190625_1853.py | 0319710091b257f31a865fbc5df11bbc82ae0165 | [] | no_license | https://github.com/jplobianco/bolao | 2fe130e1a50104f4d921bda0495df522c3d73608 | bc24aab6cb57ddabe88d26562962507854ad94e1 | refs/heads/master | 2020-03-21T22:56:54.142421 | 2019-10-23T16:19:31 | 2019-10-23T16:19:31 | 139,157,063 | 0 | 0 | null | false | 2020-07-22T13:48:34 | 2018-06-29T14:09:31 | 2020-07-22T13:46:46 | 2020-07-22T13:37:31 | 378 | 0 | 0 | 3 | Python | false | false | # Generated by Django 2.2.2 on 2019-06-25 18:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('principal', '0003_aposta_pontuacao_ganha'),
]
operations = [
migrations.AlterModelOptions(
name='bolao',
options={'ordering'... | UTF-8 | Python | false | false | 410 | py | 24 | 0004_auto_20190625_1853.py | 14 | 0.598039 | 0.551471 | 0 | 17 | 23 | 101 |
mrugesh-bannatwale/ninja_liota | 8,589,971,517 | df5c6de7312cb5430b658e8aae18315c53ab3221 | b7039d789868458f72f230b9110f74a992411714 | /liota/build/lib.linux-x86_64-2.7/liota/lib/transports/amqp.py | c56330038b322929ba3eea4afe6fe8f1df251771 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | https://github.com/mrugesh-bannatwale/ninja_liota | e8304b07889f7426d94edb776d2a5064e109bfc1 | 3751f67960d1865995160281e0494ad41e22da0f | refs/heads/master | 2020-12-02T19:49:59.132124 | 2017-07-21T06:34:16 | 2017-07-21T06:34:16 | 96,396,099 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------#
# Copyright © 2015-2016 VMware, Inc. All Rights Reserved. #
# #
# Licensed under the BSD 2-Clause License (the “License... | UTF-8 | Python | false | false | 31,875 | py | 19 | amqp.py | 14 | 0.595 | 0.593147 | 0 | 684 | 45.55117 | 120 |
weiju/c64-stuff | 2,757,369,006,517 | 79dd4c9d68dec72372dbfaa252a8030a385a7cd4 | cd0cafdf281e808abadfefa1fc3306bf90cbce3f | /d64.py | fa2c60bef733dd7be96981489bc02a8ea713b202 | [] | no_license | https://github.com/weiju/c64-stuff | 554b5548d59cf75436b4326f939f98501d2d6824 | 419e4648011eb3c687260dbd798a730baacb3ae9 | refs/heads/master | 2016-09-16T11:46:55.822562 | 2015-07-10T04:45:16 | 2015-07-10T04:45:16 | 35,858,088 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import argparse
BLOCK_SIZE = 256
FILETYPES = ['DEL', 'SEQ', 'PRG', 'USR', 'REL']
def num_sectors(track):
"""For a 40 track disk, return the number of sectors in the specified track"""
if track > 0 and track <= 17:
return 21
elif track >= 18 and track <= 24:
return 1... | UTF-8 | Python | false | false | 3,163 | py | 8 | d64.py | 2 | 0.554221 | 0.523237 | 0 | 96 | 31.9375 | 88 |
nextstrain/cli | 3,023,657,004,162 | 573083794d785ce759adeb05d045e1a4427fb120 | 8ea3d5b0ad92fd3ed8ed0678f317cf3dc2a914da | /nextstrain/cli/command/login.py | 25f58e45340045fa5ecedc71f480c378a5de653f | [
"MIT",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | https://github.com/nextstrain/cli | 0ed57c4cd0fe75eac4f68b7830f8b661b713858b | 3c93e87c2ac6bdd1b6a913070f709067b29a6cc1 | refs/heads/master | 2023-09-02T13:46:08.170498 | 2023-08-31T17:07:44 | 2023-08-31T17:07:44 | 139,047,738 | 26 | 22 | MIT | false | 2023-09-14T20:35:23 | 2018-06-28T17:13:28 | 2023-05-28T14:15:05 | 2023-09-14T20:35:22 | 1,261 | 25 | 20 | 61 | Python | false | false | """
Log into Nextstrain.org and save credentials for later use.
The first time you log in, you'll be prompted for your Nextstrain.org username
and password. After that, locally-saved authentication tokens will be used and
automatically renewed as needed when you run other `nextstrain` commands
requiring log in. You ... | UTF-8 | Python | false | false | 4,147 | py | 132 | login.py | 75 | 0.637636 | 0.637636 | 0 | 122 | 32.97541 | 110 |
byungjur96/Algorithm | 8,615,704,406,988 | b70223d7ae6a31054602755da231ec6bb4aedb38 | e335514159ccc0792abda335de2c338946ec4e1e | /11728.py | 171adeb94b9df107e0ab5a88ea1cd6cc5c192eac | [] | no_license | https://github.com/byungjur96/Algorithm | 34455c18e2c5f9fe07de4676af0c1b674ebe4e14 | 17440744d6be1d1fb2879865c15b170883098f53 | refs/heads/master | 2022-07-17T04:16:53.875357 | 2022-07-05T09:23:27 | 2022-07-05T09:23:27 | 167,967,581 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | n, m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a.sort()
b.sort()
result = []
a_idx = 0
b_idx = 0
while a_idx < n or b_idx < m:
if a_idx == n:
result.append(b[b_idx])
b_idx += 1
elif b_idx == m:
result.append(a[a_idx])
a... | UTF-8 | Python | false | false | 533 | py | 220 | 11728.py | 219 | 0.487805 | 0.476548 | 0 | 26 | 19.538462 | 39 |
yuhao0925/toutiao | 17,961,553,267,940 | 6795c3e112df33d7c5a1acc378c96d3632bba35e | 3b6e4fb38214bdd8f5cccede3fc993d897ff8455 | /common/cache/constants.py | 72ff8a9312b8ab850dae4939a4e437de116d1433 | [] | no_license | https://github.com/yuhao0925/toutiao | 09c18c71ecada2f131323d79b77ea05fd1e25061 | 695af80792ca8f9daa2e35e57fd57ef24f0e30e4 | refs/heads/master | 2022-12-11T08:54:57.225568 | 2019-12-18T12:59:18 | 2019-12-18T12:59:18 | 228,839,894 | 0 | 0 | null | false | 2022-09-23T22:32:39 | 2019-12-18T12:54:07 | 2019-12-18T12:59:42 | 2022-09-23T22:32:38 | 1,927 | 0 | 0 | 10 | Python | false | false | import random
class BaseCacheTTL():
# 缓存有效期,单位是秒,要防止雪崩
TTL = 60 * 60 * 2 #基础过期时间
MAX_DELTA = 60 * 30 #随机时间上限
# @classmethod也不需要self参数,但第一个参数需要是表示自身类的cls参数。
@classmethod
def get_TTL(cls):
# 返回有效期时间范围内的随机值
return cls.TTL + random.randrange(0,cls.MAX_DELTA)
# 为了防止雪崩,在不同的数据设置... | UTF-8 | Python | true | false | 852 | py | 30 | constants.py | 29 | 0.672794 | 0.637868 | 0 | 24 | 21.708333 | 58 |
MalcolmChen97/CS113-Networking-Assignments | 13,821,204,779,779 | 04d2c676f838b4d33af44d01f88ee0e914f89d98 | fa709028dd41abd61836a9ba71fc1424f1d793e6 | /hw2/code/smtp_client.py | 0d2598162e050ec7f4845c265c90c121ee606a16 | [] | no_license | https://github.com/MalcolmChen97/CS113-Networking-Assignments | 2ebbc5e6229aff080d8d42a915cbb2fa7a73f79a | bd930e07663d7ec6541c34a04604adefd78d8ddf | refs/heads/master | 2021-07-22T10:50:50.261150 | 2017-10-31T05:44:26 | 2017-10-31T05:44:26 | 108,331,121 | 0 | 1 | null | false | 2017-10-31T07:13:12 | 2017-10-25T22:04:37 | 2017-10-26T03:18:01 | 2017-10-31T05:44:40 | 5,968 | 0 | 1 | 1 | Python | false | null | from socket import *
msg= "\r\n I love computer networks!"
endmsg = "\r\n.\r\n"
#connection
mailserver = "localhost"
clientsocket = socket(AF_INET,SOCK_STREAM)
clientsocket.connect((mailserver,25))
recv = clientsocket.recv(1024).decode()
print(recv)
if recv[:3] != '220':
print('220 reply not received from s... | UTF-8 | Python | false | false | 1,641 | py | 5 | smtp_client.py | 4 | 0.687995 | 0.652041 | 0 | 111 | 13.783784 | 69 |
justicarxxvi8/PycharmProjects | 19,078,244,768,569 | ad59f0d1497d6c30e097edce5cd3e32ba47406d4 | 9dba9fc1c6258877937a3473e36621f934c4e814 | /sandbox/palindrome.py | 5868e55af7b165d738f01dcbac865c4b374a7e4b | [] | no_license | https://github.com/justicarxxvi8/PycharmProjects | bb9c31ded99c10e58e229591ae6992fa1c717a97 | f8d6a55e8d84307e37bc34ca33131f9ab87879a2 | refs/heads/master | 2021-08-20T07:17:29.207085 | 2017-11-28T14:08:07 | 2017-11-28T14:08:07 | 112,343,418 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def checkPalindrome(inputString):
reversed_string = inputString[::-1]
if reversed_string == inputString:
return True
elif reversed_string != inputString:
return False
checkPalindrome("Fad")
| UTF-8 | Python | false | false | 225 | py | 25 | palindrome.py | 23 | 0.666667 | 0.662222 | 0 | 10 | 21.5 | 40 |
Star-Coder-7/Functions | 8,280,696,949,298 | 95355e2e01b77fd1debfddbdd797ac5a4640a5a2 | 031fc4d181aefb3d086e3b2ce8577c5dd8d43506 | /parameter_types.py | b43f032a291bee08ebdbad69b6300cbfd7249f22 | [] | no_license | https://github.com/Star-Coder-7/Functions | 49d945985cdbf4f8faa69c6ba4a16c4fba6b896e | f7ee3c7971d16fe3d8091623cbcd46b9f6bd635b | refs/heads/main | 2023-03-11T02:07:46.724803 | 2021-02-28T21:40:47 | 2021-02-28T21:40:47 | 343,221,152 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def func(p1, p2, *args, k, **kwargs):
print(f"positional-or-keyword:....{p1}, {p2}")
print(f"var_positional (*args):...{args}")
print(f"keyword:..................{k}")
print(f"var_keyword:...............{kwargs}")
func(1, 2, 3, 4, 5, 9, k=6, key1=7, key2=8)
| UTF-8 | Python | false | false | 276 | py | 13 | parameter_types.py | 12 | 0.492754 | 0.438406 | 0 | 8 | 33.5 | 50 |
Roberto09/Curso-MAEs-Python | 10,995,116,309,763 | ccd277f20b2445cac0b7ea82f2473936cc55c4e7 | 3209d15715b3591649c9bd671d4b4bf77a8b251a | /Sesion1Clase.py | 96cc8d8ca073e14e0f525971d9bf56b260c40138 | [] | no_license | https://github.com/Roberto09/Curso-MAEs-Python | d0adbcdbf1d1097aa686b48acfe618ea76ffc4f9 | 0ababb3a1c62d5485ac3fa677f50e4471b0e3374 | refs/heads/master | 2021-05-20T11:07:39.558290 | 2020-05-21T04:29:24 | 2020-05-21T04:29:24 | 252,266,780 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
def formula_cuadratica(x, y, z):
p = (-y + math.sqrt(pow(y, 2) - 4 * x * z))/(2*x)
r = (-y - math.sqrt(pow(y, 2) - 4 * x * z))/(2*x)
return p, r
def main():
x = 10.1234
print(round(x, 2))
"""
# Esto es una constante
NOMBRE_ENTRENADOR = input("Dime tu nombre ... | UTF-8 | Python | false | false | 926 | py | 8 | Sesion1Clase.py | 6 | 0.501622 | 0.477838 | 0 | 38 | 23.236842 | 90 |
naveens239/cpm_django | 9,826,885,214,283 | 1f9d6b1a61ffcc748fa5392514d304d645d0a042 | ae9cf120a2d5e7373cdef45d33f22609e0d0ab69 | /src/cpm/migrations/0007_auto_20160307_1407.py | 51dca8b26e2ec9bda7c2b79f16f68943370054bb | [] | no_license | https://github.com/naveens239/cpm_django | 1c285e7ca2ee2426b17c9a518f13e08a53c4f6c0 | 3cb7f42945b02af929e9f249935a23b1f9ee362d | refs/heads/master | 2021-01-20T19:50:01.301086 | 2017-10-13T17:59:24 | 2017-10-13T17:59:24 | 52,895,664 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-07 08:37
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cpm', '0006_auto_20160307_0328'),
]
operations = [
... | UTF-8 | Python | false | false | 585 | py | 72 | 0007_auto_20160307_1407.py | 42 | 0.654701 | 0.594872 | 0 | 21 | 26.857143 | 142 |
CatLassie/MLex1 | 5,927,054,874,463 | dac1b6d4e8552317ae93d2279eeb81d003a4fa98 | 09df5b16f9e9d9b759e76e605c4e7a8893a9a299 | /Proj1/TGaussianNB.py | df26c32efc7b8b58f51a146c0de8b67745a4b3c4 | [] | no_license | https://github.com/CatLassie/MLex1 | 463576ff2334ca89c0afb8b54db53342e01700aa | 7c8c3c7f6962a463051ab0c8d5654c63e34d8992 | refs/heads/master | 2021-09-05T21:03:32.217066 | 2017-11-27T22:41:07 | 2017-11-27T22:41:07 | 111,956,938 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Created on Nov 22, 2017
@author: martin
'''
from Test import Test
from sklearn.naive_bayes import GaussianNB
class TGaussianNB(Test):
'''
classdocs
'''
def train(self):
gnb= GaussianNB()
# train model
self.model= gnb.fit(self.train_x, self.train_y)
... | UTF-8 | Python | false | false | 400 | py | 57 | TGaussianNB.py | 11 | 0.58 | 0.565 | 0 | 23 | 16.217391 | 55 |
ijufumi/demo-python | 12,738,873,001,105 | 45dbcc77100a8c7d8efa9daeb77b8ee48c7eb978 | 4bdd7b5eaf1f9119c50fd41265195b6fd0abc74e | /result_of_deep-learning-from-scratch/chap2/2_3_2.py | 3a140c6dd9e9dda7c9579cb9c595b020765a3b79 | [
"MIT"
] | permissive | https://github.com/ijufumi/demo-python | 6a0ebc8eb20b2836af9df2a972bb2f277614736f | 10e621e76ddd63f88b759d630975900c9ec792f6 | refs/heads/master | 2023-08-22T05:28:13.613312 | 2023-08-11T00:39:27 | 2023-08-11T00:39:27 | 207,212,735 | 0 | 0 | MIT | false | 2022-12-10T00:18:48 | 2019-09-09T03:03:37 | 2022-01-14T03:56:44 | 2022-12-10T00:18:13 | 40,227 | 0 | 0 | 0 | Python | false | false | import numpy as np
x = np.array([0, 1])
w = np.array([0.5, 0.5])
b = -0.7
ans = np.sum(x * w) + b
print(ans)
| UTF-8 | Python | false | false | 110 | py | 24 | 2_3_2.py | 14 | 0.536364 | 0.463636 | 0 | 7 | 14.714286 | 24 |
grey-felipe/Movie-app-prototype | 6,640,019,455,450 | 474580e0fafb9ea78bc81c890b15924340df4416 | f630d6ccef4dce767f83579cb746eb821cc96e1d | /app/users/views.py | 554a14df9b0da72006fc37e21e8fbf01d92e17db | [] | no_license | https://github.com/grey-felipe/Movie-app-prototype | 3ed995a6f248ebf5dbc71336181d1330824c60cc | 0b0ac3786d4f27ec9a64f23ad6d32dcbcd8733ee | refs/heads/develop | 2020-04-21T23:36:52.490340 | 2019-02-11T07:03:18 | 2019-02-11T07:03:54 | 169,951,761 | 0 | 0 | null | false | 2020-10-27T21:35:54 | 2019-02-10T06:59:15 | 2019-02-11T07:04:09 | 2020-10-27T21:35:53 | 19 | 0 | 0 | 2 | Python | false | false | from flask_restful import Resource, Api
from flask import jsonify, make_response, request, render_template
from werkzeug.security import generate_password_hash, check_password_hash
from flask_jwt_extended import (create_access_token, create_refresh_token, jwt_required,
fresh_jwt_required... | UTF-8 | Python | false | false | 10,643 | py | 16 | views.py | 11 | 0.607066 | 0.596354 | 0 | 271 | 38.273063 | 155 |
Zaiyong/csrosetta | 11,579,231,877,901 | c07a75a4a96481b097bb72a6f7e78c416d74ff8b | d90af0def0e29ebaebcf986399fcee65e1e2916c | /python/bmrb.py | a835c9248809b4e85eced805668e3256f8cbbaf3 | [] | no_license | https://github.com/Zaiyong/csrosetta | 2fdbbdd7da24ce971f7f2297a7cd14723cdd59d6 | 539c60664dba3972062002ff4e636c7f029927cb | refs/heads/master | 2020-12-25T15:18:39.274689 | 2020-02-25T09:15:35 | 2020-02-25T09:15:35 | 65,408,072 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ## -*- mode:python;tab-width:2;indent-tabs-mode:t;rm-trailing-spaces:t;python-indent:2 -*-
import subprocess
from os import dup2,path
from os.path import exists
from operator import add
from math import sqrt
from os.path import *
import argparse
import sys
import copy
import shutil
import string
### toolbox library
im... | UTF-8 | Python | false | false | 14,506 | py | 319 | bmrb.py | 273 | 0.638081 | 0.62967 | 0 | 456 | 30.811404 | 157 |
while777/while777 | 18,811,956,771,043 | ee4db386b9156d28956069020f2f4e7ffc1e6fc9 | 653bad0fe905e6ce885d458ce8e1275603ec8bc9 | /SolutionSearching/Bisect.py | de1c9b795861532e9d7d73b555d9915c40e46063 | [] | no_license | https://github.com/while777/while777 | 79ab386fb7c85979d0c278c29701bec6f9d611c9 | 1c3bff838e18c2a480c78ec287decf5dfd223733 | refs/heads/master | 2020-12-08T05:23:46.432057 | 2019-08-19T04:28:04 | 2019-08-19T04:28:04 | 66,278,815 | 0 | 0 | null | false | 2017-08-23T19:48:51 | 2016-08-22T14:17:20 | 2017-08-23T19:38:07 | 2017-08-23T19:48:43 | 0 | 0 | 0 | 2 | Python | null | null | #using matlab to test the results for function bsformula
from numpy import exp, sqrt, max, mean, std, log, cumsum, min
from numpy.random import randn, rand
import numpy as np
import BS
from BS import bsformula
def bisect(target, targetfunction, start=None, bounds=None, tols = 0.001, maxiter=1000):
BS.c = 0... | UTF-8 | Python | false | false | 6,707 | py | 94 | Bisect.py | 45 | 0.39347 | 0.371552 | 0 | 144 | 44.423611 | 119 |
liaochangjiang/wbot-cs | 4,449,586,169,424 | 5d0ec78d8dd9fd6d7dd30f75ac6af22ea7046fa7 | ac9ce0412a1390988850afc0ee968f608bdb7c42 | /src/apps/qrlogin/urls.py | 4bc93105b4eb364727c4050bc64de264a412374e | [] | no_license | https://github.com/liaochangjiang/wbot-cs | 91f04b17c748aa53b5b6f8b3689402d39fe0f0a9 | a767cb4dd11e76fa3f8aef6856d3685a048e657f | refs/heads/master | 2018-11-22T02:49:04.677764 | 2018-10-24T14:27:50 | 2018-10-24T14:27:50 | 133,817,479 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from . import views
app_name = 'qrlogin'
urlpatterns = [
path('gene',views.gene,name='gene'),
path('check',views.check,name='check')
] | UTF-8 | Python | false | false | 172 | py | 107 | urls.py | 85 | 0.680233 | 0.680233 | 0 | 8 | 20.625 | 42 |
bluebrid/base-knowledge | 17,025,250,404,418 | dc85489e61b93fd979d1849be629c041409bdd4e | 10c605f7b3463769a5f326d20f15df71aaf760cc | /python/testingTodoApp/features/lib/pages/login_page.py | 53ee12593de5a7f0cff7739d97f1e8592c017dad | [] | no_license | https://github.com/bluebrid/base-knowledge | b10a50b0c1372e761ed6a73926260869edf42fa3 | 65c763874fe1b0c6af377e85a9fb4b776caf2b13 | refs/heads/master | 2023-03-11T19:54:45.391536 | 2023-02-23T10:04:00 | 2023-02-23T10:04:00 | 160,443,639 | 4 | 0 | null | false | 2023-03-03T18:06:33 | 2018-12-05T01:45:37 | 2023-01-31T17:08:09 | 2023-03-03T18:06:33 | 108,385 | 2 | 0 | 141 | JavaScript | false | false | from .base_page_object import BasePage
from selenium.webdriver.common.by import By
#import time
class LoginPage(BasePage):
def __init__(self, context):
BasePage.__init__(self, context)
sheetName = "usersiInfo"
locator_dictionary = {
"loginTypeBtn": (By.ID, "com.wunderkinder.wunderlistandroid... | UTF-8 | Python | false | false | 987 | py | 1,914 | login_page.py | 1,232 | 0.660807 | 0.658738 | 0 | 25 | 37.72 | 98 |
miguelvitores/tfg-code | 1,013,612,328,525 | 8e74a478c0446c65166621268f0ccc8ae228a5b6 | 666a61619aca28e16076751bd2a02f88ee8fbedc | /test/test_testdata.py | 4d6414fe93d50eb8b6e372a1b33f9c0de12fbe39 | [] | no_license | https://github.com/miguelvitores/tfg-code | bf835bb22a6f5458cce441ede88fdad23511fb7b | 9d19b4c983f9f5cda5c320a669004c125a78852a | refs/heads/master | 2023-01-02T11:30:11.345798 | 2020-10-21T11:53:28 | 2020-10-21T11:53:28 | 267,086,205 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
from bin.algoritmos.busq.busquedainterpolacion import BusquedaInterpolacion
from bin.algoritmos.ord.ordenacionquicksort import OrdenacionQuicksort
from bin.testdata.rango import RangoVal, RangoTam
from bin.testdata.td_tipos import TestDataOrdenacionLOEquidistante
from bin.testdata.td_tipos import Test... | UTF-8 | Python | false | false | 3,022 | py | 41 | test_testdata.py | 38 | 0.692919 | 0.685308 | 0 | 85 | 34.552941 | 75 |
realsaeedhassani/mpkg-school-info | 7,490,422,984,361 | b93af8983d4c18ad24e18c6fe87244cb3a51ff08 | 18528998378eb3ecbef266eeac22e4f6dbb33de0 | /makemigrations_my_app.py | d999f8978f3015561545a229f1a4539db6365f06 | [
"MIT"
] | permissive | https://github.com/realsaeedhassani/mpkg-school-info | 2b8ded6ebbf4c07f92993b55773eb70f3ddbab34 | a7f8bd600c0d24043ea77353b69dfffa8d4087d9 | refs/heads/main | 2023-03-06T00:14:25.101258 | 2021-02-07T12:03:27 | 2021-02-07T12:03:27 | 336,756,335 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # school_info/makemigrations_my_app.py
from django.core.management import call_command
from boot_my_app import boot_my_app
boot_my_app()
# python manage.py makemigrations my_app
call_command("makemigrations", "my_app")
# python manage.py migrate
call_command("migrate")
| UTF-8 | Python | false | false | 274 | py | 16 | makemigrations_my_app.py | 8 | 0.770073 | 0.770073 | 0 | 12 | 21.833333 | 47 |
maddogsuklee/robot-project-hit | 12,120,397,717,786 | fd7bf0528ad1a54789374bb5324a1fa637d76183 | 8dc74b8194286670db191a16e319afb3c1481d5d | /GUI.py | d8f0f4ca274caf39fb2976c0a4280cd92f7fc762 | [] | no_license | https://github.com/maddogsuklee/robot-project-hit | 8b37f4d357744f760eccce2234355b909bc72152 | f3f367807613d95ae915efd4f37ae5ea7a19b004 | refs/heads/main | 2023-05-07T18:13:52.645962 | 2021-05-28T18:07:33 | 2021-05-28T18:07:33 | 371,782,390 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from Who_is_it import find_face_def
from new_face import add_face
class GuiClass:
def __init__(self, main):
# build GUI frame
self.main = main
self.frame = tk.Frame(self.main)
self.main.title("Control panel")
self.main.geometry("500x100")
# add... | UTF-8 | Python | false | false | 1,394 | py | 4 | GUI.py | 4 | 0.604735 | 0.60043 | 0 | 41 | 33 | 106 |
Ariel96cs/SimpleWebCrawler | 5,849,745,474,022 | e466030804fe8c5693856b1cef106e83165a1d13 | 7d483fb210c9874840ae662d9ec5433c9c383c6f | /sicrawler/spiders/myspider.py | 28da2d12e104f2ea4a234e5485eda8a1dff74665 | [] | no_license | https://github.com/Ariel96cs/SimpleWebCrawler | 16a2d29174f9272230166c095696bbcb7b252d51 | dba03bea9bad8b34e7fb16d9388ae3733aba9cce | refs/heads/master | 2022-11-25T07:02:25.905310 | 2020-07-22T17:13:55 | 2020-07-22T17:13:55 | 281,738,042 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import scrapy
from scrapy.http import Response
from ..items import SicrawlerItem
class MySpider(scrapy.Spider):
name = 'myspider'
allowed_domains = ['foundation.wikimedia.org',
'wikimediafoundation.org',
'www.mediawiki.org',
'meta.wikimedia.... | UTF-8 | Python | false | false | 2,893 | py | 8 | myspider.py | 4 | 0.453854 | 0.452817 | 0 | 71 | 39.746479 | 78 |
ChrisKai/qiubai | 6,700,149,030,706 | 05ba2acd2f5caebf53f5ac769ebeccaa413f43b9 | 6494c2cb0e3e8d1379ad85b0fa50b01232862a9c | /qiubai/qiubai/agents.py | 333370c854e01e51982b0689fb82ae90df197f8f | [] | no_license | https://github.com/ChrisKai/qiubai | ad3b95fa254dd17eb0c7b7ce93f343fe65c6b2f5 | 2e2ce4ff769b4ad57c526e9046013efd2916ee14 | refs/heads/master | 2021-05-01T01:57:56.352748 | 2017-02-22T14:01:21 | 2017-02-22T14:01:21 | 79,871,838 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding=utf-8
""" User-Agents """
agents = [
"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"
]
| UTF-8 | Python | false | false | 194 | py | 8 | agents.py | 7 | 0.680412 | 0.530928 | 0 | 5 | 37.8 | 143 |
imadmallahi/ImageMining | 11,965,778,916,327 | ac6258242380401a25298455cec4d4d308e3a513 | ce6adb91654ba2a9fb5dfe05e1677017b15005b9 | /ClassificationCar/classifier.py | afebe9ace59a61b8a925765e656a77bbf572967c | [] | no_license | https://github.com/imadmallahi/ImageMining | 600c61f141ccd8e9579205de0a83bcac5c222292 | 94f4a8e1efb1a991bd300bc4ce219c60c25d3892 | refs/heads/master | 2023-01-31T23:45:29.926505 | 2020-12-07T14:18:10 | 2020-12-07T14:18:10 | 319,310,230 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 13 19:40:53 2019
@author: pc
"""
import csv
from sklearn import svm
from getFeatures import ColorDescriptor
import cv2
import glob
import imageio
import matplotlib.pyplot as plt
X=[]
Y=[]
with open("DB2C/obj.csv") as f:
reader = csv.reader(f)
f... | UTF-8 | Python | false | false | 1,677 | py | 37 | classifier.py | 9 | 0.543232 | 0.519976 | 0 | 64 | 25.1875 | 70 |
Tulki/advent | 15,814,069,615,037 | 254798f2f25425a2a6402235ed0fb5266d761fe7 | 441a815c0f47f48b9cb90ef490fe6e9f606bc492 | /2020/day13.py | 710df8bf5da381219f04222e54c1ecf3959484ec | [] | no_license | https://github.com/Tulki/advent | dcd0532de38b37789fb8d588768ed1845ce85ea6 | d054c5f4d26a124aa5565628d18d0dcab50a7b7b | refs/heads/master | 2022-12-15T12:56:16.359510 | 2022-12-07T04:49:10 | 2022-12-07T04:49:10 | 75,567,678 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from shared import *
def waitTime(earliestTime, busID):
rem = earliestTime % busID
if rem > 0:
return busID - rem
return rem
# Part A
def solveA():
schedule = split_lines('day13.input')
earliestTime = (int)(schedule[0])
busIDs = [(int)(x) for x in schedule[1].split(',') if x != 'x']
... | UTF-8 | Python | false | false | 1,697 | py | 31 | day13.py | 31 | 0.610489 | 0.60165 | 0 | 65 | 25.107692 | 88 |
williamespander/NUMA01 | 13,572,096,677,476 | 5491edc48b697b52e531956fc7ccbe6283d79cf2 | ffa36d8483ace18676a24f54974767325c52012a | /FINALBirds.py | 7a43d1f1b733071d20903587cc13cb93bbbca4e4 | [] | no_license | https://github.com/williamespander/NUMA01 | c3fdd0f32efafe7f5129b45e1a43f09d318b69bd | a0a293a36c6cdc3584a0df9aca21b06dc400d34e | refs/heads/main | 2023-05-10T14:16:09.134741 | 2021-05-25T20:33:15 | 2021-05-25T20:33:15 | 366,098,637 | 0 | 1 | null | false | 2021-05-13T21:26:59 | 2021-05-10T15:56:57 | 2021-05-12T17:42:30 | 2021-05-13T21:26:58 | 7,708 | 0 | 1 | 0 | Python | false | false | # -*- coding: utf-8 -*-
"""
Created on Tue May 25 15:35:54 2021
@author: claud
"""
import datetime
import pytz
import numpy
import os
from matplotlib.pyplot import *
from astral import *
# ASTRAL CAN BE USED FOR SUNRISE/SUNSET TIMES.
# import astralaa
class birds:
'''
Class processes a data... | UTF-8 | Python | false | false | 13,643 | py | 7 | FINALBirds.py | 7 | 0.46653 | 0.435956 | 0 | 346 | 37.419075 | 93 |
biddyweb/icruits | 3,229,815,454,678 | 84d007cfab5e9cf8ffe5fd1d0209d3d3a106dba2 | 4adc69ccec096285af3882ad659cbd13eaa273f4 | /libs/djadmin/models.py | 32bbd2fa7928e68acdd8f0fd1fda156a1b765c5f | [] | no_license | https://github.com/biddyweb/icruits | 8d2b56e4e9c00641f5af0885732788e1ae29e658 | eb72e4e89f153dd9d076e84f9c522a582a5e167f | refs/heads/master | 2020-03-28T07:41:35.085813 | 2018-05-26T19:03:37 | 2018-05-26T19:03:37 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf import settings
from django.db import models
from django.utils.translation import ugettext as _
LIST_PAGE, FORM_PAGE, = 0, 1
AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
class Visitor(models.Model):
name = models.ForeignKey(AUTH_USER_MODEL, null=True)
city = ... | UTF-8 | Python | false | false | 5,734 | py | 93 | models.py | 62 | 0.61301 | 0.604988 | 0 | 108 | 51.092593 | 216 |
TaiSakuma/AlphaTwirl | 16,630,113,412,878 | e5d278de49681218a37f3859b8900002119007f7 | 84b04da7303dda43ae9bbf17110c7dfd8b3d77b8 | /tests/unit/summary/test_Count.py | a1e44d7c9146de82f7b9ceff7898b6be64ec7fcb | [
"BSD-3-Clause"
] | permissive | https://github.com/TaiSakuma/AlphaTwirl | 7ca4528853d7bc5a9450da507c7b43799b6d1823 | 94d08b19098ecbf1d90a022cd4ad9ba63edb3c06 | refs/heads/master | 2021-06-12T13:43:10.422029 | 2019-05-12T14:30:27 | 2019-05-12T14:30:27 | 30,841,569 | 1 | 5 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Tai Sakuma <tai.sakuma@gmail.com>
import numpy as np
import copy
import pytest
try:
import unittest.mock as mock
except ImportError:
import mock
from alphatwirl.summary import Count
##__________________________________________________________________||
@pytest.mark.parametrize('kwargs, expected_contents',... | UTF-8 | Python | false | false | 1,783 | py | 241 | test_Count.py | 188 | 0.536736 | 0.494111 | 0 | 59 | 29.220339 | 70 |
davis-berlind/STA-561-Final-Project | 1,546,188,237,915 | b2664ddb28942a7aff0ef279cef8307336905b76 | bda0f571c41fabced968080c2a31555182936677 | /monthly_data.py | 9ffac7ca92cf357d7195c6c10f3cc82b70d51c40 | [] | no_license | https://github.com/davis-berlind/STA-561-Final-Project | 8e351c5181dc3328a3c6741a2760d0f821578025 | 7536fa67ba2a5f871e6244ca6f38928c2e5a8686 | refs/heads/master | 2020-05-03T05:30:35.573062 | 2019-04-27T05:32:55 | 2019-04-27T05:32:55 | 178,449,109 | 1 | 2 | null | false | 2019-04-12T16:29:30 | 2019-03-29T17:28:33 | 2019-04-12T13:50:40 | 2019-04-12T16:29:30 | 1,569 | 1 | 2 | 0 | Jupyter Notebook | false | false | from fred import Fred
import numpy as np
import pandas as pd
from datetime import datetime
import time
from quarterize import quarterMean, growthRate
from dateutil.relativedelta import relativedelta
# FRED API key
# key = 'enter your key'
%run -i fred_api_key
## Getting Data from FRED ##
# loading keys
fseries = pd.... | UTF-8 | Python | false | false | 2,716 | py | 17 | monthly_data.py | 7 | 0.67268 | 0.637334 | 0 | 91 | 28.846154 | 96 |
hacksman/learn_python | 2,078,764,202,454 | 3de2858bbff86e23a322cf84d5c624d14fbfc5df | 787b1afb2a502ae1eeb9454f8ae0df3f5490e8d2 | /supervisor_foo/__init__.py | 74e2f4bfb402edc9cc21d67d2d6c2da0bb21bad6 | [] | no_license | https://github.com/hacksman/learn_python | 204f2495116845de40ad48af444ab27273c2d08d | 4090d8b389e9b812b0f2fa1e5328f822d4cc864b | refs/heads/master | 2020-03-30T06:18:11.473822 | 2018-12-06T06:45:54 | 2018-12-06T06:45:54 | 150,850,695 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
"""
The demo just run in python2
""" | UTF-8 | Python | false | false | 39 | py | 44 | __init__.py | 44 | 0.589744 | 0.564103 | 0 | 3 | 11.666667 | 29 |
AlgorithmicAmoeba/gpu_se | 1,786,706,427,304 | e86f92c93f0ce69724327f8e08c425dfce841380 | bf07c77c6618a146631b95064b1aa0862df9e8dc | /tests/inputter.py | 079557c5097ca4a707ab8c3ddefb9f90099c7b97 | [] | no_license | https://github.com/AlgorithmicAmoeba/gpu_se | 934bd9e36fd4831cd9b5edb160d6a3287ab4883c | 18ff5dd1a245388eb0b3ee28f0b562259aed22ba | refs/heads/master | 2022-12-31T16:36:54.076664 | 2020-10-27T11:46:03 | 2020-10-27T11:46:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
class Inputs:
"""Creates fake inputs for the glucose feed from past data
"""
def __call__(self, t):
t_batch = 30
Cn_in = 0.625 * 10 / 60 # (g/L) / (g/mol) = mol/L
if t < t_batch + 66:
CgFg = 0.151612826257827
elif t < t_batch + 101:
CgFg = 0.21241... | UTF-8 | Python | false | false | 1,099 | py | 53 | inputter.py | 41 | 0.410373 | 0.300273 | 0 | 38 | 27.868421 | 90 |
isemiguk/Python_Coursera | 2,662,879,767,590 | 768835344ba905d152f18d86619f0f47cadc596a | 71c47b4c8f35279c1f875c499ecae3c2eaf65432 | /Module_3/homework/productPrice.py | b974cdfff2b744af78f291e3391b8f62411a7da1 | [] | no_license | https://github.com/isemiguk/Python_Coursera | e53ead7ed966a0b11a9c43667caa00f9c4504328 | ce7d5904a91dfadd57d9a2bb4fb413d4c23c7a3c | refs/heads/master | 2022-11-06T13:56:50.926356 | 2020-07-01T19:12:22 | 2020-07-01T19:12:22 | 266,181,204 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
n = float(input())
m = (n - int(n)) * 100
print(int(n), round(m), sep=' ')
| UTF-8 | Python | false | false | 89 | py | 61 | productPrice.py | 61 | 0.539326 | 0.505618 | 0 | 6 | 13.833333 | 32 |
Visanpy-Tech/plotly-factory | 309,237,649,263 | 4ed3ceacd7579263860d139b8b9a4c838e6962f3 | 79887701ad864f98574d9a566dd40c0f12457a27 | /.ipynb_checkpoints/plotly_factory-checkpoint.py | cd1f16f9ea8ec817e306ebcdeb00e330b10dd625 | [] | no_license | https://github.com/Visanpy-Tech/plotly-factory | be0b117c318310836a06602cc677c734ddb27bd6 | 34a1ca55a43cca562c97b890f5d516f5feeb0019 | refs/heads/master | 2020-12-20T06:51:12.482662 | 2020-01-15T12:04:27 | 2020-01-15T12:04:27 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import plotly as pl
import numpy as np
import pandas as pd
import plotly.graph_objs as go
from collections import OrderedDict, defaultdict
from datetime import datetime
from plotly.subplots import make_subplots
import matplotlib.pyplot as plt
from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error... | UTF-8 | Python | false | false | 24,573 | py | 10 | plotly_factory-checkpoint.py | 5 | 0.509035 | 0.492186 | 0 | 736 | 32.383152 | 210 |
Josenyldo/Grafos | 807,453,877,068 | f82a4ed6797d00e9520af921f4980dc9cdc68b08 | a50925b1b8f243ce0dc76d94f3ece5b7724f3224 | /quarta_lista/grafo_adj_test.py | b4e5d9d163a72b897986221daf254ea87fd7a128 | [] | no_license | https://github.com/Josenyldo/Grafos | 8a6aae4e7a19dd5ba4c9e538f8300f951d669836 | bad789a95c9132dd9269a8cf64be346f37620e59 | refs/heads/master | 2020-04-29T13:43:55.121149 | 2019-06-20T00:19:14 | 2019-06-20T00:19:14 | 176,176,694 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
from quarta_lista.grafo_adj import *
class TestGrafo(unittest.TestCase):
def setUp(self):
# Grafo da Paraíba
self.g_p = Grafo([], [])
for i in ['A','B','C','D']:
self.g_p.adiciona_vertice(i)
for i in ['A-B','B-D','D-C','C-B','C-D']:
self.g_p... | UTF-8 | Python | false | false | 1,197 | py | 9 | grafo_adj_test.py | 7 | 0.438963 | 0.371237 | 0 | 36 | 32.25 | 167 |
houssemFat/MeeM-Dev | 12,008,728,582,537 | 697fa89448bc787dda903585a22bacd0f5e54ad9 | d71d9ff4787be6375a40618a7d9b21b578e89fe0 | /teacher/apps/collaboration/models.py | 7c088f8745df59b3e0bef4ecf4f06a2f61dbc323 | [
"MIT"
] | permissive | https://github.com/houssemFat/MeeM-Dev | 974f1fadc118d63d9afd24be5f5c534a7a839403 | f17310cce8e7747363f4911c28f60c1339a3431d | refs/heads/master | 2021-01-13T01:42:23.425197 | 2016-11-03T12:37:02 | 2016-11-03T12:37:02 | 24,350,362 | 1 | 1 | null | false | 2016-11-03T12:37:05 | 2014-09-23T00:17:52 | 2015-06-22T12:47:24 | 2016-11-03T12:37:03 | 11,063 | 2 | 1 | 0 | CSS | null | null | from django.db import models
from core.apps.accounts.models import User
from datetime import datetime
class Collaborator(models.Model):
source = models.ForeignKey(User, db_column="source_id", related_name="my_collaborators")
user = models.ForeignKey(User, db_column="user_id", related_name="my_collaborators_wi... | UTF-8 | Python | false | false | 870 | py | 570 | models.py | 385 | 0.737931 | 0.737931 | 0 | 20 | 42.55 | 100 |
selivanov-as/ml-text-highlights | 2,585,570,356,401 | a1f0bfe9162e9a244a09e4e2d352e6026d3b25a8 | 008f5d199fdcf8ae247783da6c14d07fecc4f51a | /server/samples_raw.py | 4676c04ccd49b349381aebc0574ba145bf8642c9 | [] | no_license | https://github.com/selivanov-as/ml-text-highlights | a07944bc8bb6cb63c6494d0a84f5151c81a0f71a | c1f47f60a8c873303bc3e0c9aa7624061dc4ef15 | refs/heads/master | 2022-12-10T03:48:19.501782 | 2019-05-20T13:48:22 | 2019-05-20T13:48:22 | 152,454,802 | 0 | 2 | null | false | 2022-12-08T02:28:51 | 2018-10-10T16:27:16 | 2019-05-20T13:49:40 | 2022-12-08T02:28:51 | 401,592 | 0 | 0 | 32 | Jupyter Notebook | false | false | samples_raw = [
{
"words": ["Здравствуйте", "Kirill", "Bulgakov", "Мы", "обратили", "внимание", "что", "Вы", "еще", "@не",
"@активировали",
"Вашу", "Предоплаченную", "@Дебетовую", "@Карту", "@Payoneer", "@MasterCard®", "и", "хотели", "бы",
"убедиться", "... | UTF-8 | Python | false | false | 5,202 | py | 103 | samples_raw.py | 13 | 0.424161 | 0.417181 | 0 | 55 | 66.727273 | 120 |
Braxton22/https---github.com-Braxton22-PizzeriaProject | 17,927,193,525,737 | b6d0eb6d72c455b1a192001760318cd87d6bbaf8 | ad9ffc134f7c7b224b0a3f37346163c3a23f4cba | /Pizzeria/urls.py | 17a3df1a18ad18cc8181015f2dae8780876d9f95 | [] | no_license | https://github.com/Braxton22/https---github.com-Braxton22-PizzeriaProject | 7e92a111a94593cca6e0798c102fd0e2da30b81d | e8cb47ac3cadd99b131cbb812d17105e05fd3f49 | refs/heads/master | 2023-04-21T18:57:34.803139 | 2021-05-01T15:15:04 | 2021-05-01T15:15:04 | 363,440,237 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #need the path function to map a url to a view
from django.urls import path
#dot tells python to import views.py module from the same directory as the current urls.py module
from . import views
#the variable app_name helps Django distinguish this urls.py file from the files of the same name in other apps within the p... | UTF-8 | Python | false | false | 879 | py | 11 | urls.py | 7 | 0.746303 | 0.746303 | 0 | 17 | 50.764706 | 170 |
mcnulty1/Python-Team-Project | 16,518,444,245,422 | 1cf3dbcdfe61b0b819ea2389c6389574793597c0 | 07d8ed7d833dae63cd15f058feaa05ca0b0c6316 | /Teamproject_grayscale.py | 624766a6ff6d0639b88e3f2cee56c60af06f1e26 | [] | no_license | https://github.com/mcnulty1/Python-Team-Project | e18146df999b610abcbd185b01bef2e15f7857ec | 8d54f3eea01278d89c7e2615f638e09d9a154a83 | refs/heads/main | 2022-12-30T03:10:47.845697 | 2020-10-06T16:47:24 | 2020-10-06T16:47:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Grayscale Function"""
| UTF-8 | Python | false | false | 26 | py | 3 | Teamproject_grayscale.py | 3 | 0.653846 | 0.653846 | 0 | 1 | 24 | 24 |
seekingup/LeetCode-Python | 15,848,429,327,348 | db7258c06057ea446dbaffa2404c6198fc8551bc | 49df576fb57b5b29b7aa2d300891c9395b96ecbf | /120_minimumTotal.py | 6493b9cdc37dc776c7c84e62844d0acd2124bd61 | [] | no_license | https://github.com/seekingup/LeetCode-Python | eed4590e883106bf769727f7b582f8dad89bb8dc | 6d3274be758c9d8a4d61aa51eb328a46d319eadf | refs/heads/master | 2020-03-21T10:59:22.495077 | 2019-06-07T09:52:10 | 2019-06-07T09:52:10 | 138,482,626 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def minimumTotal(self, triangle):
"""
:type triangle: List[List[int]]
:rtype: int
"""
n = len(triangle)
if n == 0:
return 0
dp = [0 for i in range(n)]
dp_last = [0 for i in range(n)]
dp_last[0] = t... | UTF-8 | Python | false | false | 975 | py | 266 | 120_minimumTotal.py | 264 | 0.408205 | 0.367179 | 0 | 35 | 25.914286 | 72 |
erllan/-course | 15,101,105,024,412 | 0d47503d5e1c7b5baaa72cce239c05750cbc641f | 72adbcd7bfb34a7af6da79c75fe75dc94289b550 | /rest/RestTutorial/migrations/0004_course_logo.py | a11537806962ef77af976a380c1e14a0ce95f42d | [] | no_license | https://github.com/erllan/-course | a42957da77ccdaa256fa39204096e8282f010575 | 6267857e28f0210634c16074720c84372817e195 | refs/heads/master | 2023-01-06T13:23:46.634221 | 2020-10-27T13:22:38 | 2020-10-27T13:22:38 | 305,687,614 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.0.2 on 2020-10-21 09:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('RestTutorial', '0003_auto_20201021_1501'),
]
operations = [
migrations.AddField(
model_name='course',
name='logo',
... | UTF-8 | Python | false | false | 430 | py | 10 | 0004_course_logo.py | 9 | 0.6 | 0.527907 | 0 | 18 | 22.888889 | 93 |
MysteriousSonOfGod/python-3 | 4,389,456,601,471 | c1a6b678d006f5267cb6920ec947edcedb3e1d88 | 44e8334e1b17fda7f60d9760f59868a9227e2ab0 | /ML/chap01/ch02_0.py | c920dbddea81be910b3a0defc94134e90432823f | [] | no_license | https://github.com/MysteriousSonOfGod/python-3 | 47c2aa69a84ba78876c74bc6f2e7e6f3093df1e2 | a303a5284c40f3cb96a8082a1f5ed80773b66336 | refs/heads/master | 2023-02-16T18:21:46.153388 | 2021-01-13T10:55:14 | 2021-01-13T10:55:14 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
import mglearn
import matplotlib as mpl
import matplotlib.pyplot as plt
import sys, os
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
import images.image
# 2. 두 개의 특성을 가진 forge 데이터셋은 인위적으로 만든 이진 분류 데이터셋
X, y = mglearn.datasets.make_forge()
print("X.... | UTF-8 | Python | false | false | 2,014 | py | 264 | ch02_0.py | 257 | 0.655212 | 0.634021 | 0 | 55 | 30.690909 | 104 |
markcornwell/pychess | 5,119,601,035,316 | e8ab313c1ade708c279c7df498343b77fc5660e2 | 7b221c6963f211c82030296f6a65aec1568574fc | /mediate.py | 2f4562decc5baca62123379f3336cd48b8458ab3 | [] | no_license | https://github.com/markcornwell/pychess | 3ffd660deedb918b3d407d4938cbb614f644c1b9 | b4f3a406ace2378c52a1057ebdd4a2bea7285c65 | refs/heads/master | 2021-03-27T11:10:15.395579 | 2015-10-31T20:08:35 | 2015-10-31T20:08:35 | 45,316,756 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python -Ou
# $Id: mediate.py 7 2010-01-13 12:16:47Z mark $
#
# These are fuctions to mediate between the chess routines and the outside
# inteface, e.g. command line or a gui
#
# Works with XBoard - see engine-intf.html
# Do not use WinBoard. Use XBoard under cygwin's xwin
# Need to patch security... | UTF-8 | Python | false | false | 8,098 | py | 31 | mediate.py | 24 | 0.568659 | 0.55915 | 0 | 273 | 27.663004 | 77 |
hkaraoguz/quart_swagger | 2,516,850,858,616 | adbe19614808c8d412ddb34ae23b9d8e0ea54aa8 | 9d489e4f0c3aa5c7b970e7a9e842535300fb1591 | /quart_swagger_blueprint.py | 058832ceebad60de200ec3478cdb28ac469536af | [] | no_license | https://github.com/hkaraoguz/quart_swagger | 3b480d79859fe096193150e7c7c5f9e1e8df4493 | b0a1f79ac225ff9f32c56b63d3e26e84d25c8d87 | refs/heads/master | 2020-06-04T07:36:09.424109 | 2019-06-14T11:02:41 | 2019-06-14T11:02:41 | 191,927,345 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import json
from quart import Blueprint, send_from_directory
swagger_ui = Blueprint("swagger_ui",
__name__,
static_folder='swaggerui')
@swagger_ui.route('/swaggerui/')
@swagger_ui.route('/swaggerui/<path:path>')
def show(path=None):
if path is None:
... | UTF-8 | Python | false | false | 553 | py | 4 | quart_swagger_blueprint.py | 2 | 0.529837 | 0.529837 | 0 | 21 | 25.333333 | 51 |
venom1270/essay-grading | 15,865,609,211,841 | a48f8c5b990766420634c498efac124371184f44 | b8c90f28396cf985a0fc53d3585de2e40741226b | /orangecontrib/essaygrading/modules/Content.py | 734a8a6dcf8dee16589f6b40e42cd34aa3904eaa | [] | no_license | https://github.com/venom1270/essay-grading | 0f7d4071cf76148b16aba5588e93eb9eb262fe3c | 891e70beba1a3eb750ec78b5ba696070cff8bf3a | refs/heads/master | 2021-07-12T08:31:22.798423 | 2020-09-21T14:15:15 | 2020-09-21T14:15:15 | 199,926,873 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import string
import language_check
import collections
import spacy
from orangecontrib.essaygrading.utils import globals
from orangecontrib.essaygrading.modules.BaseModule import BaseModule
from orangecontrib.essaygrading.utils.lemmatizer import lemmatizeTokens
from spellchecker import SpellChecker
f... | UTF-8 | Python | false | false | 20,303 | py | 87 | Content.py | 52 | 0.625129 | 0.623061 | 0 | 430 | 46.216279 | 145 |
CurtisSlone/SchoolProjects | 1,443,109,053,203 | a259d2c46ed76a558b77353ac66a418066b59f9d | 1ca933b302447f0bf37c7e2011c20b152d0d3c0c | /Python/Flask_Website/app.py | 0a8af24384efa33072b6457a8086f0c20452722d | [] | no_license | https://github.com/CurtisSlone/SchoolProjects | eb851bd717efadb28f88cafe76d750eea3826b72 | 04d8c641d967615549931a94609811003b40a608 | refs/heads/main | 2023-07-05T17:10:01.587093 | 2021-08-19T21:14:26 | 2021-08-19T21:14:26 | 398,051,539 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
File: app.py
Author: Curtis Slone
Date: 12 Feb 2021
Purpose: Basic Flask Website With Password Entry and Input Validation
"""
import random
from datetime import datetime
import json
from flask import Flask, render_template, request, jsonify, redirect, url_for
from passlib.hash import sha256_crypt
from flask_login i... | UTF-8 | Python | false | false | 7,156 | py | 45 | app.py | 31 | 0.603969 | 0.600755 | 0 | 201 | 34.58209 | 94 |
HyShai/youtube-dl | 18,545,668,830,196 | e405a9ec1cc0c4929d5f1cbfe2475364aee02700 | 0255d8532888ffee9c5d2fe9bb737a304efabff9 | /youtube_dl/extractor/everyonesmixtape.py | d872d828fcc8e10fea4770e1e56ab21cda027336 | [
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | https://github.com/HyShai/youtube-dl | d1b81ae13a5d2032a706ff1b291a606f033faf8c | 59fc89b704e7f9e8ad9c881c32e111ba5e79daba | refs/heads/ytdl-pythonista | 2020-02-24T13:11:50.972561 | 2016-05-27T17:02:51 | 2016-05-27T17:02:51 | 29,873,426 | 48 | 9 | Unlicense | true | 2017-12-11T08:04:20 | 2015-01-26T17:45:34 | 2017-10-08T12:44:37 | 2016-05-27T17:02:52 | 27,352 | 21 | 6 | 2 | Python | false | null | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class EveryonesMixtapeIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?everyonesmixtape\.com/#/mix/(?P<id>[0-9a-zA-Z]+)(?:/(?P<s... | UTF-8 | Python | false | false | 2,872 | py | 335 | everyonesmixtape.py | 333 | 0.560237 | 0.548398 | 0 | 79 | 35.35443 | 285 |
pseudoPixels/SciWorCS | 15,195,594,332,351 | 728eacc27557bc9514edfcf6efdf0e6d562d3d8b | 893f83189700fefeba216e6899d42097cc0bec70 | /bioinformatics/photoscan-pro/python/lib/python3.5/site-packages/pyside2uic/objcreator.py | deed44f78dadd42ca5225aed8d3364096f95a0ee | [
"GPL-3.0-only",
"Apache-2.0",
"MIT",
"Python-2.0"
] | permissive | https://github.com/pseudoPixels/SciWorCS | 79249198b3dd2a2653d4401d0f028f2180338371 | e1738c8b838c71b18598ceca29d7c487c76f876b | refs/heads/master | 2021-06-10T01:08:30.242094 | 2018-12-06T18:53:34 | 2018-12-06T18:53:34 | 140,774,351 | 0 | 1 | MIT | false | 2021-06-01T22:23:47 | 2018-07-12T23:33:53 | 2018-12-06T20:27:54 | 2021-06-01T22:23:45 | 593,244 | 0 | 1 | 4 | Python | false | false | # This file is part of the PySide project.
#
# Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
# Copyright (C) 2010 Riverbank Computing Limited.
# Copyright (C) 2009 Torsten Marek
#
# Contact: PySide team <pyside@openbossa.org>
#
# This program is free software; you can redistribute it and/or
# m... | UTF-8 | Python | false | false | 3,925 | py | 877 | objcreator.py | 426 | 0.627771 | 0.616561 | 0 | 112 | 34.044643 | 89 |
lan2720/my_blog | 18,992,345,409,030 | 1ab4fc74d1de0fcedefb22ddb2feed65f49a5f2c | a281e6960b313c019b98d5a7afb4f79cdee6ca16 | /about_me/migrations/0002_about_created_time.py | b7928ddb1c0908d3e8793c27cacfb2e69b876613 | [] | no_license | https://github.com/lan2720/my_blog | b3988f895ba197968153d9f5bc569e1d24b72239 | f5db989929e60bc974fe60a931a07804acc1e863 | refs/heads/master | 2020-12-24T14:55:50.452891 | 2015-04-28T03:20:50 | 2015-04-28T03:20:50 | 34,705,733 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('about_me', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='about',
... | UTF-8 | Python | false | false | 514 | py | 18 | 0002_about_created_time.py | 11 | 0.599222 | 0.554475 | 0 | 21 | 23.47619 | 117 |
Gary2018X/data_processing_primer | 4,174,708,253,098 | 604bb8f50ea1c4c8f9439ce6e13b0bb3dcba0703 | 8ecd1d9d1760acbf1f9b999363a5d150460e1c2a | /E11-8.py | 92bb97f303a575dee494ab240865f13de9898d1d | [] | no_license | https://github.com/Gary2018X/data_processing_primer | 0910c7c37af7ed03546520303c7d1660c62b0254 | b0d2cb16b4fcaed08f01accb4695232a33131d28 | refs/heads/master | 2023-01-14T17:39:48.856606 | 2020-11-17T03:21:32 | 2020-11-17T03:21:32 | 298,432,953 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# author:Gary
import pandas as pd
from sklearn.model_selection import train_test_split
# ********决策树:实现******#
mush_data = pd.read_csv("agaricus-lepiota.data", header=None)
mush_data.columns = ["classes", "cap_ shape", "cap_surface",
"cap_color", "odor", "bruises",
... | UTF-8 | Python | false | false | 1,758 | py | 101 | E11-8.py | 100 | 0.619624 | 0.612903 | 0 | 42 | 34.428571 | 101 |
knighton/sunyata_2017 | 7,842,610,333,373 | 6885f11918ffb2714fd2d68b3bbb85c51b66b82a | 525c6a69bcf924f0309b69f1d3aff341b06feb8e | /sunyata/backend/pytorch/layer/dot/__init__.py | cc8a470e8689de85a29459f4e6bc79ee2604bdb6 | [] | no_license | https://github.com/knighton/sunyata_2017 | ba3af4f17184d92f6277d428a81802ac12ef50a4 | 4e9d8e7d5666d02f9bb0aa9dfbd16b7a8e97c1c8 | refs/heads/master | 2021-09-06T13:19:06.341771 | 2018-02-07T00:28:07 | 2018-02-07T00:28:07 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from ....base.layer.dot import BaseDotAPI
from .conv import PyTorchConvAPI
from .dense import PyTorchDenseAPI
class PyTorchDotAPI(BaseDotAPI, PyTorchConvAPI, PyTorchDenseAPI):
def __init__(self):
BaseDotAPI.__init__(self)
PyTorchConvAPI.__init__(self)
PyTorchDenseAPI.__init__(self)
| UTF-8 | Python | false | false | 313 | py | 253 | __init__.py | 253 | 0.70607 | 0.70607 | 0 | 10 | 30.3 | 65 |
tobsval/coding-challenges | 12,816,182,429,573 | 62af71f1f5ddf222b5f205ea6ca22b20f79ba7a9 | 232a0afd9be460ffb55ca01742f42920923d9663 | /human_readable_time.py | 589a567d5e2be6e1a63b2421412848e132aba66f | [] | no_license | https://github.com/tobsval/coding-challenges | 8bc6ed921bf1e56ecaff83024dda3ac184824acb | 9add5a77e91b3a8f8583b3306c76e2b476010cf5 | refs/heads/master | 2020-04-18T14:52:19.510947 | 2019-03-30T11:07:01 | 2019-03-30T11:07:01 | 167,599,938 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #https://www.codewars.com/kata/human-readable-time/train/python
def make_readable(seconds : int):
mins, secs = divmod(seconds, 60)
hours, mins = divmod(mins, 60)
readable_time = '{:d}:{:02d}:{:02d}'.format(hours, mins, secs)
return readable_time
| UTF-8 | Python | false | false | 264 | py | 8 | human_readable_time.py | 8 | 0.666667 | 0.636364 | 0 | 7 | 36.571429 | 66 |
ashrystein/Python-Assignments-Implementation-of-Andrew-Ng-s-Machine-Learning-Course | 8,546,984,952,957 | 0763730a3534dc230302a47f58b1cae12c7204cc | 662bb1f69e37e6db2823122ccdbd8a0404e2f05f | /week8_ex7/pca.py | eef5f19891e86d30155c7d7ab85abe5c8f88a3aa | [] | no_license | https://github.com/ashrystein/Python-Assignments-Implementation-of-Andrew-Ng-s-Machine-Learning-Course | c9c9f731fafcc2195f687f299c95e1796196a1cd | b55de1a39e033df5e09c3a3f65ab5fb04ec714c1 | refs/heads/master | 2020-06-08T06:14:52.395961 | 2019-08-15T15:58:53 | 2019-08-15T15:58:53 | 193,175,025 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.image as imag
from scipy.io import loadmat
import scipy.optimize as opt
from sklearn.svm import SVC
from findClosestCentroids import findClosestCentroids
from computeCentroids import computeCentroids
from runkMeans import runkMean... | UTF-8 | Python | false | false | 570 | py | 68 | pca.py | 66 | 0.766667 | 0.764912 | 0 | 20 | 27.55 | 53 |
downneck/vyvyan | 5,463,198,439,208 | fed579765d90b7cb5af9c1c584a8357a6ff27852 | 31a77b7603fdf3c9ca3a8fb19f9d11ff2a930836 | /vyvyan/ldap/__init__.py | 9d75a3b98087d6eedb5b61725521c71ab70f6cf7 | [
"Apache-2.0"
] | permissive | https://github.com/downneck/vyvyan | b29905cc0f21acd9fb6a964e237205ca6bbb383b | e5375b9ed049d47cff69618359ce45159b53853b | refs/heads/master | 2021-01-10T12:20:00.338832 | 2016-09-01T18:36:01 | 2016-09-01T18:36:01 | 43,097,262 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright 2015 WebEffects Network, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | UTF-8 | Python | false | false | 39,353 | py | 11 | __init__.py | 10 | 0.519478 | 0.516581 | 0 | 1,002 | 38.272455 | 236 |
michaellengyel/python | 18,459,769,456,728 | 4b82861e55ec491bcf0dd7d8e41ed7767ac6be82 | 9fc537133c8e2afdde743f5428952f3796900eaa | /collections_m.py | 391de2d030aebadb9ed0b6ca30d0da1bbc13eafc | [] | no_license | https://github.com/michaellengyel/python | 2630d4fcafce66e909065b86a7b9a4da4659bd4f | d9aaf56847ca22600135c71e5456f0686d69bde7 | refs/heads/main | 2023-06-30T07:50:57.478748 | 2021-07-31T19:57:25 | 2021-07-31T19:57:25 | 382,138,432 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def main():
### LISTS ###
print("LISTS: Is a collection which is ordered and changeable. Allows duplicate members.")
m_list = []
m_list.append(1)
m_list.append("test")
m_list.append(3.42453)
m_list.append(None)
print(m_list)
print(m_list[2])
print(m_list.count(3.42453))
# ... | UTF-8 | Python | false | false | 1,504 | py | 10 | collections_m.py | 6 | 0.564495 | 0.519282 | 0 | 63 | 22.873016 | 97 |
jasper2326/HackerRank | 13,967,233,695,473 | eef08572d538996589c051cc8120a264e5121cb8 | 697627ec7a9e7ec1bceaad0c7a0da48e966630ac | /offer/_23.py | 47d3061969be70b329a12ff3f20bc9edc1a84ce9 | [] | no_license | https://github.com/jasper2326/HackerRank | ab0090cc9906472f29c91225c1cf8f1d3a19113c | 1e5bad3bc734085fc12ce1cbd126742f2be506da | refs/heads/master | 2021-05-06T09:49:22.907317 | 2018-03-27T08:51:59 | 2018-03-27T08:51:59 | 114,071,619 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def printFromTop2Bottom(self, root):
result = []
if not root:
return result
queue = []
queue.append(root)
while queue:
node = queue.pop(0)
if node.left:
queue.append(node.left)
if node.right:
... | UTF-8 | Python | false | false | 416 | py | 72 | _23.py | 72 | 0.490385 | 0.485577 | 0 | 17 | 23.529412 | 40 |
stoky123/Szkriptnyelvek | 5,660,766,916,618 | 1ab624dae26aea2051ac8209141f8825e7d07109 | 2ed43e0d98a9b5c9e2edc033ecf05b4c5a675c0e | /09/alcatraz.py | 6110a43eca17911567b6168178be63f8a07b9a96 | [] | no_license | https://github.com/stoky123/Szkriptnyelvek | 8ac625b9214410c4ef2fc59fdb1190b75d76869f | 42815760bd61ad1e3815d5ad46cf5c1744c1ae8d | refs/heads/master | 2023-05-02T08:29:09.888954 | 2021-12-26T18:26:30 | 2021-12-26T18:26:30 | 365,550,966 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
def main():
cells = [0] * 600
for i in range(len(cells)):
for j in range(i, len(cells), i+1):
cells[j] = (cells[j] + 1) % 2
print([i+1 for i in range(len(cells)) if cells[i] == 1])
##########################
if __name__ == "__mai... | UTF-8 | Python | false | false | 337 | py | 53 | alcatraz.py | 52 | 0.403561 | 0.373887 | 0 | 18 | 16.833333 | 60 |
DzhonPetrus/FastAPI-test | 2,972,117,385,053 | aef9e68ab0d72704740168f54dbadc1eeff77eac | 89cfd37739c44c76c1baadad0673d8895bd76db7 | /blog/controllers/blog.py | d01c4786a88679cee9dc16d30600dc6eaefba112 | [] | no_license | https://github.com/DzhonPetrus/FastAPI-test | 4f000f39abf9817d51d20a62426570109cca8140 | 1ffcd2724698bc693bc099a93a132b958f4ec116 | refs/heads/master | 2023-07-05T14:11:56.736243 | 2021-08-22T17:39:50 | 2021-08-22T17:39:50 | 397,666,118 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from fastapi import status, HTTPException
from sqlalchemy.orm import Session
from .. import schemas
from ..models import Blog
def get_all(db: Session):
blogs = db.query(Blog).all()
return blogs
def get_one(id, db: Session):
blog = db.query(Blog).filter(Blog.id == id).first()
if not blog:
... | UTF-8 | Python | false | false | 1,406 | py | 13 | blog.py | 9 | 0.620199 | 0.613798 | 0 | 53 | 25.471698 | 105 |
Asterion2014/python | 12,343,736,022,037 | fb4fd236196b8cf77fc5884d4c6d523095ad3289 | aafd3821212647c2d7883edf7361ff247380ec71 | /lesson-3.py | fcef5916be698149bf100f4e5c620e05b2d74ada | [] | no_license | https://github.com/Asterion2014/python | d93d4f1053acda60fef685cbf628aac9109cefb0 | a7d6c83d5d7e8ef62c22b44440970b7710ddf38a | refs/heads/home_work_3 | 2022-10-29T20:47:59.117776 | 2020-05-30T01:26:14 | 2020-05-30T01:26:14 | 265,492,775 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # author: Плуталов Максим Александрович
# 1. Реализовать функцию, принимающую два числа (позиционные аргументы) и выполняющую их деление.
# Числа запрашивать у пользователя, предусмотреть обработку ситуации деления на ноль.
def div(*args):
try:
arg1 = int(input("Введите числитель: "))
arg2 = int(i... | UTF-8 | Python | false | false | 3,333 | py | 3 | lesson-3.py | 3 | 0.679007 | 0.662456 | 0 | 64 | 34.875 | 114 |
nhoyer96/University | 9,397,388,457,924 | c8a720f5f029837dc0638cfd26ec3285f185e432 | 0eb485a4ffe37403f6ccb89f3bb0172986c7a6f9 | /Fortgeschrittenen_Praktikum/F70/Calculations/pipe_blind.py | e880c08e407cc94a8b3efb42b3222a63282bf156 | [] | no_license | https://github.com/nhoyer96/University | c846d1ad1b594ce43d70765542c797e653b4f6d8 | 27fc101b1b67ab0fdb921e32d2a9492dfd702efb | refs/heads/master | 2018-11-29T11:05:49.621901 | 2018-11-19T17:56:42 | 2018-11-19T17:56:42 | 144,573,958 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from math import sqrt, pi
p_S = [1.0*10**-5, 3.3*10**-5, 1.0*10**-4, 3.2*10**-4, 1.0*10**-3, 3.2*10**-3, 1.0*10**-2, 3.3*10**-2, 0.12, 0.37, 1.1] #Measurement of pumping speed S
p_S_error = [10**-6, 10**-6, 10**-5, 10**-5, 10**-4, 10**-4, 10**-3, 10**-3, 10**-2, 10**-... | UTF-8 | Python | false | false | 8,204 | py | 102 | pipe_blind.py | 15 | 0.577157 | 0.417114 | 0 | 177 | 45.344633 | 249 |
bobur554396/PPII2021Spring | 3,968,549,821,851 | 13385922c4c106c426b127f1baa0245240c82781 | 2497427584b543bb3263ca82a1b7e4506f9b6ec9 | /w4/2.py | 96a9d11e3f49c217d80f1be2e05c8240b3d1b032 | [] | no_license | https://github.com/bobur554396/PPII2021Spring | 10deb3c654eeb9966f7106887181387a7d72783d | 07f4e89b74e59da520162391359bcaaf4f457c23 | refs/heads/main | 2023-04-07T20:53:56.412834 | 2021-04-17T09:56:38 | 2021-04-17T09:56:38 | 333,086,949 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # RegEx - Regular Expression
import re
txt = "The rain in Spain"
x = re.find
all("in", txt)
print(x)
| UTF-8 | Python | false | false | 105 | py | 63 | 2.py | 60 | 0.647619 | 0.647619 | 0 | 9 | 10.555556 | 28 |
cafischer/analyze_in_vivo | 6,811,818,140,598 | 889d56e84bb069315a9438dd801f774be411ff68 | 15514b8cdb9ef2bb25a33e44a2abe79e5eb86439 | /analyze_in_vivo/analyze_schmidt_hieber/theta_and_ramp.py | 43e20b61b37564cf617117a19a14fa6a60a04387 | [] | no_license | https://github.com/cafischer/analyze_in_vivo | 389ce0d51c6cbeb3e39648aaff13263f0c99060a | e38e1057420b5329504f7095f1ee89e2a293df23 | refs/heads/master | 2021-06-10T00:18:47.741793 | 2019-09-14T08:47:53 | 2019-09-14T08:47:53 | 100,512,098 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import division
import numpy as np
import os
from analyze_in_vivo.load import load_full_runs
from grid_cell_stimuli.remove_APs import remove_APs
from grid_cell_stimuli.ramp_and_theta import get_ramp_and_theta, plot_spectrum, plot_v_ramp_theta
from grid_cell_stimuli.downsample import antialias_and_downsa... | UTF-8 | Python | false | false | 6,101 | py | 150 | theta_and_ramp.py | 149 | 0.49205 | 0.46894 | 0 | 114 | 52.526316 | 123 |
iandennismiller/ledgerhelpers | 6,038,724,050,251 | e04c29b511faea950cb6cfbb7fe56eaf164c0c1c | c5f3b7efe56335bc3bc9028d6119bacea5747c0a | /test/test_parser.py | e6f177edd384f1ef405d8ebd0174652738602dfa | [] | no_license | https://github.com/iandennismiller/ledgerhelpers | 8fe2dee87598a1e4f6a597f2f6bfe29b327731ab | 25691f78d6a47029b8e1ea932379bdd8937904c8 | refs/heads/master | 2021-08-28T09:02:07.668481 | 2017-12-11T19:33:26 | 2017-12-11T19:33:26 | 113,881,845 | 0 | 0 | null | true | 2017-12-11T17:04:49 | 2017-12-11T16:25:33 | 2017-12-11T16:25:35 | 2017-12-11T16:28:56 | 314 | 0 | 0 | 1 | Python | false | null | import datetime
import ledgerhelpers.parser as parser
import test.test_base as base
from unittest import TestCase as T
class TestParser(T):
def test_simple_transaction(self):
c = base.data("simple_transaction.dat")
items = parser.lex_ledger_file_contents(c)
self.assertEqual(len(items), 3)... | UTF-8 | Python | false | false | 3,044 | py | 16 | test_parser.py | 16 | 0.587385 | 0.570631 | 0 | 78 | 38.025641 | 80 |
usnistgov/core_oaipmh_harvester_app | 9,010,841,434,475 | 147407e8c89eba0130661a4718e65ddada08ca82 | 78dbae82469a0a3a0b8be66da2d6c4b8c9ab894a | /tests/components/oai_verbs/tests_unit.py | d365416ef3e0c6bbf41099f4c41ae47b6e96ebd3 | [
"NIST-Software",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | https://github.com/usnistgov/core_oaipmh_harvester_app | 07a9c4d5c6b7078c10aab8e675318f71703353fd | bc5e31a9d7e5f66e34340230ae17a3cc2d08e7e7 | refs/heads/master | 2023-09-01T08:48:47.677916 | 2023-07-14T00:41:54 | 2023-07-14T00:46:46 | 97,263,716 | 1 | 2 | NOASSERTION | false | 2021-07-06T18:36:16 | 2017-07-14T18:48:57 | 2021-07-06T18:35:36 | 2021-07-06T18:35:33 | 344 | 1 | 2 | 2 | Python | false | false | """ Unit Test oai_verbs
"""
import requests
from rest_framework import status
from unittest.case import TestCase
from unittest.mock import patch
import core_oaipmh_harvester_app.components.oai_verbs.api as oai_verbs_api
from core_oaipmh_common_app.commons import exceptions as oai_pmh_exceptions
from core_oaipmh_harves... | UTF-8 | Python | false | false | 7,759 | py | 114 | tests_unit.py | 84 | 0.624952 | 0.614254 | 0 | 240 | 31.329167 | 87 |
YamiAtem/Project-C104 | 3,358,664,442,333 | eb85512c753c9162e18307995cb03d86022a35df | 5157f6cef910ac470903ac14cd571f1deec7e0c7 | /main.py | 164ffa6d7e8c9364048c2aeb40e16f72758e2187 | [] | no_license | https://github.com/YamiAtem/Project-C104 | c47e37f35fb1a531877ec2cf1adf20e6967b812c | 5edd726da3324962f67c5e0987f3262822a3c5ca | refs/heads/main | 2023-07-01T22:14:03.740528 | 2021-08-16T07:29:08 | 2021-08-16T07:29:08 | 366,731,122 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from mean import get_mean
from median import get_median
from mode import get_mode
mean = get_mean("SOCR-HeightWeight.csv")
median = get_median("SOCR-HeightWeight.csv")
mode = get_mode("SOCR-HeightWeight.csv")
print(f"Mean: {mean}")
print(f"Median: {median}")
print(f"Mode: {mode:2f}")
| UTF-8 | Python | false | false | 298 | py | 1 | main.py | 1 | 0.701342 | 0.697987 | 0 | 11 | 25.090909 | 44 |
jwinfield26/Grad_school | 13,752,485,318,759 | b9ab4a707aef1cc8a719406fb684a4af1beb63dd | 98db0da79a1acba389dd4ae62ad28fa53a875cc8 | /Python_Programming/Assignment2/assignment2_part4.py | c82453f8fa1c9d62a10303e22bc94b6014c463db | [] | no_license | https://github.com/jwinfield26/Grad_school | b8603987f7c06d31bbf088681968de40a99c1100 | 926e0ce2d5bfd9b77e89fc96ad809ec7dffee7a3 | refs/heads/master | 2021-02-20T12:33:40.334083 | 2020-08-12T04:02:24 | 2020-08-12T04:02:24 | 245,336,366 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ##################################################################################
# Justin Winfield
# Monday, October 8th
# I have not given or received any unauthorized assistance on this assignment
##################################################################################
def throwPairDice():
"Throwing ... | UTF-8 | Python | false | false | 2,800 | py | 32 | assignment2_part4.py | 13 | 0.533214 | 0.523571 | 0 | 61 | 44.918033 | 135 |
student-work-agu-gis2021/lesson6-dataprocessing-with-pandas-YoshitoKonno | 2,147,483,695,224 | 65e03295cc23e9c6fa73328ed2cca1abe487cc57 | a4b64f30588158d9a90c5c83d47cedb3f9345a2c | /Exercise_6_Problems_1_2.py | 9f15d363895175bda5e33eb9cfc2e41f5aed6f0e | [] | no_license | https://github.com/student-work-agu-gis2021/lesson6-dataprocessing-with-pandas-YoshitoKonno | 35eef994cef339ad2bb906eca606dc62cf20896f | fbe72f38823d9666f78d9847ba7a67a5b58fabe9 | refs/heads/master | 2023-05-01T16:27:10.762446 | 2021-05-23T13:34:51 | 2021-05-23T13:34:51 | 368,017,758 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Exercise 6: Weather data calculation
#
# ### Part 1
#
# You should start by reading the data file.
#
# - Read the data file into variable the variable `data`
# - Skip the second row
# - Convert the no-data values (`-9999`) into `NaN`
import pandas as pd
import num... | UTF-8 | Python | false | false | 6,663 | py | 1 | Exercise_6_Problems_1_2.py | 1 | 0.697193 | 0.668668 | 0 | 237 | 27.109705 | 117 |
willzhang05/ion | 6,313,601,959,111 | 6711e644c362bc1e568cacd22e39abbe6c70a7d9 | 87fa69391bcc22ba6d9839fc8ddad98ed2fbbdf0 | /intranet/apps/announcements/api.py | 2306e2c0805a98a66162ecfa85620c3829404f46 | [] | no_license | https://github.com/willzhang05/ion | b1945209266099a130d4dd89b6b6b08e625ec00b | f12c49dad6bc0eaff85d4a49bd99a73a1e486378 | refs/heads/master | 2021-01-21T15:57:02.667770 | 2015-11-19T18:36:04 | 2015-11-19T18:36:04 | 46,525,786 | 0 | 0 | null | true | 2015-11-19T23:03:41 | 2015-11-19T23:03:41 | 2015-11-17T17:25:53 | 2015-11-19T21:20:10 | 24,140 | 0 | 0 | 0 | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from rest_framework import generics, permissions
from .models import Announcement
from .serializers import AnnouncementSerializer
logger = logging.getLogger(__name__)
class IsAnnouncementAdminOrReadOnly(permissions.BasePermission):
... | UTF-8 | Python | false | false | 1,192 | py | 278 | api.py | 166 | 0.75 | 0.749161 | 0 | 35 | 33.057143 | 84 |
geyunxiang/mmdps | 4,269,197,514,948 | 5e65bd13f11f12afb18b1fd80204d14c5f0e9ba3 | d27d2e68336b681b07620c574ec562b7dd236d30 | /tools/ui_programs/ui_runpara.py | d0cdfd4e9a06259aaecd7bcedcf5f1a6d77c37fa | [] | no_license | https://github.com/geyunxiang/mmdps | de241bd607bc8230ade83fa75e4890f0d84747d6 | dabfabdeb2f922a3dcbdaf3fc46f0c4b40598279 | refs/heads/master | 2023-06-01T04:46:05.388686 | 2021-08-26T02:49:53 | 2021-08-26T02:49:53 | 117,055,236 | 5 | 3 | null | false | 2023-03-10T09:54:02 | 2018-01-11T05:38:13 | 2022-07-12T06:32:29 | 2022-05-06T06:16:49 | 22,039 | 4 | 2 | 1 | Python | false | false | import os
import tkinter as tk
from mmdps.gui import guiframe, tktools, field
from mmdps.util.loadsave import load_json_ordered
from mmdps.proc import para
class RunParaApplication(guiframe.MainWindow):
def __init__(self, master=None, **kw):
guiframe.MainWindow.__init__(self, master, **kw)
self.build_actions()
... | UTF-8 | Python | false | false | 1,178 | py | 315 | ui_runpara.py | 154 | 0.691851 | 0.686757 | 0 | 42 | 27.047619 | 73 |
alanpropp/compciv-2016 | 18,803,366,845,857 | b6c03300abd431c541a22e975d87f8aca49e931a | b962804dec069c6076650efe5e609ca4da97651e | /exercises/0020-gender-detector/i.py | a53c892434af28fcca43729541ebfacb3c2e9174 | [] | no_license | https://github.com/alanpropp/compciv-2016 | 8accbcbe31ae76a0e9a401c862f68fad8c23bb57 | 355351d1748a0d296a9d2a5aaaf399ee7488e8ff | refs/heads/master | 2021-01-10T14:58:17.950577 | 2016-03-15T23:35:05 | 2016-03-15T23:35:05 | 49,608,092 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from os.path import join, basename
import csv
YEAR = 2014
DATA_DIR = 'tempdata'
filename = join(DATA_DIR, 'wrangled2014.csv')
finalfile = open(filename, 'r')
count = 0
bigdatarow = []
reader = csv.reader(finalfile)
next(reader, None)
#Go through CSV file
for line in reader:
if int(line[6]) >= 100 :
bigdatarow.app... | UTF-8 | Python | false | false | 625 | py | 58 | i.py | 48 | 0.6672 | 0.6192 | 0 | 28 | 21.357143 | 71 |
jijiaxing/python_basic | 3,573,412,807,782 | 55493191ae6358bb95b8adc0a17796abcb6dd6fa | 9ec5861148b0db44d50170e26072782f1d9946ff | /经典算法50题python版/13。完全平方.py | 97d3fd9d6a5511b8446b8e4beeaacaacd8fa6d30 | [] | no_license | https://github.com/jijiaxing/python_basic | 771be5223cba0fbd5f3e5c45411a23cf871cad12 | 140533152852e23fb62c159eb83dbe05a5123f02 | refs/heads/master | 2021-08-18T16:25:36.693046 | 2017-11-23T07:33:15 | 2017-11-23T07:33:15 | 109,068,429 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #一个整数,它加上100后是一个完全平方数,加上168又是一个完全平方数,
# 请问该数是多少?
import math
for num in range(10000):
a = math.sqrt(num + 100)
b = math.sqrt(num + 100 + 168)
if a // 1 == a and b // 1 == b: #判断是不是整数
print(num)
| UTF-8 | Python | false | false | 312 | py | 104 | 13。完全平方.py | 89 | 0.574661 | 0.475113 | 0 | 10 | 21 | 46 |
mikbuch/ssvep_ica | 19,610,820,685,506 | 41dc5fe6a3c70648986a0677911b54670169e849 | 2eefb34907fd853d3068ca49b8cb65dc60cdf325 | /dataset_MNE_compatible.py | f65bd391b174048bbd258f55e339ec55c894ca2c | [] | no_license | https://github.com/mikbuch/ssvep_ica | 65c50e99468acf86e00c3e1007457818fd13814d | 68a5ba858cb6d2816c2bacfc53facd5fd5a23d53 | refs/heads/master | 2020-06-14T04:55:49.371287 | 2017-02-13T13:33:25 | 2017-02-13T13:33:25 | 75,231,895 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import scipy.io as sio
import numpy as np
from sklearn import preprocessing
import mne
def load_matlab_data(filepath, var_name=None):
data = sio.loadmat(filepath)
if var_name is not None:
data = data[var_name]
return data
def load_coords(filepath, delimiter=',', scale_0_1=True):
coords = np.l... | UTF-8 | Python | false | false | 1,985 | py | 13 | dataset_MNE_compatible.py | 9 | 0.635768 | 0.620151 | 0 | 68 | 28.191176 | 75 |
varlociraptor/simulate-variants | 14,611,478,750,532 | f17ebf9163faeb67b0c107174bb8e638ee744739 | 614d8ce6d306e04d92178ec4b28abde2d4ec4233 | /workflow/Snakefile | 98bbe8ef0262ba6f83f30dbb9a3dbfcb047f217d | [] | no_license | https://github.com/varlociraptor/simulate-variants | 48011d6972a8ad86d6ecf95b4a984162d1156e96 | f4942e21582fd53beb689b07063f688c20182c46 | refs/heads/master | 2022-11-18T16:46:41.303102 | 2020-07-08T22:23:03 | 2020-07-08T22:23:03 | 278,143,819 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | rule all:
input:
expand("results/mapped/{depth}x.sorted.bam", depth=[5, 10, 20, 30, 40])
rule get_genome:
output:
"resources/genome.fasta"
params:
species="saccharomyces_cerevisiae",
datatype="dna",
build="R64-1-1",
release="100"
log:
"logs/get-g... | UTF-8 | Python | false | false | 3,974 | 2 | Snakefile | 1 | 0.588072 | 0.569955 | 0 | 147 | 26.034014 | 124 | |
DaVinci42/LeetCode | 6,004,364,303,935 | 3ecc309786a9be6c264a6a41cd98ba3d30e9dcc7 | a0a3749c294de58cfb5f6de21061ba1ee95b08cf | /837.New21Game.py | d269765ca3e266943df287a25317b03df4976853 | [] | no_license | https://github.com/DaVinci42/LeetCode | 7f20ead30f2626f24e7afdf443dd4e35b331a42e | 5b4cea4bd91de3022bf90eb8e3b3b40e08729ed9 | refs/heads/master | 2021-07-16T17:28:23.954378 | 2021-03-19T04:45:41 | 2021-03-19T04:45:41 | 99,877,612 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def new21Game(self, N: int, K: int, W: int) -> float:
if K <= 0:
return 1
dp, preSum = [1] * (N + 1), 1
for i in range(1, N + 1):
dp[i] = 1 / W * preSum
if i < K:
preSum += dp[i]
if i >= W:
preSu... | UTF-8 | Python | false | false | 369 | py | 147 | 837.New21Game.py | 146 | 0.365854 | 0.336043 | 0 | 14 | 25.428571 | 57 |
kha-dinh/life-scheduler | 7,395,933,696,583 | a241ae537cc0cadb8f190977f6c1da3c03d7ed6f | 43b5894b2a4e7efd93161a20ce6a5a916d0d0f84 | /life_scheduler/__init__.py | 2070722a43fb177da29f75c0af737fc9bb0bee09 | [
"BSD-2-Clause"
] | permissive | https://github.com/kha-dinh/life-scheduler | 64e910a99884d73cfac1a3f418d2fcf5f105b0ee | 1ea9c05ba7f9cf128c708533b18f2ab4e2d3ec17 | refs/heads/main | 2023-06-29T23:49:30.824823 | 2021-08-08T06:22:29 | 2021-08-08T06:22:29 | 391,521,651 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .algorithms import Task, TaskList | UTF-8 | Python | false | false | 38 | py | 4 | __init__.py | 3 | 0.842105 | 0.842105 | 0 | 1 | 38 | 38 |
LJHG/weirdWebsite | 19,490,561,629,267 | b4ee0d14296252c09426892001e4a1c7fe3959f8 | fdfc5914337f04168675fed5aefd5dd37f1ec650 | /app01/views.py | 9d5c4fd3d9afaff6af4ead9b145de0c64b5a31fb | [] | no_license | https://github.com/LJHG/weirdWebsite | 9c02d112431145e754946c33b1ad5623f9985332 | c10c5c137158cd9f474da396f6872b0f15c789e9 | refs/heads/master | 2023-07-16T01:29:36.461565 | 2021-08-15T08:57:54 | 2021-08-15T08:57:54 | 223,544,056 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
from django.shortcuts import HttpResponse
import json
import numpy as np
import pandas as pd
import os
# pieces = []
# for year in range(1880,2011):
# frame = pd.read_csv('../../babynames/yob%d.txt'%year,names=['name','gender','frequency']) #用这个比loadtxt再转dataframe快
# frame['y... | UTF-8 | Python | false | false | 19,255 | py | 10 | views.py | 2 | 0.584648 | 0.553857 | 0 | 505 | 35.788119 | 168 |
gcallah/colossus | 11,218,454,597,134 | ac0160f5fe08edcc4d642c4b82efaecb2f13089e | 30a47b2cf4213359e761cd339f4976d2913e1ec0 | /colossus/apps/lists/views.py | 81811a1fa935fa980a0b9eb194f2775531a63a33 | [
"MIT"
] | permissive | https://github.com/gcallah/colossus | 11aac2f23709c34ae4f0ff67545817338ca5f4c5 | ee5319091cd19c96987825258a57e6d6f9d8fc51 | refs/heads/master | 2020-08-19T01:17:02.102778 | 2020-05-12T02:31:31 | 2020-05-12T02:31:31 | 215,858,204 | 3 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
from typing import Any, Dict
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.db.models import Count, Q
from django.forms impo... | UTF-8 | Python | false | false | 21,683 | py | 43 | views.py | 28 | 0.686067 | 0.68413 | 0 | 568 | 37.174296 | 119 |
promisivia/experience-oim-under-dcm | 11,476,152,617,226 | 6266695cc02c964c6d3129acf9eaeb8057b54d9b | 853882976cffe5cd615a899dd9b438a2b78f3c34 | /BanditAlg/UCB.py | 25a0a7777c5d735cb4cb1eb55a1798c86985902d | [] | no_license | https://github.com/promisivia/experience-oim-under-dcm | 9814d026e15685b7a00085777d2ae9aa430400e1 | 0bac6aef6cbc9b4af152d228b9f2c172c8ce49d1 | refs/heads/main | 2023-02-19T16:21:13.680028 | 2021-01-22T17:56:16 | 2021-01-22T17:56:16 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from math import log, inf, sqrt
from random import choice
import itertools
class UCBStruct(object):
def __init__(self, S):
self.S = S
self.totalReward = 0.0
self.numPlayed = 0
self.averageReward = 0.0
self.upperBound = inf
self.p_max = 1
def updateParameters(se... | UTF-8 | Python | false | false | 1,846 | py | 36 | UCB.py | 35 | 0.593174 | 0.583965 | 0 | 55 | 32.563636 | 95 |
umentu/django_tutorial | 4,801,773,480,697 | dea609b7dd87718eb00ff19eb9a9407740fe642b | 7ad9a64bebca0cc20d6bd0e466635d72be367d55 | /polls/migrations/0006_auto_20180523_0950.py | 621efdee22609d30f2ca282dfb937ff7f8fc75ed | [] | no_license | https://github.com/umentu/django_tutorial | f2655a95f59989eebd70e8d3f4f1dfd1d88d02ba | 75aaa2c7bcb74c63c8f781051240aab53d62b1d7 | refs/heads/master | 2020-03-18T11:07:37.075205 | 2018-05-24T02:49:51 | 2018-05-24T02:49:51 | 134,652,005 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.4 on 2018-05-23 09:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0005_auto_20180523_0926'),
]
operations = [
migrations.AlterField(
model_name='image',
name='image_url',
... | UTF-8 | Python | false | false | 392 | py | 9 | 0006_auto_20180523_0950.py | 6 | 0.581633 | 0.502551 | 0 | 18 | 20.777778 | 56 |
gpalazzo/undergrad_exercises | 6,880,537,631,716 | ed889da827fb6b9800afbb1aeac1ca8b301486a2 | d99b2f5ebc15e089197ce1fc181be9569a57128d | /iot_device/src/ubidots_platform.py | f6ee48f0b855c5bfb63d2c732d1cf853d3ec87a0 | [] | no_license | https://github.com/gpalazzo/undergrad_exercises | 12b1229a99312ac10d50e87affcf3fbf9b36dcaa | 367f402303c6add90b755b47a239a71658662de2 | refs/heads/master | 2022-03-21T07:52:39.435446 | 2021-08-02T19:51:06 | 2021-08-02T19:51:06 | 213,013,132 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
from time import sleep
TOKEN = "my_token"
DEVICE_LABEL = "DrAssist"
VARIABLE_LABEL_1 = "temperatura"
VARIABLE_LABEL_2 = "temperatura-media"
VARIABLE_LABEL_3 = "bpm"
VARIABLE_LABEL_4 = "spo2"
VARIABLE_LABEL_5 = "status-paciente"
def build_payload(temp_atual, temp_media, bpm, spo2, status_paciente):
... | UTF-8 | Python | false | false | 1,377 | py | 73 | ubidots_platform.py | 8 | 0.655047 | 0.633987 | 0 | 46 | 28.934783 | 74 |
alexasp/botty-plugins | 7,198,365,220,249 | 19bc3a84e115a5e918d6c0b96c594166125fc3e0 | ef1915d94587b2437c7192616f9d6cd4ad501a6d | /whatis/__init__.py | 0ef1b06b40f961d96dd20558a2e656251e10159e | [] | no_license | https://github.com/alexasp/botty-plugins | f9ed2133ca717284f527c1abf98f1aafe0c14194 | 293e0b7c77d1a1a3b06160f27eff6d1da935189c | refs/heads/master | 2022-09-02T09:35:00.564188 | 2022-08-18T13:31:12 | 2022-08-18T13:31:12 | 81,880,237 | 0 | 2 | null | false | 2017-02-24T10:03:17 | 2017-02-13T22:50:46 | 2017-02-13T22:52:57 | 2017-02-24T10:03:17 | 30 | 0 | 2 | 0 | Python | null | null | import asyncio, aiohttp, re, os
import plugins
import logging
import random
import io
logger = logging.getLogger(__name__)
def _initialise(bot):
plugins.register_user_command(["whatis"])
def whatis(bot, event, *args):
if event.user.is_self:
return
search_term = "+".join(args).lowe... | UTF-8 | Python | false | false | 1,151 | py | 26 | __init__.py | 25 | 0.627297 | 0.622047 | 0 | 32 | 33.71875 | 174 |
phi99/Vulnerability-Scanner | 944,892,824,558 | 979aae67731919a4930394e5c3e7d198d94011be | f3c89a4bb755c57f36b274c91d9553de6dc6e1eb | /scanner.py | 489f47f585ae81143345e7f5010d811725dae131 | [] | no_license | https://github.com/phi99/Vulnerability-Scanner | 18672d34c2bcadbe057f178d6e36ab9fe4b16502 | dccf9a7f91dd7840bb90ff7c76ab78f8fa341c61 | refs/heads/master | 2020-06-20T10:27:51.313864 | 2019-07-16T01:01:15 | 2019-07-16T01:01:15 | 197,094,710 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import socket, subprocess,sys
from datetime import datetime
subprocess.call('clear',shell=True)
rmip = raw_input("t Enter the host IP to scan:")
r1 = int(raw_input("t Enter the start port numbert"))
r2 = int (raw_input("t Enter the last port numbert"))
print "*"*40
print "n Scanner is working on ",rmip
print "*"*40
t... | UTF-8 | Python | false | false | 785 | py | 1 | scanner.py | 1 | 0.680255 | 0.66242 | 0 | 35 | 21.428571 | 58 |
taduyhc/Code.ptit.TaDuy | 2,319,282,386,785 | ad3e2cd565c200bb48cf6f5c0db61caa5aef5dde | 28a28b7ffb2c5a576b24dffde092665d3f76a2ba | /Python/PY02007.py | 705bdb60b9527b178cdcb21a29f99cc429941e5c | [] | no_license | https://github.com/taduyhc/Code.ptit.TaDuy | 1a8992b2e32091bdd5453f71f9389f1d37402e07 | 1d27371a87c9669bb7d6db6877ac6f4881eeaa9c | refs/heads/main | 2023-08-19T10:30:27.253617 | 2023-03-18T14:54:56 | 2023-03-18T14:54:56 | 315,073,887 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | test = 10
s = set()
while test > 0:
data = input()
base = data.split()
for i in range(0,len(base)):
s.add(int(base[i]) % 42)
test -= len(base)
print(len(s))
| UTF-8 | Python | false | false | 190 | py | 587 | PY02007.py | 582 | 0.5 | 0.468421 | 0 | 9 | 19.111111 | 32 |
MrEnvision/pac_learn_DOTAs | 13,340,168,449,252 | 9c6369176270fba2170b88819a0080e584583923 | a9550599683236aad300c93d4c9f1b8828d0b65b | /main.py | da67721efae6f13af57ee511acf88c28de9b59ed | [
"MIT"
] | permissive | https://github.com/MrEnvision/pac_learn_DOTAs | 7397639e64855ababce6a857f5ddb2ee95b6e9e6 | b6787b5f1c137763f226e4af3b06b4e071df9070 | refs/heads/master | 2023-02-09T00:38:26.100656 | 2022-05-03T12:26:49 | 2022-05-03T12:26:49 | 297,907,611 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # main file
import sys
import random
import json
import time
from common.system import build_system
from common.validate import validate
from common.make_pic import make_system, make_hypothesis
from normal_learning.learnOTA import learnOTA_normal
# from normal_learning.debug.learnOTA import learnOTA_normal
# from norma... | UTF-8 | Python | false | false | 5,485 | py | 26 | main.py | 22 | 0.619744 | 0.617151 | 0 | 120 | 43.991667 | 198 |
takaya-0808/atcoder | 7,825,430,451,567 | 62ce3f7c2d7188b5bfab70805bb688b719ebf300 | 9a8cffe460d906aa9252c2894d22c8e06bf646db | /abc150/c.py | 967fd4f09aca6418dd60efb26f5541a0cefe9650 | [] | no_license | https://github.com/takaya-0808/atcoder | e955f7439e3ed573986505a45f717587ff073d55 | 6b302e73c1aa06cdc8220e3c0f43c7a6a7bccaa5 | refs/heads/master | 2021-04-08T07:28:50.904649 | 2020-08-16T05:04:14 | 2020-08-16T05:04:14 | 248,753,422 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
from itertools import permutations
def main():
p_score, q_score, count = 0,0,0
string = ""
num = int(input())
p_num = tuple(list(map(str, input().split())))
q_num = tuple(list(map(str, input().split())))
for i in range(1,num+1):
string = string + str(i)
list_ = list(permutations(string, num))
f... | UTF-8 | Python | false | false | 497 | py | 40 | c.py | 40 | 0.579477 | 0.567404 | 0 | 28 | 16.75 | 47 |
vincentsarago/wagyu | 18,502,719,125,855 | 4792377160a3a613d9d5aa1cd79bdc22c7d6fad9 | cd3df53a432d35e2fe7b4e4f9bbe62222235a85b | /wagyu/hints.py | 9fc11570b86cdd943e2be427c8605285c5717447 | [
"MIT"
] | permissive | https://github.com/vincentsarago/wagyu | 00ccbe6c9d101724483bde00e10ef512d2c95f9a | f6dce8d119fafa190d07f042ff6c4d5729a4c1e6 | refs/heads/master | 2023-01-20T06:26:27.475502 | 2020-11-21T04:57:01 | 2020-11-21T04:57:01 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from numbers import Real
from typing import TypeVar
Coordinate = Real
Domain = TypeVar('Domain')
| UTF-8 | Python | false | false | 98 | py | 191 | hints.py | 185 | 0.785714 | 0.785714 | 0 | 5 | 18.6 | 26 |
orrak/Advent-Of-Code-2019 | 2,800,318,706,521 | 9d2744366b925334dbab29f237e2075849db98e2 | a0f4c4a4da54e0b8467254c40255e4e495e8e653 | /day2.py | 31676b745fa9bff1da790cec65ed13a0948b17c1 | [] | no_license | https://github.com/orrak/Advent-Of-Code-2019 | b8fd179227c9dd70abb40b3760cdc480151b7b11 | 8d43b49e17f0b18b4ef27a79f2f6d52ee8ab31be | refs/heads/master | 2021-07-14T02:16:11.227468 | 2020-12-07T01:50:05 | 2020-12-07T01:50:05 | 225,109,114 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def func(lst):
i = 0
while i < len(lst):
if lst[i] == 1:
lst[lst[i+3]] = lst[lst[i+1]] + lst[lst[i+2]]
i += 4
elif lst[i] == 2:
lst[lst[i+3]] = lst[lst[i+1]] * lst[lst[i+2]]
i += 4
elif lst[i] == 99:
i = len(lst)+1
else:... | UTF-8 | Python | false | false | 889 | py | 12 | day2.py | 12 | 0.433071 | 0.380202 | 0 | 46 | 18.326087 | 57 |
ankitr/N-lang | 3,435,973,883,834 | ddbd38313f648e859cbe9ffc4aac80e4b8748d6e | 6b4db50b0a7cfbc0f1520a6dbee61489d21d2096 | /python/FileIO.py | 880b9d51a20a32829002175626976807d8c97970 | [
"MIT"
] | permissive | https://github.com/ankitr/N-lang | a3fc66296716baa22154173da38e9755cee9f32e | ac6d20a5b688d5281a86dfdaba35938eaa402500 | refs/heads/main | 2023-02-07T07:06:58.237314 | 2020-12-25T22:16:30 | 2020-12-25T22:16:30 | 324,441,431 | 0 | 0 | MIT | true | 2020-12-25T22:16:54 | 2020-12-25T22:16:54 | 2020-12-25T08:55:31 | 2020-12-25T01:20:26 | 6,198 | 0 | 0 | 0 | null | false | false | def write(args):
with open(str(args[0])[1:-1], "w+") as f:
f.write(''.join(args[1:])[1:-1])
def append(args):
with open(str(args[0])[1:-1], "a+") as f:
f.write(''.join(args[1:])[1:-1])
def read(args):
with open(str(args[0])[1:-1], "r", encoding="utf-8") as f:
return f.read()
def _values():
return {"write":... | UTF-8 | Python | false | false | 356 | py | 24 | FileIO.py | 15 | 0.564607 | 0.519663 | 0 | 14 | 24.5 | 59 |
cpyip5/PythonCode | 7,541,962,575,565 | 49790d8725ca8ddd9b3f34cd6228b43da6b4dbbc | 07ab93fc3f84f7307587f1a515b17194b05446d7 | /PythonCode/Playground.py | f3000fd50338c02b6963d8ab8a87549bb102ef11 | [] | no_license | https://github.com/cpyip5/PythonCode | 31d629fd10bb0590ff6c8475549f35744a0fedf4 | 32c0bc9b96172fb3c497bbd9433649fcd56b1763 | refs/heads/master | 2020-06-01T06:45:08.368143 | 2019-09-20T06:25:42 | 2019-09-20T06:25:42 | 190,684,895 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
print( type(tf) )
| UTF-8 | Python | false | false | 45 | py | 5 | Playground.py | 4 | 0.688889 | 0.688889 | 0 | 4 | 10.25 | 23 |
zyn-thakur/hms-1 | 14,362,370,666,277 | cd4f8e43e2aba4f266bece1464f6ac752a798860 | 4ce2105208b97e6077f6e81f4b3d0416c27fc1f5 | /copyFrontend.py | 1b205d7bebc66d68705e3a4e90f1eafca59b60f3 | [] | no_license | https://github.com/zyn-thakur/hms-1 | 48bbba640f8409f178bdf5673770cc4da31dc00a | 1af7921317360cc2d736712ae11661b9a2f1ac81 | refs/heads/master | 2020-12-05T22:19:40.130230 | 2020-01-07T06:39:02 | 2020-01-07T06:39:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os,shutil
def copytree(src, dst, symlinks=False, ignore=None):
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.path.isdir(s):
shutil.copytree(s, d, symlinks, ignore)
else:
if os.path.exists(d):
... | UTF-8 | Python | false | false | 618 | py | 19 | copyFrontend.py | 18 | 0.588997 | 0.585761 | 0 | 19 | 31.526316 | 69 |
knbk/web-technology | 6,287,832,146,050 | 00b28161ec53ef01236f1cf0138cb2ae8b5c9d91 | 892f3842816f0cefd69c8dc1619c289cc90b9b78 | /accounts/urls.py | 4a1458d1b48e8f437e347d0cb8664c5560b7c9f3 | [] | no_license | https://github.com/knbk/web-technology | 3145fc6e856d41e60529d0ef8f2280aa75516fda | a07f027ab3094e80355b09dbb1e3dd93bca367b3 | refs/heads/master | 2021-01-12T02:05:37.144117 | 2017-11-14T16:34:55 | 2017-11-14T16:34:55 | 78,470,958 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url
from . import views
import django.contrib.auth.views
urlpatterns = [
url(r'^login/$', django.contrib.auth.views.login, name='login'),
url(r'^logout/$', django.contrib.auth.views.logout, name='logout', kwargs={'next_page': '/'}),
url(r'^register/$', views.register, name='re... | UTF-8 | Python | false | false | 332 | py | 21 | urls.py | 11 | 0.677711 | 0.677711 | 0 | 10 | 32.2 | 98 |
felixdittrich92/DeepLearning-tensorflow-keras | 249,108,142,281 | 14e06da90ab3c2119c59b21793d429ad445e24c6 | 427a4c3ed88246a1727f58571788d90996065af7 | /8_DeepLearning-Autoencoder/Denoise_images/denoise_images.py | c4f881b3b23c9cfb8bdf5f8b2493bc263ff594d1 | [
"Apache-2.0"
] | permissive | https://github.com/felixdittrich92/DeepLearning-tensorflow-keras | 09d2010f7d2a36befc14e2f0d07ca053c7329ba8 | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | refs/heads/master | 2022-12-30T11:46:22.729390 | 2020-10-22T11:56:22 | 2020-10-22T11:56:22 | 248,968,257 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
# Fix CuDnn problem
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
tf.config.experimental.set_memory_growth(gpus[0], True)
except RuntimeError as e:
print(e)
from tensorflow.keras.layers import *
from ... | UTF-8 | Python | false | false | 2,235 | py | 70 | denoise_images.py | 66 | 0.685011 | 0.634004 | 0 | 72 | 30.055556 | 84 |
romanukov/news-parser | 17,987,323,066,523 | 9d5db64f08b800e0b18d54e55a8276194e1d8c38 | a7d0cf254f31f26eb6cc50289c3cd217efeb4a5e | /backend/src/telegram_watcher/migrations/0025_auto_20190215_1432.py | c36d07364fbe08126472f779048718c17b942b78 | [] | no_license | https://github.com/romanukov/news-parser | a6581b10f8480442e0aa5a24a45fdac02a1c5040 | 5430a350a44f22612a38d33c13be75c73a31bbde | refs/heads/master | 2023-01-11T22:26:44.243062 | 2020-04-09T14:51:56 | 2020-04-09T14:51:56 | 254,399,603 | 0 | 1 | null | false | 2023-01-04T14:53:45 | 2020-04-09T14:49:55 | 2020-04-09T14:52:04 | 2023-01-04T14:53:45 | 4,486 | 0 | 1 | 65 | Python | false | false | # Generated by Django 2.0.3 on 2019-02-15 14:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('telegram_watcher', '0024_auto_20190215_1428'),
]
operations = [
migrations.AddIndex(
model_name='messagefile',
index... | UTF-8 | Python | false | false | 411 | py | 154 | 0025_auto_20190215_1432.py | 112 | 0.620438 | 0.53528 | 0 | 17 | 23.176471 | 90 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.