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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ShaGodJi/ButterflyServer | 1,279,900,302,206 | 2ac0dc6895b85343cb7021d984baa5f5e0d03422 | b5b91fb3b4616bfccef258c68374554a5d4d72cd | /butterflyServer/views.py | 19a667454a3909e545e97d7e6cdfbfb93fb844d2 | [] | no_license | https://github.com/ShaGodJi/ButterflyServer | c71f24c051f022bce942b1b285eef05176dc84eb | 55b6445626d250e145c98ded6e20d2bb982e6ff9 | refs/heads/master | 2022-09-07T20:05:23.850223 | 2019-12-21T09:22:31 | 2019-12-21T09:22:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import os
from django import forms
from django.http import HttpResponse
from django.shortcuts import render
from textblob.formats import JSON
from butterflyServer.label_image import get_label
from django.views.decorators.csrf import csrf_exempt
class FileForm(forms.Form):
username = forms.CharField(... | UTF-8 | Python | false | false | 1,952 | py | 2 | views.py | 1 | 0.585553 | 0.582992 | 0 | 57 | 33.245614 | 93 |
el1s7/sanic-api-kit | 721,554,530,655 | d5a4dd08e558b8dc3b6a83bb8a912dbfaa687647 | 1a5e8948a3ba9df36a94489ac3f560aa960f107f | /api/middlewares/__init__.py | 023b5a60064a3f85a3161775a34545611c426841 | [] | no_license | https://github.com/el1s7/sanic-api-kit | 7bb1729b0fc122ae18f93f99bde2cde549cd9191 | 55516680fcc34121df0a18ef545919b3fd444832 | refs/heads/master | 2023-05-24T06:15:03.554664 | 2021-06-09T16:27:47 | 2021-06-09T16:27:47 | 375,420,177 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from api.models.auth import auth
def auth_verify(request):
request.ctx.session = auth.verify(
request.token,
request.headers.get("user-agent"),
request.ip
) | UTF-8 | Python | false | false | 166 | py | 20 | __init__.py | 17 | 0.728916 | 0.728916 | 0 | 9 | 17.555556 | 36 |
hosseinghorbanzadeh/A-hybrid-method-of-link-prediction-in-directed-graphs | 18,322,330,499,820 | 27c703d59b66956cb76591211835ff4f19a23d82 | ef5f48eac538382f5e29cbb08a2980017cd0a177 | /supervis/Method.py | 9d8ae4a093242d9e4bf8fab37ac932b3192c5580 | [] | no_license | https://github.com/hosseinghorbanzadeh/A-hybrid-method-of-link-prediction-in-directed-graphs | e2792447666060ca89e66511786079026a600a69 | 7a12f9fd458a05a2c38770e49cd0a4f8a3a3d09d | refs/heads/main | 2023-08-25T19:27:56.916190 | 2021-10-09T05:29:05 | 2021-10-09T05:29:05 | 391,838,949 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 2 17:03:56 2021
@author: hossein
"""
import networkx as nx
import pandas as pd
import numpy as np
import ast
import matplotlib.pyplot as plt
import itertools as IT
import random
from measure.AADirect import *
from measure.CN_Hub_Auth import *
from measure.... | UTF-8 | Python | false | false | 9,191 | py | 23 | Method.py | 17 | 0.542378 | 0.527037 | 0 | 224 | 38.986607 | 146 |
siki-aayush/Implementation-of-Advanced-Algorithms-Using-Python | 10,307,921,549,522 | 2593164d84359b5768edadcbf82919c780743896 | ebaa9207f0ce1c86c694b88045c784a5e1c687bb | /Edge_Disjoint_Path.py | c9e6c756954b3770a090043216d5edba8410e998 | [] | no_license | https://github.com/siki-aayush/Implementation-of-Advanced-Algorithms-Using-Python | bd8c7b1c53cc3621ed5e621940c5f0b18c980d3b | 75ddd6441bbf8ab9782145c0b009b2c2f5c8e4e9 | refs/heads/master | 2021-09-22T18:04:24.436569 | 2018-09-13T07:15:36 | 2018-09-13T07:15:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | n = int(input("Enter the number of nodes : "))
graph = {}
for i in range(0,n):
j = input("Enter the edges flowing from the node : ")
temp=j.split(",")
graph[str(i)]=temp
matrix = [[0 for x in range(n)] for y in range(n)]
#print(graph)
for i in graph.keys():
j = graph.get(i)
for k in j:
i... | UTF-8 | Python | false | false | 1,614 | py | 11 | Edge_Disjoint_Path.py | 8 | 0.539653 | 0.526022 | 0 | 69 | 22.391304 | 62 |
yiclwh/Facebook-Interview-Coding | 7,318,624,292,631 | ea14e73556131eba674422ea954c5661e738917e | 83607de1e707e955f8e7be0432fa638d709ee832 | /binary search.py | 1753a3dd1a699a73a14425c1e26218d8bfb80b96 | [] | no_license | https://github.com/yiclwh/Facebook-Interview-Coding | b5b225f4a5bcef6286f498655a7a50b081e89e63 | 587238fbb66b0824b944d43a12d37c9adcdb02e7 | refs/heads/master | 2021-07-11T14:43:51.803393 | 2018-12-20T00:31:58 | 2018-12-20T00:31:58 | 135,938,852 | 0 | 0 | null | true | 2018-06-03T20:39:29 | 2018-06-03T20:39:29 | 2018-06-03T19:43:24 | 2017-05-09T00:52:42 | 85 | 0 | 0 | 0 | null | false | null | 可以找不比target小的第一个数(大于等于)
最后换成end 找比target 小的第一个数
def binarysearch(array, target):
start, end = 0, len(array)-1
while start <= end:
mid = start + (end-start)//2
if array[mid] < target:
start = mid + 1
else:
end = mid - 1
return start
public static void PrintI... | UTF-8 | Python | false | false | 1,464 | py | 24 | binary search.py | 23 | 0.479433 | 0.463121 | 0 | 55 | 24.654545 | 68 |
insightcs/CenterNet | 4,320,737,111,343 | e049d9d686bc095ce7401955abcf17d59a605ead | 2d0a1cc732760bbbd55f68a6483c5b65fcc5b046 | /detector/utils/decode.py | 415b1507bf480feb5931595ab245b415c59e5e02 | [
"BSD-3-Clause",
"MIT"
] | permissive | https://github.com/insightcs/CenterNet | 82cb6d927e80d32849fca9b8f0705f2ee3b93676 | 277ab04321285023ce4f0f2e7d81ef52252d4019 | refs/heads/master | 2020-06-27T04:29:26.522542 | 2019-07-31T11:57:00 | 2019-07-31T11:57:00 | 199,844,651 | 0 | 1 | MIT | true | 2019-07-31T11:41:18 | 2019-07-31T11:41:18 | 2019-07-31T05:43:39 | 2019-07-23T14:49:00 | 6,393 | 0 | 0 | 0 | null | false | false | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import torch.nn as nn
from utils.utils import _gather_feat, _tranpose_and_gather_feat
def _nms(heat, kernel=3):
pad = (kernel - 1) // 2
hmax = nn.functional.max_pool2d(
heat, (ker... | UTF-8 | Python | false | false | 5,168 | py | 9 | decode.py | 8 | 0.566176 | 0.543537 | 0 | 151 | 33.231788 | 79 |
pytsite/pytsite | 7,756,710,985,013 | 8b0cce6b74052cb59fb7dc8423cc79e456699248 | 1bc7053e7582e43bdd4b943c5700677e07449d3c | /pytsite/maintenance/__init__.py | a095c4d37f4ca965860074efe8f236f8aa7a4c88 | [
"MIT"
] | permissive | https://github.com/pytsite/pytsite | f92eaa041d85b245fbfcdff44224b24da5d9b73a | e4896722709607bda88b4a69400dcde4bf7e5f0a | refs/heads/master | 2021-01-18T01:06:12.357397 | 2019-08-03T02:56:48 | 2019-08-03T02:56:48 | 34,899,242 | 12 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | """PytSite Maintenance
"""
__author__ = 'Oleksandr Shepetko'
__email__ = 'a@shepetko.com'
__license__ = 'MIT'
# Public API
from ._api import enable, disable, is_enabled
def _init():
from pytsite import console, lang
from . import _console_command
lang.register_package(__name__)
console.register_comm... | UTF-8 | Python | false | false | 366 | py | 151 | __init__.py | 99 | 0.669399 | 0.669399 | 0 | 19 | 18.263158 | 60 |
dockrexter/Design-Patterns-Python | 5,016,521,849,544 | 5313a44ebcef80b1602608e879876c208cced8cb | 8b3fe40844e180d71989a7a953adfe303f3d6e24 | /mvc.py | a8fb3ce604c0a26db95b138edf7c8fe8e3e51e39 | [] | no_license | https://github.com/dockrexter/Design-Patterns-Python | fe24fb2bc2e3588ea2860fe63cebed022b2f7469 | 0b8c57b9450c9ffc2823ca9c6f0e548f5dd0c071 | refs/heads/master | 2022-01-05T20:38:48.095969 | 2019-07-25T14:04:38 | 2019-07-25T14:04:38 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class model:
def __init__(self,name):
self.name=name
def returning(self,message):
if message == "name":
return self.name
else:
return "required information not available"
class view:
def __init__(self,message):
print (message)
class controller(model... | UTF-8 | Python | false | false | 461 | py | 13 | mvc.py | 6 | 0.596529 | 0.596529 | 0 | 20 | 22.05 | 56 |
The-Cracker-Technology/Katana | 12,438,225,317,469 | c72ed548d6a991c267038cc6ff63f948e5336b0f | ebe6c75ee675f45e078c4c655946c6031d9657a7 | /Modes/Gmode.py | 6c63cf5104af7ea428a6a835601db9d0e91082f1 | [
"MIT"
] | permissive | https://github.com/The-Cracker-Technology/Katana | a8818463c167707d25d8d9cccf170c5a0f453f6d | a54a2e35927cd73505d675920d93b1d8c04a274b | refs/heads/master | 2023-03-19T12:45:04.447647 | 2021-03-14T18:13:40 | 2021-03-14T18:13:40 | 347,714,228 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # @name: Katana-dorkscanner
# @repo: https://github.com/adnane-X-tebbaa/Katana
# @author: Adnane tebbaa (AXT)
# Main Google Dorking file V2.0
"""
MIT License
Copyright (c) 2020 adnane tebbaa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated d... | UTF-8 | Python | false | false | 2,706 | py | 3 | Gmode.py | 2 | 0.651515 | 0.644494 | 0 | 76 | 33.592105 | 96 |
aspc/mainsite | 17,575,006,182,653 | 81a926ae23813ae67f088113ecf6fc9448d16b7d | 65ec50c5bc1bd4948de96cf6a8b6fee82badacef | /aspc/files/models.py | 2c537888cd5ea278613ef15da82146003ee0a07f | [
"MIT"
] | permissive | https://github.com/aspc/mainsite | eab3e75e2e701881bae1f3e1c998c5b9f76ae761 | a6ccee0bb921147b7f630d65e01371e451aa3c54 | refs/heads/master | 2020-04-03T10:23:24.519148 | 2018-04-02T00:49:24 | 2018-04-02T00:49:24 | 3,998,083 | 8 | 20 | MIT | false | 2018-08-24T07:02:02 | 2012-04-11T20:43:21 | 2018-04-02T00:50:02 | 2018-04-02T00:59:10 | 26,718 | 10 | 17 | 2 | JavaScript | false | null | from django.db import models
class ImageUpload(models.Model):
name = models.CharField(max_length=100)
image = models.ImageField()
class FileUpload(models.Model):
name = models.CharField(max_length=100)
_file = models.FileField() # `file` is a built-in Python function | UTF-8 | Python | false | false | 274 | py | 359 | models.py | 177 | 0.755474 | 0.733577 | 0 | 9 | 29.555556 | 67 |
csnoboa/sistemas_distribuidos_at1 | 9,878,424,792,999 | 47cfc83cb7df00e424d9b127b00bf77593db7cde | cb212d1e2ca56c6fd2c11523d98b897032a8aa18 | /script_usuario.py | 97b0fbf7e46884de3de3f5a2a6685a6e2775b88c | [] | no_license | https://github.com/csnoboa/sistemas_distribuidos_at1 | dff41780ffe9b453895a823a5edc63cc80c83de1 | e53325c3a5c848b0b53ad22ed0ec620b744096f6 | refs/heads/master | 2023-08-26T05:21:28.612246 | 2021-11-07T00:05:57 | 2021-11-07T00:05:57 | 424,194,220 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import Pyro5.api
from cliente import Cliente
import time
server = Pyro5.api.Proxy("PYRONAME:server.enquete")
nome = input("Digite o nome do usuario: ")
cliente = Cliente(nome, server)
cliente.cadastrar()
while True:
resp = input("Ver menu? \n1 - Sim \n2 - Não\n")
if resp == "1":
resp = i... | UTF-8 | Python | false | false | 2,274 | py | 7 | script_usuario.py | 7 | 0.33304 | 0.305727 | 0 | 81 | 27.024691 | 74 |
Kowenjko/Python_Homework_14_Kowenjko | 3,418,794,015,392 | 3975a80b7c4f8f369000dd6c4d62ddade2010850 | 740c5c83800ab6bd54fe3a977c4af723bc354ab2 | /unregisteredCustomer.py | 4175ba3cc7ae8563073c1422996062baef6e70e4 | [] | no_license | https://github.com/Kowenjko/Python_Homework_14_Kowenjko | 1ffa41f0e96c82372e0b55591986ddfae864a7c3 | 5e8fc6f3488018c223bf9f978f1040efa5c8ecf3 | refs/heads/master | 2023-06-22T15:09:50.751139 | 2021-07-25T07:47:19 | 2021-07-25T07:47:19 | 388,225,572 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import psycopg2
from settings import *
from connection import Connection
class UnregisteredCuctomer(Connection):
def register_self(self, login, password, data):
self._register(login, password, 'customer')
table = 'customer'
result = self._postData(table, data)
return result
d... | UTF-8 | Python | false | false | 1,844 | py | 6 | unregisteredCustomer.py | 5 | 0.53308 | 0.531996 | 0 | 56 | 31.928571 | 101 |
libbyandhelen/nn_arch_search | 18,717,467,478,870 | 63b7f96ee494f108651a37c58d893e6ce28fa8b3 | 2ad545b3784e523889cc8be91608b3f8fe53cf75 | /NASsearch/acquisition_func.py | 62ea5b7c5939e7add0c8838de381653c922c7458 | [] | no_license | https://github.com/libbyandhelen/nn_arch_search | 707767516140322a64f956bb79bfc74ecfc69b7c | 0df1af91ff794d7017bd38bcbd758df5b3d6a091 | refs/heads/master | 2020-04-12T22:44:53.618305 | 2018-12-22T09:59:11 | 2018-12-22T09:59:11 | 162,797,862 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """ module for acquisition function"""
import numpy as np
from scipy.stats import norm
from Kernel_optimization.all_gp import GaussianProcess
class AcquisitionFunc:
""" class for acquisition function
expected improvement in this case
"""
def __init__(self, X_train, y_train, current_optimal, mode, trad... | UTF-8 | Python | false | false | 1,427 | py | 10 | acquisition_func.py | 9 | 0.612474 | 0.609671 | 0 | 36 | 38.611111 | 105 |
milton96/practicas | 12,094,627,942,210 | 72aabc5a22d865d0c4b8275d51be0a313b8cad7d | eb37d1ae40953bb7498e88e97e52f2c9debaae10 | /Algorithms/Sorting/Bubble Sort/difference_max_min.py | 2c2dc85435780b235dd9ffae6c32acd906ca814b | [] | no_license | https://github.com/milton96/practicas | 141ef1c5240dbd95f122c0f670f1a0e5ed61a9a4 | 1c9e5b7098b9f2b665e9b3e38f8913a2784ea2d1 | refs/heads/master | 2020-07-08T13:30:02.151999 | 2019-09-25T17:43:56 | 2019-09-25T17:43:56 | 203,689,178 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Obtiene la diferencia entre la suma máxima y la suma mínima de un array,
# usando n-m elementos para calcular cada una
t = int(input())
for k in range(t):
n, m = map(int, input().split())
a = list(map(int, input().split()))
#Solución implementando ordenamiento con burbuja
# for i in range(n-1):
... | UTF-8 | Python | false | false | 785 | py | 44 | difference_max_min.py | 43 | 0.49359 | 0.476923 | 0 | 29 | 25.896552 | 79 |
ashiqur0202/Python-Projects | 1,735,166,814,243 | ba03002610ffd4413fcdd9510fc62f1812b6718a | 21281f2124348f122894522ff8ce512c2c210568 | /Heads Tails.py | 0188e27a15e701d81020ec2aebf35d527daf5193 | [] | no_license | https://github.com/ashiqur0202/Python-Projects | 624097c93c59d4c28ecf1b919089de390141cdc9 | 467df5be1064dbc365e798b9e8fb52cc435f489f | refs/heads/master | 2023-02-02T16:51:11.130916 | 2021-06-04T16:29:04 | 2021-06-04T16:29:04 | 319,058,235 | 0 | 0 | null | false | 2021-05-31T18:27:38 | 2020-12-06T14:54:42 | 2021-05-31T17:55:17 | 2021-05-31T18:27:38 | 1 | 0 | 0 | 0 | Python | false | false | print("/// Heads and Tails ///")
import random
numbers = int(input("enter mumbers: \n"))
random.seed(numbers)
random_numbers = random.randint(0, 1)
if random_numbers == 1:
print("Heats")
else:
print("Tails") | UTF-8 | Python | false | false | 225 | py | 9 | Heads Tails.py | 8 | 0.635556 | 0.622222 | 0 | 10 | 20.7 | 41 |
Cheburashka303/edrenbaton | 19,439,022,006,506 | 90b6883980033bfcde8b92d14c8dfa802b4c88f0 | 7c6adf3115e720abc0039ffafac3850abea9d2b3 | /yoperniiteatr.py | 5abe2a309d0613a407d94854845025c2b71e8e73 | [
"MIT"
] | permissive | https://github.com/Cheburashka303/edrenbaton | 2389270d9907b110ef02561743e8bbe6eefed671 | 55891919b6039a427991cbdb978b07b7f63a8d64 | refs/heads/main | 2023-02-17T18:00:11.979975 | 2021-01-19T07:10:44 | 2021-01-19T07:10:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Функция кодирования в код Морзе будет называться encode_to_morse(text).
Функция декодирования называется decode_from_morse(code)."""
from encode import encode_to_morse
from decode import decode_from_morse
| UTF-8 | Python | false | false | 282 | py | 4 | yoperniiteatr.py | 3 | 0.8 | 0.8 | 0 | 6 | 34 | 74 |
markWJJ/Open_domain_QA | 10,591,389,370,242 | e1dee17b99b955c03f72e8b156230c27264f3bf6 | f303abd351b5502138a8812f65e4ba7701faf485 | /R_Net_QA/Data_r_net/Data_deal_no_array.py | 55746f7197dea6f18ceb27a167a3f5ee6262183a | [] | no_license | https://github.com/markWJJ/Open_domain_QA | 55b8c992de615fc00dbd8c264fd6d2f50df77df8 | a06bb9511f832d6f30a67b4a420c4f2de0d7b14d | refs/heads/master | 2021-09-06T01:16:38.964566 | 2018-02-01T08:16:59 | 2018-02-01T08:16:59 | 114,727,196 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pickle
import os
global PATH
import sys
PATH=os.path.split(os.path.realpath(__file__))[0]
class DataDealRNet(object):
def __init__(self,train_path,dev_path,test_path,dim,batch_size,Q_len,P_len,flag):
self.train_path=train_path
self.dev_path=dev_path
self.test_path... | UTF-8 | Python | false | false | 9,214 | py | 30 | Data_deal_no_array.py | 22 | 0.511579 | 0.50397 | 0 | 283 | 31.045936 | 101 |
NTUE-Arduino-Lab/clec-inventory-backend | 10,222,022,199,235 | 1683fb4f4c15599aa27b0fb25738c3464afc8165 | fd0390330406f2d67efeca9dad978f6fef28bc1f | /app.py | 02d366a197fb90d8c2e4e49cd1947116eeab538c | [] | no_license | https://github.com/NTUE-Arduino-Lab/clec-inventory-backend | 825df8f5ab31271da435cf828cefe3c0f855e1a1 | 61e6c2697498858b414c4220b60a97272ea4dcc9 | refs/heads/main | 2023-07-15T10:17:13.147852 | 2021-08-16T02:51:05 | 2021-08-16T02:51:05 | 392,362,853 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ftplib
import re
import sys
import os
import json
import pymysql
import socket
import base64
import random
import io
from tenacity import *
from uuid import uuid4
from flask import Flask, request, flash, redirect, url_for, send_file
from werkzeug.datastructures import FileStorage
from functools import wraps
from... | UTF-8 | Python | false | false | 7,494 | py | 3 | app.py | 1 | 0.670003 | 0.660528 | 0 | 296 | 24.317568 | 146 |
madhavGSU/Data_Programming | 8,280,696,979,711 | b2c83bd0089e37970f411814ca7df593f467bf40 | 8f7b390fcd5fab10d7bb377512c8b912a108fc88 | /Assignment_1/chapter2_21.py | 9ef20b8d9fa3d90534dc0869637249f09639da51 | [] | no_license | https://github.com/madhavGSU/Data_Programming | 5f803f3f59a9e5c9c3e6381ce1e02a94e88bd2e2 | a673ab8a2aa0d57700fd44abf10fa96280c2c904 | refs/heads/master | 2021-02-22T05:57:36.797488 | 2020-03-06T09:25:15 | 2020-03-06T09:25:15 | 245,370,362 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 14 18:37:45 2020
@author: Administrator
"""
import math;
principal=eval(input("Give the principal amount"));
intRate=0.05/12;
# interest=principal*((1+(0.05)/12))**6;
interest=0;
total=principal;
for i in range(6):
total=principal+interest;
interest=total*(1+intRate);... | UTF-8 | Python | false | false | 456 | py | 86 | chapter2_21.py | 86 | 0.684211 | 0.620614 | 0 | 20 | 21.8 | 74 |
vincentwyshan/tap | 14,035,953,154,667 | 4603a6ce9e042d8cd9b0b41c766200d01588b7b3 | d3c126f0fe2cd531e6c5041ff3e7751035c1fb89 | /tap/security.py | a3f6aae9893d514443c2c3776b352777c5c329b8 | [] | no_license | https://github.com/vincentwyshan/tap | 7e88e3c7042c428fa6bc008554ba134a8b856781 | 54a7c3bc0386db692abaf001dfa9bdfcacaab0ec | refs/heads/master | 2021-01-17T12:58:25.438682 | 2018-01-31T04:04:25 | 2018-01-31T04:04:25 | 59,276,647 | 1 | 0 | null | false | 2016-05-25T09:49:06 | 2016-05-20T08:13:12 | 2016-05-20T08:18:53 | 2016-05-25T09:49:05 | 11,993 | 0 | 0 | 0 | JavaScript | null | null | #coding=utf8
import datetime
import os
from hashlib import sha256
from hmac import HMAC
from pyramid.security import Allow, Everyone, Authenticated
from pyramid.security import unauthenticated_userid, authenticated_userid
from pyramid.security import Allow, Deny
import transaction
from tap.service import exceptions... | UTF-8 | Python | false | false | 7,936 | py | 71 | security.py | 35 | 0.563811 | 0.561789 | 0 | 233 | 32.965665 | 82 |
its-sachin/LeetCode | 13,683,765,826,009 | 1051a67ee6bf24c3f7b030af1bb5a9e4ec642376 | 52ece7acc902c570a8981ed8e3104cad80f4c80d | /Random/q73.py | 684cb1246be534f120a83fb25ebd06f44b50e3dd | [] | no_license | https://github.com/its-sachin/LeetCode | fa1b4c30672bd82bd777001553f6e06c191ba6e3 | 44b79d3d55b383e74d4c9cd7a3da7d659f3f36d5 | refs/heads/master | 2023-06-19T11:24:58.473110 | 2021-07-18T19:02:57 | 2021-07-18T19:02:57 | 380,414,089 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def setZeroes(self, matrix):
d={}
for i in range(len(matrix)):
for j in range(len(matrix[i])):
if(matrix[i][j]==0):
if(d.get(i)==None):
d[i]=[j]
else:
d[i].append(j)
... | UTF-8 | Python | false | false | 718 | py | 89 | q73.py | 88 | 0.376045 | 0.355153 | 0 | 25 | 27.4 | 48 |
kfconsultant/scale | 12,627,203,887,421 | e273b83a145ff56f86ce96288139068261a7d0b9 | 65306b41168a5afa6fc80904cc0fbf737939a01a | /scale/util/host.py | 5c908d43ba68c7e1d9a8ec0e6b18bb843ad11a64 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | https://github.com/kfconsultant/scale | 9e5df45cd36211d1bc5e946cf499a4584a2d71de | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | refs/heads/master | 2020-12-07T00:04:37.737556 | 2020-01-06T12:57:03 | 2020-01-06T12:57:03 | 232,587,229 | 0 | 0 | Apache-2.0 | true | 2020-01-08T14:53:36 | 2020-01-08T14:53:35 | 2020-01-06T12:57:08 | 2020-01-06T19:10:58 | 299,783 | 0 | 0 | 0 | null | false | false | """Defines the named tuple for host locations"""
from __future__ import unicode_literals
from collections import namedtuple
# Named tuple represents a host location
HostAddress = namedtuple('HostAddress', ['hostname', 'port', 'protocol'])
def host_address_from_mesos_url(url):
"""Extract URL components from a Me... | UTF-8 | Python | false | false | 881 | py | 908 | host.py | 755 | 0.671964 | 0.666288 | 0 | 32 | 26.5 | 73 |
LightSys/kardia | 1,400,159,353,044 | acfcb76e2ed9fca44b7fe53e85c6a242c4f87a77 | f8b5d28d02800761116049df9cbe85996ada6aa1 | /kardia-dev-tools/zac_python_script.py | 69d0ea60bd37335553f84a44e97b2ece18104e73 | [] | no_license | https://github.com/LightSys/kardia | 5efee753765eb80fca36ee13fe996a278d374325 | cc3b9b607dc60c23dabd7c3b950d9aad0054e562 | refs/heads/master | 2023-09-04T04:29:25.330880 | 2023-07-18T21:46:52 | 2023-07-18T21:46:52 | 38,851,624 | 6 | 5 | null | false | 2023-08-08T23:14:39 | 2015-07-10T00:08:36 | 2023-08-03T21:35:26 | 2023-08-08T23:14:39 | 66,157 | 5 | 6 | 2 | Java | false | false | import csv
from datetime import datetime
counter = 0
modCount = 0
setID = set()
setAmounts = set()
setAmountErrorsId = []
setDatesErrorsPrev = []
setDatesErrorsNext = []
setErrorNTLOnce = []
setErrorNTLTwice = []
setErrorNTLMult = []
setErrorNTLMultBlank = []
setErrorNTLEqualFirst = []
setAmountZero = []
setIsExtraNul... | UTF-8 | Python | false | false | 6,072 | py | 172 | zac_python_script.py | 90 | 0.550725 | 0.529315 | 0 | 219 | 26.730594 | 77 |
NIDHISH99444/CodingNinjas | 11,450,382,820,310 | 73f0ebfa647db2f6933841e21301cd10b8eb1520 | a1678f80efe56423d08bea6a2843633b8a81dd34 | /CN_DynamicProgramming1/AlphaCode.py | 689a84cac1914bf5e3da9c12e9b24eba31886089 | [] | no_license | https://github.com/NIDHISH99444/CodingNinjas | af60aa93dbfcf050e727949d41201f72973b0608 | b77b652cf0bf9b098ef9da4eff5eaecb7bfeaea5 | refs/heads/master | 2021-05-17T03:50:45.376843 | 2020-05-03T17:25:01 | 2020-05-03T17:25:01 | 250,608,228 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | def alphaCode(input,size,output):
output[0]=1
output[1]=1
for i in range(2,size+1):
if input[i-1]!=0:
output[i]=output[i-1]
if input[i-2]*10+input[i-1] <=26:
output[i]+=output[i-2]
return output[size]
#output(i) -->checking i length ka input array
ipt=int(inpu... | UTF-8 | Python | false | false | 517 | py | 205 | AlphaCode.py | 201 | 0.576402 | 0.539652 | 0 | 22 | 22.545455 | 52 |
quanloveshui/permission | 3,401,614,122,772 | 74ee244bdb46f91951870672370f3962d5a2c6a3 | 526554a69524b4e2c9233985bd901578b9445b93 | /src/repository/user_type.py | c48eb70a1c07d05a8baee2494eef161545a306fe | [] | no_license | https://github.com/quanloveshui/permission | 375e0b40d5dcf221f6a8776da2e4f85464c19dc9 | 9b8618f7ad888403f96385c738ac1d0194e694eb | refs/heads/master | 2020-06-06T22:55:16.610231 | 2019-06-20T07:31:45 | 2019-06-20T07:31:45 | 192,870,029 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from src.utils.db_connection import DbConnection
class UserTypeRepository:
def __init__(self):
self.db_conn = DbConnection()
def add(self, caption):
"""
在user_type表中添加角色
:param caption:
:return:
"""
cursor =... | UTF-8 | Python | false | false | 1,111 | py | 6 | user_type.py | 6 | 0.525024 | 0.524079 | 0 | 46 | 22.021739 | 54 |
GuizaoBR/Django | 5,059,471,514,171 | 4dbb343a34afecd5f25db08cf4b6a8551693171f | 48f7e8b28b8b586e49905d78c4bf4bc19cb02293 | /aplicativo2/aplicativo2/views.py | da85c459ee52b77f4662831c80feb4827a6ea2db | [] | no_license | https://github.com/GuizaoBR/Django | 14d8ddef8f0d47fb4d5baa149b0a23b04c3e2ebf | c8dbbfe96d4ed0cdfb562ba7f23aeff5dd8ff07f | refs/heads/master | 2021-07-12T19:12:49.199089 | 2017-10-17T13:10:13 | 2017-10-17T13:10:13 | 107,269,740 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.http import HttpResponse
def ola(request):
return HttpResponse("<h1>Guilherme<h1>") | UTF-8 | Python | false | false | 101 | py | 1 | views.py | 1 | 0.752475 | 0.732673 | 0 | 5 | 19.4 | 44 |
musikid/VitaPad | 1,228,360,686,047 | 9adb28b50e9066cf94ac097215857f9d89a18056 | c945d56d0d12b11b77677045ec06adeb79091a18 | /client/client_test/client.py | 10a7ce1777bc1822b5077bd7b242d70b41a8c2cb | [] | no_license | https://github.com/musikid/VitaPad | 09d563ba26cd75d5fd9166898c12540deded56f3 | 576e2279935a25e2456bd3c14e7868e39086b064 | refs/heads/main | 2023-08-31T23:54:04.960878 | 2023-08-16T19:07:39 | 2023-08-16T19:07:55 | 135,613,021 | 0 | 0 | null | true | 2023-08-16T19:05:07 | 2018-05-31T17:06:48 | 2023-07-27T19:30:47 | 2023-08-16T19:05:06 | 579 | 0 | 0 | 1 | Rust | false | false | from socket import socket, AF_INET, SOCK_STREAM, SOCK_DGRAM
from time import time
import flatbuffers
from NetProtocol.Handshake import Handshake, Endpoint
from Pad import MainPacket, Vector3
sock = socket(AF_INET, SOCK_STREAM)
sock.connect(("192.168.1.24", 5000))
print("Connected")
udp_sock = socket(AF_INET, SOCK_D... | UTF-8 | Python | false | false | 1,398 | py | 38 | client.py | 27 | 0.734621 | 0.689557 | 0 | 49 | 27.530612 | 65 |
firanger/segundo-corte | 15,582,141,388,930 | 2e92f69ce5c007b2629815f1b4bec4dc29ea72ca | 4b361d63ac144914c59091047a4d7527f2a386b8 | /meltdown-mitigation/conditionals.py | d15b8365347be1054ae811c22597e61a930bc715 | [] | no_license | https://github.com/firanger/segundo-corte | b30b52715731b20945f165a6c4244c7afce73d1a | baf494a0395d15f2b77e9fdfd987316e9fda5caf | refs/heads/main | 2023-08-28T22:51:10.110069 | 2021-10-08T04:44:03 | 2021-10-08T04:44:03 | 414,830,611 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def is_criticality_balanced(temperature, neutrons_emitted):
return temperature < 800 and neutrons_emitted > 500 and temperature * neutrons_emitted < 500000
def reactor_efficiency(voltage, current, theoretical_max_power):
efficiency = voltage * current / theoretical_max_power * 100
if efficiency >= 80:
... | UTF-8 | Python | false | false | 904 | py | 7 | conditionals.py | 6 | 0.651549 | 0.61615 | 0 | 25 | 35.16 | 99 |
poblouin/BudgetMe | 16,595,753,659,303 | 05e59e48eabb0a187a0233d29a76c21f68e5c2f8 | 169cd04c0602735f0a648a7d44454d741fe25859 | /budgetme/budgetme_api/filters.py | a4f539c7bb249f7a8b1d5c0a07818238315ef298 | [
"MIT"
] | permissive | https://github.com/poblouin/BudgetMe | a1a2c939df5028018c9f7e27f8e7a20f3af70b56 | b0b4b09042937e3f1d653078868bfaf3791dc03e | refs/heads/master | 2017-03-20T13:43:05.986213 | 2017-02-12T17:43:32 | 2017-02-12T17:43:32 | 65,415,036 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import django_filters
from django_filters import rest_framework
from budgetme.budgetme_api.models import Transaction, ScheduledTransaction
class TransactionFilter(django_filters.rest_framework.FilterSet):
from_date = django_filters.DateTimeFilter(name='date', lookup_expr='gte')
to_date = django_filters.DateT... | UTF-8 | Python | false | false | 1,675 | py | 16 | filters.py | 14 | 0.745672 | 0.745672 | 0 | 28 | 58.821429 | 154 |
pioneers/PieCentral | 1,546,188,269,297 | 40d131497c83471b52fe3604c6e3d0ed51d577ef | 500362b86cfe4c692dd8a57a0caabe67e0efba79 | /shepherd/runtimeclient.py | 28f3304d72e84a98566542764c350dec1bfbc8eb | [
"Apache-2.0"
] | permissive | https://github.com/pioneers/PieCentral | e82c3c3f0ad37de2895dd15caafdad2965d9ff41 | d6437d4ddfa386f44e6f70391c5211c723dde56d | refs/heads/master | 2020-09-20T19:42:19.126190 | 2020-06-05T06:47:14 | 2020-06-05T06:47:14 | 67,092,938 | 18 | 9 | Apache-2.0 | false | 2020-06-16T01:49:33 | 2016-09-01T03:00:13 | 2020-06-05T06:47:18 | 2020-06-16T01:40:34 | 62,577 | 13 | 9 | 74 | Python | false | false | import msgpackrpc #pylint: disable=import-error
class RuntimeClient:
def __init__(self, host, port):
self.host, self.port, self.client = host, port, None
def connect(self):
self.client = msgpackrpc.Client(msgpackrpc.Address(self.host, self.port))
def disconnect(self):
self.client... | UTF-8 | Python | false | false | 3,931 | py | 328 | runtimeclient.py | 172 | 0.614856 | 0.595523 | 0 | 115 | 33.182609 | 140 |
cyan478/MFR | 12,850,542,171,275 | 9c9731bbc61b267ee09a3aeb03a02d063b503d77 | 0a4cdb328c5808dc8b4ce9b32ca9d1942a7f45e5 | /textReduction.py | ce769da687f47efad4b3382d1019516002ff5e95 | [] | no_license | https://github.com/cyan478/MFR | 2ff029b12131541661a25bf6e224b9c9e53390db | 3426ff899b3816833525c409c7088bf80e7a76b8 | refs/heads/master | 2021-01-20T07:51:51.528026 | 2017-05-03T06:36:21 | 2017-05-03T06:36:21 | 90,054,747 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a = open("alice.txt", "r")
text = a.read().split()
a.close()
words = [word.strip('()",.!*\'-') for word in text]
def wordFreq(w):
freq = filter(lambda a: a.lower() == w.lower(), words)
return len(freq)
#test
print 'The frequency of the word "the" is ' + str(wordFreq('the'))
print 'The frequency of the word "is... | UTF-8 | Python | false | false | 914 | py | 2 | textReduction.py | 1 | 0.641138 | 0.637856 | 0 | 28 | 31.678571 | 110 |
AnonymousConferences/MCF | 3,375,844,321,682 | ed44f4bc2aeb4e4adffbc28304b310ea0e1788cb | ddd5b79e80d5b2a43a01a92dbd8fcefbc74fbe18 | /KickstarterRec/parallel_mf_posneg_embedding_user.py | cd2a6b30bdc1fc081ce98c5300c06a014d61ab6f | [] | no_license | https://github.com/AnonymousConferences/MCF | 24b037dacd0ad4ee28a48dc3cde37f733dd5fd95 | 029a256ae91e6d8a7558385410cf6dc7e37af43f | refs/heads/master | 2021-07-14T17:38:56.938181 | 2017-10-19T19:54:55 | 2017-10-19T19:54:55 | 107,186,238 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import sys
import time
import threading
import numpy as np
from numpy import linalg as LA
import ParallelSolver as ps
import MultiProcessParallelSolver as mpps
from joblib import Parallel, delayed
from sklearn.base import BaseEstimator, TransformerMixin
import rec_eval
class ParallelMFPositiveNegativeUserE... | UTF-8 | Python | false | false | 16,437 | py | 20 | parallel_mf_posneg_embedding_user.py | 18 | 0.536047 | 0.529172 | 0 | 374 | 42.946524 | 102 |
mtamer/spideyweb | 8,538,394,985,785 | ca5fc321e0df1d7eaf112cfe6f0bf577719f06b6 | 770277dd8ee8db9f998b7e5f9419941047fc2c5b | /spideyweb.py | 9736ea1f18f13a04d588bd02d08cbd1771beb598 | [] | no_license | https://github.com/mtamer/spideyweb | 7c6b5a73afef60bb6eae1f144253f8e55a9bb28b | 938305482480d0b05f452cad2c24ea8d9776ac18 | refs/heads/master | 2020-04-29T02:38:46.285054 | 2014-10-13T14:10:36 | 2014-10-13T14:10:36 | 25,057,032 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
from bs4 import BeautifulSoup #modules BeautifulSoup
#WebCrawler for one page
def spiderweb(max_pages):
page = 25
while page <= max_pages:
url = 'http://www.usedottawa.com/classifieds/all/' + str(page) + '?description=honda'
source_code = requests.get(url)
plain_text = s... | UTF-8 | Python | false | false | 1,055 | py | 2 | spideyweb.py | 1 | 0.630332 | 0.622749 | 0 | 33 | 30.939394 | 93 |
mverteuil/SIMP | 13,400,298,003,621 | a6be4e265deb1164cb21589dc8de0fd6e466aa92 | 086ec6cb1de40f1c01ecb6d14a8830d32a1eb177 | /simp/inventory/urls.py | 3703fa4190616eb6d9ceb95ca44c84d0094114f9 | [] | no_license | https://github.com/mverteuil/SIMP | dbfd17c5b10a58c4a02b36d34446ae3feb3d1d02 | cdd65f48d823b93176dc895cf5893937a9a3ad2e | refs/heads/master | 2020-05-29T12:33:20.697748 | 2013-03-31T18:22:39 | 2013-03-31T18:22:39 | 7,852,994 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from bootstrap import urls as bootstrap_urls
from django.conf.urls import patterns, url
from .forms import (AccountForm,
InventoryItemForm,
PurchaserForm,
TransactionForm)
from .models import (InventoryItem,
Purchaser)
from .views impor... | UTF-8 | Python | false | false | 1,473 | py | 27 | urls.py | 11 | 0.563476 | 0.563476 | 0 | 47 | 30.340426 | 66 |
sfmajors373/city-scrapers | 13,159,779,843,452 | d5ae3b1b598bc43fb518f1c8994ac674689fda20 | 5850afa8458946781b15b8c3122f4e9b3c760b83 | /city_scrapers/spiders/det_zoning_appeals.py | b9593f5598806fcc1ce6638c38db8744021e3e9e | [
"MIT"
] | permissive | https://github.com/sfmajors373/city-scrapers | 8ad1b70ea5669c3b4063fbfcb90bdb928c35eca7 | 49ad24460bc6e7132fbace33d2ae8b10a38764d7 | refs/heads/master | 2020-04-21T18:14:07.725481 | 2019-02-08T14:52:45 | 2019-02-08T14:52:45 | 169,761,863 | 0 | 0 | MIT | true | 2019-02-08T16:10:46 | 2019-02-08T16:10:46 | 2019-02-08T14:56:48 | 2019-02-08T14:52:46 | 7,575 | 0 | 0 | 0 | null | false | null | # -*- coding: utf-8 -*-
from datetime import time
from dateutil.parser import parse
from city_scrapers.constants import BOARD
from city_scrapers.spider import Spider
class DetZoningAppealsSpider(Spider):
name = 'det_zoning_appeals'
agency_name = 'Detroit Zoning Division'
timezone = 'America/Detroit'
... | UTF-8 | Python | false | false | 2,550 | py | 20 | det_zoning_appeals.py | 14 | 0.502353 | 0.497255 | 0 | 77 | 32.116883 | 96 |
HYEEWON/practice_for_coding_test | 14,422,500,182,744 | a6302a0e8b29ece3d8f55feb135a5c1bc7e7629d | ecba61c279d1c7a729e463841382f5486e9dc7d7 | /leetcode/220324_68_TextJustification_Hard.py | c8828b7996402f09d1155fd0b14bb59d8506773b | [] | no_license | https://github.com/HYEEWON/practice_for_coding_test | 458479ef75f7430ace4ddafcb408f4c322492f84 | d13f1b5a1cd6132ab8592c31359e3a55aa6ad7d5 | refs/heads/main | 2023-04-25T00:11:36.557605 | 2022-09-24T12:36:49 | 2022-09-24T12:36:49 | 326,623,683 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Simulation
class Solution:
def fullJustify(self, words, maxWidth):
answer = []
cnt, tmp = 0, [] # 단어 길이 합, 단어 배열
for word in words:
if cnt + len(word) + len(tmp) <= maxWidth: # 단어 사이의 공백 필수
cnt += len(word)
tmp.append(word)
conti... | UTF-8 | Python | false | false | 1,142 | py | 362 | 220324_68_TextJustification_Hard.py | 350 | 0.446328 | 0.43597 | 0 | 31 | 33.290323 | 95 |
GRSEB9S/HSI_Classification-1 | 19,026,705,146,693 | 8cd2349ea7221e59892fdee4802b31223e13892f | 70db19ef8603bf2209e85b865d6a1e42231a1f46 | /svm/svm.py | 4ee78f222a3af959b831f29d437469a4ddbb4e57 | [] | no_license | https://github.com/GRSEB9S/HSI_Classification-1 | 1c68a8822d64348f3fb46ce6479fa906fd9ba433 | 35d600cc695e695d50fc97f024f4e425a8b1f2ab | refs/heads/master | 2021-09-16T21:06:30.761871 | 2018-06-25T06:13:06 | 2018-06-25T06:13:06 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*-coding=utf-8 -*-
from sklearn.neighbors import KNeighborsClassifier
from sklearn import svm
import numpy as np
import scipy.io as sio
import random
import matplotlib.pyplot as plt
import seaborn as sn
import pandas as pd
import time
import os
from datetime import datetime
PaviaU = '../data/PaviaU.mat'
PaviaU_gt = ... | UTF-8 | Python | false | false | 5,550 | py | 2 | svm.py | 1 | 0.539459 | 0.527568 | 0 | 163 | 33.04908 | 109 |
eric100lin/Learn | 438,086,667,126 | 22089c995682c6d27e954ccaae9bcd364ff374e5 | b21f0a87ec5f0784f1678ccb1e5a871e05822ebc | /algorithm/Array/1169.py | 9d8823fc24ed3b1f715f3f1fe41919dc74f10315 | [] | no_license | https://github.com/eric100lin/Learn | b8236413e6000982861f28b8e7a7f9e6c13e2d78 | 317c927a06b7964af80c62487450622132974eea | refs/heads/master | 2020-08-04T20:17:08.164496 | 2019-11-29T06:47:14 | 2019-11-29T06:47:14 | 212,266,993 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
1169. Invalid Transactions
https://leetcode.com/contest/weekly-contest-151/problems/invalid-transactions/
A transaction is possibly invalid if:
the amount exceeds $1000, or;
if it occurs within (and including) 60 minutes of
another transaction with the same name in a different city.
Each transaction string transa... | UTF-8 | Python | false | false | 5,189 | py | 89 | 1169.py | 88 | 0.597803 | 0.541145 | 0 | 134 | 37.731343 | 95 |
sadimauro/projecteuler | 9,706,626,102,311 | e0c0110adb34f30ab33b8e55d285d873ad4fc96c | 4b30fa26f7c5dfb413950fc4dc9e4e89129944c4 | /stevepe.py | 8458c20d2ac29612c42ae3cae49e0faf000d4baa | [] | no_license | https://github.com/sadimauro/projecteuler | ca6f6cc3e8eac83bdb667c88a9b892923a3df57c | a07b71ecdf7f0cc7b53fcd021c67c5a7518d8571 | refs/heads/master | 2021-07-08T00:12:46.272408 | 2020-07-11T12:32:56 | 2020-07-11T12:32:56 | 143,607,960 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
import math
import itertools
def isPrime(a):
"""
>>> isPrime(1)
False
>>> isPrime(2)
True
>>> isPrime(3)
True
>>> isPrime(4)
False
>>> isPrime(25)
False
>>> isPrime(27)
False
>>> isPrime(29)
True
"""
if a <= 0:
re... | UTF-8 | Python | false | false | 9,468 | py | 84 | stevepe.py | 79 | 0.529045 | 0.482256 | 0 | 533 | 16.763602 | 80 |
carlosescorche/pythoneando | 10,917,806,875,137 | 2a319a8cd54f9cb01ed54cac7c5cc13099c0b985 | b9611ff290c88a4907020b2a2026d5ad4d713fc4 | /teoria/12_excepciones/03.py | 040133be04ff099ec643d72cc873a02e2490ed22 | [] | no_license | https://github.com/carlosescorche/pythoneando | fddd70a1e5b27e2d37fa6512fbfef5a63e89ed81 | 7e4a430d8a0a076dfb655f82b089f3c58efce21d | refs/heads/master | 2020-03-23T15:34:16.174446 | 2018-09-05T21:04:07 | 2018-09-05T21:04:07 | 141,757,926 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
#coding=utf-8
#Por último es posible utilizar un bloque finally que se ejecute al final del código, ocurra o no ocurra un error:
while(True):
try:
n = float(input("Introduce un número: "))
m = 4
print("{}/{}={}".format(n,m,n/m))
except:
print("Ha ocurrido un er... | UTF-8 | Python | false | false | 559 | py | 23 | 03.py | 21 | 0.63472 | 0.631103 | 0 | 16 | 33.5625 | 114 |
wongmi21/uoft-mail-merge | 10,050,223,516,880 | 21764df53c0640faa721f0113d6e3e56947dcb65 | e5e472c4e838788ace767ddbab3594fc47d619f2 | /Step 1-scrape.py | f50e4abe09fafbdd12bc87863fdbf0163929977c | [] | no_license | https://github.com/wongmi21/uoft-mail-merge | aa9f5a763ab06210c91b0033fbc0d61aefd85e62 | c5c8bfa8f3b27b1b4af55581e43173e9f8c9121d | refs/heads/master | 2020-04-16T08:43:31.073222 | 2013-08-09T23:27:55 | 2013-08-09T23:27:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 25 02:21:06 2013
@author: mike
"""
from bs4 import BeautifulSoup
import requests
import csv
from titlecase import titlecase
url = raw_input("Enter a website to extract the URL's from: ")
while url != 'done':
jobid = url.index('JOB_ID=') + 7
endjobid = url.inde... | UTF-8 | Python | false | false | 3,014 | py | 2 | Step 1-scrape.py | 2 | 0.604512 | 0.584273 | 0 | 86 | 34.05814 | 150 |
peteowe/geo | 12,335,146,110,311 | 87d88ee2d0c75b8efe3a56e0eeacf9c5ff1aa609 | efe8529bd4ceb2092531137db14f8953e7e96a9a | /app/command/DownloadCommand.py | 21807944b89356f1a7e4ac1b3b234c6ca7d47aaf | [] | no_license | https://github.com/peteowe/geo | 1badfd3f60297c5715b943772b82cfbe7c2e098e | c75fcd8d5dc5110f607d4dc98708172cf50def61 | refs/heads/master | 2020-07-28T18:01:02.938033 | 2019-09-19T07:16:03 | 2019-09-19T07:16:03 | 209,462,084 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from app.command.Command import Command
class DownloadCommand(Command):
downloader = None
def __init__(self, downloader):
self.downloader = downloader
def execute(self, args):
if len(args) != 3:
raise Exception("Must provide a filename and url to continue")
self.downloader.download(args[2],args... | UTF-8 | Python | false | false | 325 | py | 34 | DownloadCommand.py | 23 | 0.707692 | 0.698462 | 0 | 10 | 31.5 | 68 |
marflodin/adventofcode-2020 | 14,886,356,661,625 | 005d9a0769aead3b73e39433a3adaa1bde4d1707 | 36297b58bedf27422e149e9eb10a39e3f29c0014 | /src/day_4_part_1.py | b64e89ee43fb3d72aa50efb71f42237b2a6079a1 | [] | no_license | https://github.com/marflodin/adventofcode-2020 | fa4711c9ab7010bdc10be58a6c8a4407371b589f | e825a41398ea2f0a527e673c004bcc0b09486aaf | refs/heads/main | 2023-01-24T17:30:48.340870 | 2020-12-09T10:12:55 | 2020-12-09T10:12:55 | 318,784,884 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | with open('../resources/input_day_4.txt', 'r') as input_file:
entries = []
entry = {}
for line in input_file.readlines():
if line in ['\n', '\r\n']:
entries.append(entry)
entry = {}
else:
properties = line.split(' ')
for prop in properties:
... | UTF-8 | Python | false | false | 874 | py | 15 | day_4_part_1.py | 14 | 0.536613 | 0.530892 | 0 | 29 | 29.137931 | 78 |
aaronpmishkin/normalizing_flows | 17,265,768,548,922 | b05647d00cf0b6916dca2e94939e7b289526c60e | 0fa7b9328e04d2ff5a2b607d9ec6962b7ee97532 | /vi_lib/lib/torchutils/code_examples/indgrad.py | c58716b3486982b86f013804d4d48028c6367b9c | [] | no_license | https://github.com/aaronpmishkin/normalizing_flows | 4b12bcbe85f400bb27d21e93d8a3c35d9e5df90c | 249f0d99fee6d07783a2a3a595cfeb439af8c599 | refs/heads/master | 2020-04-09T01:09:40.906963 | 2018-12-14T07:47:08 | 2018-12-14T07:47:08 | 159,893,931 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | r"""
Utility functions to handle parralel computation of individual gradients
"""
import torch
from torch.optim import Optimizer
from torchutils.models import MLP
__all__ = [
]
class MLPIndGrad(MLP):
r"""MultiLayer Perceptron with support for individual gradient computation
"""
def __init__(self, input_size, h... | UTF-8 | Python | false | false | 1,361 | py | 95 | indgrad.py | 66 | 0.676708 | 0.675974 | 0 | 60 | 21.683333 | 85 |
rc-luo/FedML | 3,676,492,005,766 | 3a0984a46165ae2295d5e5163a96e27c5bc40c3f | 4145e7d391cf4296f92ec692d02d6daca25f3bfb | /fedml_api/standalone/decentralized/client_dsgd_toy.py | ebe05dd869ba1f33c32751c2d3ee28b10a7caf25 | [
"Apache-2.0"
] | permissive | https://github.com/rc-luo/FedML | 0ec31b59b8e60f1b884eaef66103aea3890047bd | 2a7cacbf0b74307f9adedcceb3b0fb6f92c41067 | refs/heads/master | 2023-06-17T05:04:00.349345 | 2021-07-10T10:07:39 | 2021-07-10T10:07:39 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
import torch
from fedml_api.standalone.decentralized.client_dsgd import ClientDSGD
class ClientDSGD_Toy(ClientDSGD):
def __init__(self, model, model_cache, client_id, streaming_data, iteration_number,
learning_rate, batch_size, weight_decay, latency, b_symmetric):
# logging... | UTF-8 | Python | false | false | 1,901 | py | 9 | client_dsgd_toy.py | 7 | 0.62809 | 0.627038 | 0 | 52 | 35.576923 | 110 |
peteWT/cec_apl | 10,754,598,146,526 | 123a4c05ad38fd12a7ec54d9106c33c81e35cdc2 | 85a5f0601d22f587bd93d4877d264eb95acd5107 | /Allocation model/Transmodel_v1.py | cf6a6041d16c3a89a54fb2ba911cd16ad222b387 | [
"MIT"
] | permissive | https://github.com/peteWT/cec_apl | 72630abbae0e952b4b2f9bfab040ca77b1c4a08f | 388e0a41178876caae2a52e49c656b3c93adc4d2 | refs/heads/master | 2021-01-16T23:28:28.857446 | 2017-02-19T21:55:52 | 2017-02-19T21:55:52 | 47,349,609 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Deployment model for distributed gasifiers
# Jose Daniel Lara
# Import
from __future__ import division
from pyomo.environ import *
import googlemaps
import datetime
from pprint import pprint
# Replace the API key below with a valid API key.
gmaps = googlemaps.Client(key... | UTF-8 | Python | false | false | 9,499 | py | 55 | Transmodel_v1.py | 33 | 0.658385 | 0.649753 | 0 | 208 | 44.668269 | 151 |
sainttobs/learning_python | 3,917,010,211,402 | f875601de44f366bcc2852cd2923fb8d7919d314 | cb63c72a398c26be68f4c206d24fb4c923e9ba8d | /variables.py | 6d05055ff4b60135689a330e1b80359eb3c80242 | [] | no_license | https://github.com/sainttobs/learning_python | c7891bc5c910d96d8d790d5cf1fbe74bacdc6e2a | 406ab06ef36001ea1a6dbbd62787c519fab5d651 | refs/heads/master | 2020-04-17T02:18:54.300075 | 2019-03-13T00:40:20 | 2019-03-13T00:40:20 | 166,128,480 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # simple python tutorial learning how to assign values to variables.
firstName = "Adeyefa"
lastName = "Oluwatoba Adegoke"
age = 19
print (firstName)
print (lastName)
print (age) | UTF-8 | Python | false | false | 178 | py | 25 | variables.py | 24 | 0.764045 | 0.752809 | 0 | 8 | 21.375 | 68 |
truonghoanghuy/handwritten-text-recognition | 2,388,001,832,775 | 57fda2e9bc2048cdc361988e3acdaf58b98499ca | 9701b8b6d8ef262e4909e37ce452467b82349da9 | /lf/lf_loss_function.py | 15cd57f850e03fdb02df00dfb365e8ff6c5eff5d | [] | no_license | https://github.com/truonghoanghuy/handwritten-text-recognition | 61f826fdfd21b2b9ef5f3ce1ba8112c0e8988b65 | d6ff66aee01744a36bd8de13e84870814b698d26 | refs/heads/master | 2022-11-16T17:37:20.181799 | 2020-07-12T08:39:27 | 2020-07-12T08:39:27 | 173,250,718 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import List, Optional, Dict
import torch
from torch.nn import Module
from lf import lf_loss
from utils import string_utils, error_rates
def calculate(lf_model: Module, input, dtype: torch.dtype, device: torch.device,
train=True, hw: Optional[Module] = None, idx_to_char: Optional[Dict] = No... | UTF-8 | Python | false | false | 1,994 | py | 94 | lf_loss_function.py | 84 | 0.615346 | 0.606319 | 0 | 44 | 44.318182 | 105 |
thisismyrobot/twitter-ebook | 15,247,133,913,725 | a0a42b21bebfe9f9174ec61d667f9a7de739c9cb | cba0aef9e65e7e59d002de3bba369b81baf59974 | /tools.py | 92589c353a5881bc2fa9529d724384e0c7a74d94 | [
"Unlicense"
] | permissive | https://github.com/thisismyrobot/twitter-ebook | aa3dc8636f57ecaadcde6f050799d4b48e3aa73a | dbbb94f999abd3affda0b84afabe6be8318bcd24 | refs/heads/master | 2021-01-21T13:11:10.036089 | 2016-05-16T07:56:40 | 2016-05-16T08:11:10 | 48,943,008 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Twitter/tweet tools."""
import HTMLParser
import itertools
import re
import string
def normalise(word):
"""Normalise a word for frequency lookups."""
# Remove anything except a-z and &.
word = re.sub(r'[^\w&]', '', word)
return word.lower()
def tidy(tweet):
"""Tidy a tweet."""
# Ensure it... | UTF-8 | Python | false | false | 1,511 | py | 10 | tools.py | 6 | 0.561218 | 0.561218 | 0 | 53 | 27.509434 | 70 |
mk200789/pascal_compiler | 19,292,993,097,763 | 72605445622f42fe300d6d1f0d8737ccad273306 | dd95ff24e5aee2a621b13e448854c96ff039f114 | /compiler/simulator.py | b4ba6df832f1c86b1c74d40a6d993a28a81da169 | [] | no_license | https://github.com/mk200789/pascal_compiler | 115812d4cd8eb364161ae141ca3613a1543cb021 | 7c9030bf897dfe15e7d2576e589901d70d6716c5 | refs/heads/master | 2020-12-24T15:05:19.652205 | 2014-12-31T04:53:13 | 2014-12-31T04:53:13 | 24,251,422 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #code for simulator will be placed here
import sys
class Simulator(object):
def __init__(self, symtable, d_nodes, stack = [], ip=0):
self.symtable = symtable
self.d_nodes = d_nodes
self.stack = stack
self.ip = ip
def simulate(self):
while(1):
print str(self.ip) + ": [" + str(self.d_nodes[self.ip]['i... | UTF-8 | Python | false | false | 4,498 | py | 11 | simulator.py | 4 | 0.588039 | 0.571143 | 0 | 175 | 24.697143 | 125 |
akshay-sharma1995/CMU_DeepRL_course | 5,531,917,917,288 | c2ce80788e01bb85fc37f3697a0bde1cfc52c5d3 | 466c687ad90a356e1b7811bc337328fcb00f0247 | /hw2/hw2-VI-PI-DQN/Q3-3-DQN/codes/DQN_Implementation.py | 9d46496067461a6f6fd8170b023476acef1c95a2 | [] | no_license | https://github.com/akshay-sharma1995/CMU_DeepRL_course | a0088a8da229a1c4a380abf0a6e4b125b13660cd | bb973312216531a9916568c84e05bb0a685ed547 | refs/heads/master | 2022-03-26T19:40:47.172671 | 2019-12-28T13:18:40 | 2019-12-28T13:18:40 | 211,947,146 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import numpy as np
import gym
import sys
import copy
import os
import random
import pdb
import torch
import torch.nn as nn
import torch.nn.functional as F
from tensorboardX import SummaryWriter
from utils import Replay_Memory
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu"... | UTF-8 | Python | false | false | 8,153 | py | 26 | DQN_Implementation.py | 13 | 0.572182 | 0.564823 | 0 | 198 | 40.171717 | 128 |
podgef/euler | 2,113,123,951,596 | f05d730fceacf3de4d884381c8ace39659df20e9 | 96ae3fef2fe458d17b0ca8442c85cf175cfc4a0b | /35.py | 1699e38a497336b730fbea7ed69e75c040fe8d52 | [] | no_license | https://github.com/podgef/euler | c8b0fe613a821b24eb9d914c1804079ece05a742 | 2add8d31d1cc2557d74904acc7d91b2f1085c4e2 | refs/heads/master | 2016-09-08T03:24:22.250602 | 2014-07-20T20:49:47 | 2014-07-20T20:49:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#Padraic Flood <podge.pi@gmail.com>
from prime import get_primes
from prime import is_prime
primes = get_primes(1000000)
cirs = 0
prev_circ = []
for prime in primes:
s = str(prime)
for i in range(1, len(s)):
if not is_prime(int(s[i:] + s[:i])):
break
else:
... | UTF-8 | Python | false | false | 346 | py | 59 | 35.py | 59 | 0.595376 | 0.566474 | 0 | 21 | 15.47619 | 44 |
pixelink-support/pixelinkPythonWrapper | 14,645,838,517,184 | 73f0f676741460badae10662107ce146a069779c | b381ae027aff7ac7d3c32993072e7a029b036150 | /samples/Windows/eventCallback.py | 1c65e1e09634cc498a15802defc3107323552e37 | [
"MIT"
] | permissive | https://github.com/pixelink-support/pixelinkPythonWrapper | f0040fb4c89aff33efba03da7a95253a276c30d8 | 3f5d4f28c8730debe4e774ceedbbd31c75f85c1d | refs/heads/master | 2022-10-11T10:19:02.191089 | 2022-09-09T18:51:46 | 2022-09-09T18:51:46 | 254,446,479 | 13 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
eventCallback.py
Demonstrates how to use event callbacks
"""
from pixelinkWrapper import*
import time
import msvcrt
STALL_TIME = 20 # 20 seconds
EXIT_SUCCESS = 0
EXIT_FAILURE = 1
"""
Callback function called by the API with each event (of interest) reported by the camera.
N.B. This is call... | UTF-8 | Python | false | false | 2,675 | py | 41 | eventCallback.py | 40 | 0.622056 | 0.610841 | 0.000374 | 89 | 28.05618 | 116 |
Amiao-miao/all-codes | 14,654,428,444,828 | 4a053dd714c7f41115f35889e0125630cf715bd7 | 568d7d17d09adeeffe54a1864cd896b13988960c | /project_blog/day02/ddblog/topic/urls.py | d5009b12714fda48ede011e6f70361f66e5b5282 | [
"Apache-2.0"
] | permissive | https://github.com/Amiao-miao/all-codes | e2d1971dfd4cecaaa291ddf710999f2fc4d8995f | ec50036d42d40086cac5fddf6baf4de18ac91e55 | refs/heads/main | 2023-02-24T10:36:27.414153 | 2021-02-01T10:51:55 | 2021-02-01T10:51:55 | 334,908,634 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('<str:author_id>',views.TopicView.as_view()),
] | UTF-8 | Python | false | false | 122 | py | 284 | urls.py | 274 | 0.696721 | 0.696721 | 0 | 6 | 19.5 | 54 |
AngaKoko/py_test | 3,126,736,214,494 | 831da0fbaaca22215fdd6de6de4ace8b89efac0f | d2946fdac3b4508788926b09598e29be7d3262e8 | /test_nearest.py | e1dcff9f59d335f3bae9a73f618735dfea31db1d | [] | no_license | https://github.com/AngaKoko/py_test | 8d22420c90160e9a67901d2535d0aca580579c89 | 5ab748976652fed20de7580814af6ad296d8d8ca | refs/heads/master | 2022-10-08T18:08:44.118690 | 2020-06-08T09:49:33 | 2020-06-08T09:49:33 | 270,612,146 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from nearest import nearest_square
def test_nerest_square_5():
assert(nearest_square(5)) == 4
def test_nearest_squaare_12():
assert(nearest_square(-12) == 0) | UTF-8 | Python | false | false | 167 | py | 2 | test_nearest.py | 2 | 0.694611 | 0.646707 | 0 | 7 | 23 | 36 |
giladsc19-meet/C-Users-schur-PycharmProjects-Gp--version-2 | 3,856,880,647,344 | 3d96f2e70816a4f227178c38183b1dba9dffb196 | 490fe81f02faa1f340420a5ae09b6e16822f5eb9 | /server.py | a7e4ce4886e67b14cee6d047e8d59e9128f56ee0 | [] | no_license | https://github.com/giladsc19-meet/C-Users-schur-PycharmProjects-Gp--version-2 | 20960626134e45510b4a5283f17c9264920152cc | f59add075d0a8673334cacecdcd85ea884cba4d0 | refs/heads/master | 2022-08-25T16:32:54.728443 | 2020-05-26T12:33:30 | 2020-05-26T12:33:30 | 267,037,472 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from database import *
from socket import socket
from select import select
from ssl import create_default_context, Purpose
# the 'server.py' directory responsible for getting data from other sockets and send them data in exchange. it
# cooperates with the 'analyze.py' directory that contains all the function tha... | UTF-8 | Python | false | false | 3,181 | py | 9 | server.py | 8 | 0.655769 | 0.650739 | 0 | 81 | 37.271605 | 120 |
SaberShip/clustering_fun | 8,443,905,733,571 | a02ebed7ec5c298c3ad34e267620db5bec6e8914 | bbdfcc0c81c858401839754e2eb161fafa03a2ad | /kmeans.py | 53a12aa5eafbf5b6179e44781eab0e76964274f4 | [] | no_license | https://github.com/SaberShip/clustering_fun | 3076475b260c10f0355dafd4d42bfebd08d0eca1 | 4004d16dd4bee708a63a909fd3dba879bf626179 | refs/heads/master | 2023-03-30T14:28:07.694421 | 2021-04-12T03:23:21 | 2021-04-12T03:23:21 | 357,042,983 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import sys
import csv
import random
import math
import location
import numpy as np
import matplotlib.pyplot as plt
from operator import itemgetter
from haversine import haversine, Unit
class KMeans():
def __init__(self, data, k, verbose, dist_limit=None):
self.data = data
s... | UTF-8 | Python | false | false | 3,401 | py | 4 | kmeans.py | 3 | 0.583064 | 0.579241 | 0 | 105 | 31.4 | 119 |
jack-virus/mrjack-v | 11,458,972,763,606 | 9dfeb1e3984b8c4c598e18adfb0e77b3672096a0 | 19a34f53faa1eeea9d31dda75fe68eb6a0289714 | /mrjack.py | 70dcbb53de4c51d75c69dd55bdf7926008c2e319 | [] | no_license | https://github.com/jack-virus/mrjack-v | 5e5977d292d939e0cae400d4682f3a3ee29937f7 | 8af0576b17508102258750fadefbaf61624cc50a | refs/heads/master | 2020-06-01T20:16:47.629769 | 2019-06-08T17:36:14 | 2019-06-08T17:36:14 | 190,914,651 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print("ډٱډ جُـ‘ـُٱكُـ‘ـُ ٱبُـ‘ـُنُـ‘ـُ رٱيسُـ‘ـُنُـ‘ـُډ")
print("choose frome the list")
print("1)android 2)micro 3)iphone 4)contact")
x = int(input("Please enter an integer: "))
if x == 1:
print("https://mega.nz/#F!nboHVaAC!GE-zyldXCcfCTuN_HxY-mA")
elif x == 2:
print("https://mega.nz/#F!yPAwUQ7A!GIcegj... | UTF-8 | Python | false | false | 551 | py | 2 | mrjack.py | 1 | 0.65 | 0.61 | 0 | 13 | 36.461538 | 63 |
Aasthaengg/IBMdataset | 8,126,078,125,805 | 2603a173bbfd6513f647405af4f3ac1b14afd79b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03409/s269074863.py | 7d95b406b1861f3126d8296b990895ec0464ab6b | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | N = int(input())
P = [[0, 0, 0]for _ in range(2*N)]
for i in range(N):
x, y = map(int, input().split())
P[i] = [0, x, y]
for i in range(N):
x, y = map(int, input().split())
P[N+i] = [1, x, y]
P.sort(key=lambda x: x[1])
cnt = 0
for i in range(2*N):
if P[i][0] == 0:
continue
else:
... | UTF-8 | Python | false | false | 651 | py | 202,060 | s269074863.py | 202,055 | 0.35023 | 0.308756 | 0 | 26 | 24.038462 | 60 |
minisaki/riskid_rest_framework | 13,116,830,164,788 | 3c5d4f5203f701604d70a800802208e89f92d909 | 8b9e781dca36ea5080c51e31e739ad9f9fbbe231 | /webapp/migrations/0007_customerorder_customuser_id.py | 9a903abb42c2003d626ac5c19567c4ac623f902b | [] | no_license | https://github.com/minisaki/riskid_rest_framework | 9e9005aee2a8bcee0a165a9a44f61ba9acb15b0e | 8d4216b557d50d8cef025bbb2be77e653d8a4333 | refs/heads/master | 2023-05-13T15:09:40.251904 | 2021-06-09T15:51:34 | 2021-06-09T15:51:34 | 366,133,299 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.2 on 2021-04-25 15:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('webapp', '0006_auto_20210425_2224'),
]
operations = [
migrations.AddField(
model_name='customeror... | UTF-8 | Python | false | false | 531 | py | 19 | 0007_customerorder_customuser_id.py | 19 | 0.634652 | 0.574388 | 0 | 20 | 25.55 | 117 |
biocore/american-gut-web | 10,368,051,065,082 | 979837d889cd33a57d24aa491bf694cd367266de | 9763f5afff394c50221bda2cfad7938acdb5abac | /amgut/lib/startup_tests.py | 5b50db3b7c712c18900389b320388b92570b6334 | [
"BSD-3-Clause"
] | permissive | https://github.com/biocore/american-gut-web | 501336883bc0213287edb26e300864d984c06d5d | 0edf4fd621b04d1de8768ed154864825904d0638 | refs/heads/master | 2023-06-07T20:52:34.593532 | 2019-11-19T22:42:43 | 2019-11-19T22:42:43 | 22,621,149 | 5 | 16 | BSD-3-Clause | false | 2023-05-25T17:08:42 | 2014-08-04T21:47:22 | 2021-01-15T16:19:00 | 2023-05-25T17:08:42 | 227,574 | 5 | 24 | 56 | Python | false | false | from amgut.lib.data_access.sql_connection import TRN
from os import listdir
from os.path import join, dirname, abspath
def startup_tests():
"""Wrapper function for calling all tests needed before startup"""
patch_number()
barcodes_correct()
def patch_number():
# Make sure the system is using the lat... | UTF-8 | Python | false | false | 1,315 | py | 161 | startup_tests.py | 116 | 0.615209 | 0.596958 | 0 | 36 | 35.527778 | 78 |
eridanvilas/Projeto_Django_1 | 3,693,671,893,914 | 623ec962ab62358e54a1064b3ff8ffd3d3948417 | 2446551f72dd6ce86807ce8702d3d4b6e196f975 | /cestabasica/Cestabasica/__init__.py | ed26ab74f059ee60c1e8cdde263202ade6f35837 | [] | no_license | https://github.com/eridanvilas/Projeto_Django_1 | 955705a982b77febb5c1dcc4e8046abfd1fbd158 | 676e820300db366ccca6dbfdc9df2b51f5d01b1a | refs/heads/master | 2023-01-05T20:55:48.106528 | 2021-09-22T03:23:48 | 2021-09-22T03:23:48 | 240,088,379 | 1 | 0 | null | false | 2022-12-27T15:37:10 | 2020-02-12T18:45:34 | 2021-09-22T03:23:51 | 2022-12-27T15:37:09 | 953 | 1 | 0 | 3 | JavaScript | false | false | """
Package for Cestabasica.
"""
| UTF-8 | Python | false | false | 34 | py | 20 | __init__.py | 8 | 0.617647 | 0.617647 | 0 | 3 | 10 | 24 |
FweiGao/VascularGraph | 15,977,278,380,788 | 925455e76b57b24508e0627b51bef5e0c8cb91dd | 3194fef7e32993b2383fa4e556bec5865c835c96 | /VascGraph/Extra/graphsVal.py | 721bb1ae4228102e68047854d7a2f0848a9431af | [
"MIT"
] | permissive | https://github.com/FweiGao/VascularGraph | 35719ec5b344a3187806c17d7f48338e8214651c | 9843c2ce1ef1e3d707061c4b14032bd060d7295a | refs/heads/master | 2023-08-28T09:16:49.262366 | 2020-12-04T02:46:52 | 2020-12-04T02:46:52 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 31 15:27:18 2018
@author: rdamseh
"""
from util_validation import *
import scipy as sc
import seaborn as sns
sns.set_style('darkgrid')
def setC(s='full'):
if s=='full':
e=mlab.get_engine()
c=e.current_scene
c.scen... | UTF-8 | Python | false | false | 4,494 | py | 87 | graphsVal.py | 80 | 0.598353 | 0.490654 | 0 | 136 | 31.830882 | 97 |
redystum/Spam-Bot | 627,065,244,336 | 77ddc0a1338c4caa1721e5b64dbe94941ce54da9 | e7a000a1f887e41d7d84be9599041f74308a0df3 | /spam_bot.py | 262d0e65dbebcf8f63b6a461de507f74886c1ddf | [] | no_license | https://github.com/redystum/Spam-Bot | 016c071e4733652e76a58477f9316ca5d9435b3b | af11780e627c17e2fe7258905d93a14ecf75fb3e | refs/heads/main | 2023-07-25T00:43:19.774417 | 2021-08-30T17:07:54 | 2021-08-30T17:07:54 | 396,119,160 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
import time
import pyautogui
import pyperclip
root = Tk()
root.geometry("600x750")
root.resizable(0, 0)
root.title("Spammer")
root.configure(bg='#2e2e2e',cursor="dot")
def starting():
num = x.get()
try:
int(num)
except ValueError:
Label(root, t... | UTF-8 | Python | false | false | 1,919 | py | 2 | spam_bot.py | 1 | 0.587285 | 0.549766 | 0 | 70 | 25.442857 | 113 |
mikudehuane/FedLaAvg | 13,194,139,552,534 | d10f7a92f17883a188e7fcdac30453c86935c71d | 9e58b1f380eae12907db9be7a68c7e07a19e259c | /common.py | f9f1bc2ce06584bb8fc0f397b4873415268e00ad | [] | no_license | https://github.com/mikudehuane/FedLaAvg | 4e298dc2846472489ce3f59f46260c24e266fa24 | 7ffc5668bec340f16952ed374e1fd717c2810752 | refs/heads/main | 2023-05-23T11:58:40.948642 | 2023-05-09T12:49:55 | 2023-05-09T12:49:55 | 306,807,969 | 8 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os.path as osp
import os
import torch
from config import project_dir, use_cuda
cifar10_classes = ('plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
raw_data_dir = osp.join(project_dir, 'raw_data')
data_cache_dir = osp.join(project_dir, 'data')
cache_fd = osp.join(project_dir, 'c... | UTF-8 | Python | false | false | 1,762 | py | 21 | common.py | 17 | 0.719637 | 0.684449 | 0 | 53 | 32.245283 | 98 |
davikawasaki/password-manager-security-class | 4,827,543,281,053 | b87702f3748f9c467bb355764316a3850646f69f | 7bde08eeed0e6132958b56f60fb0a73c493e8b1a | /python/app/controllers/CommonClass.py | 9574e78f2e2f67bce4c9949f15a485ade9583d0e | [
"MIT"
] | permissive | https://github.com/davikawasaki/password-manager-security-class | 20dbb894f1dada87eb5c16a36a32efa24f85eba9 | b150906e6c8bf4bc94502c37912e4b7042fc8934 | refs/heads/master | 2021-07-25T23:17:43.376747 | 2021-07-18T11:19:20 | 2021-07-18T11:19:20 | 103,836,007 | 7 | 0 | MIT | false | 2021-07-18T11:14:06 | 2017-09-17T14:39:58 | 2021-07-18T11:13:48 | 2021-07-18T11:14:05 | 1,302 | 5 | 0 | 1 | Python | false | false | import htmlPy
import datetime
import time
import os
from Crypto.Protocol import KDF
from Crypto.Cipher import AES
import hashlib
KEY_LENGTH = 32
class Common(htmlPy.Object):
""" Common service class with cryptography methods.
The class Common can be used to implement any common methods between controllers.
... | UTF-8 | Python | false | false | 4,448 | py | 34 | CommonClass.py | 16 | 0.566996 | 0.560252 | 0 | 122 | 35.467213 | 159 |
JLoppert/HackerRank | 9,431,748,198,791 | 90470c7a400f298360aadea740b0e9327ad0878c | eb0a035dc3c725127fcc63d5e8cfad782381684e | /Algorithms/Warmup/manasa-and-stones.py | e0e60780334eeef7ec97b883586ba409f1226c6b | [] | no_license | https://github.com/JLoppert/HackerRank | 0a310eaaa34beb9a420c5bdb10fbf78ce6270a5e | 77ef52942512a1f4f50bce11a09052c453bedbe9 | refs/heads/master | 2016-09-10T15:36:51.446328 | 2014-08-25T03:31:31 | 2014-08-25T03:31:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math;
cases = int(input());
for case in range(cases):
stones = int(input());
a = int(input());
b = int(input());
s = set([0]);
for index in range(stones-1):
temp = set();
for elm in range(len(s)):
curr = s.pop();
temp.add(curr+a);
temp.ad... | UTF-8 | Python | false | false | 505 | py | 38 | manasa-and-stones.py | 37 | 0.425743 | 0.419802 | 0 | 26 | 18.461538 | 42 |
MadhavPruthi/SCC-Website | 11,312,943,878,857 | 829f05c488b52513e49e9103428ac64e42e5137f | d6a07545ca3350fe060b1274b7205c0ff7f52c66 | /appointment/admin.py | 6405fe1a293328a53ca8770959439bb26b152678 | [] | no_license | https://github.com/MadhavPruthi/SCC-Website | 0865e03975fe31cf5c6f3c6148754799f5dab2fa | f728a681e4e0ab9f7b358b0e7c181189d26d22bd | refs/heads/master | 2022-12-12T22:38:12.557753 | 2020-02-13T10:28:39 | 2020-02-13T10:28:39 | 226,687,464 | 0 | 0 | null | false | 2022-12-08T03:18:10 | 2019-12-08T15:20:07 | 2020-02-13T10:28:49 | 2022-12-08T03:18:10 | 11,567 | 0 | 0 | 3 | CSS | false | false | from django.contrib import admin
from appointment.models import Appointment
admin.site.register(Appointment)
| UTF-8 | Python | false | false | 111 | py | 33 | admin.py | 17 | 0.846847 | 0.846847 | 0 | 5 | 21.2 | 42 |
omkar-javadwar/CodeWars | 17,669,495,461,737 | 3ff6867f834a6d468bc3e10ea10f2417a7057bf5 | 9302b8d21b93bf7ee7d9bcf8d44ba963bf7a4240 | /katas/kyu_7/Sum_of_the_first_nth_term_of_Series.py | 2b6e3c45ba6b770415c633569d4db61f4b185b09 | [
"MIT"
] | permissive | https://github.com/omkar-javadwar/CodeWars | ec15643dadcf409cba2af608b374642f9826bacb | 83540dc963b151163ba81d886ab6b3ccbe6442b6 | refs/heads/master | 2023-09-01T22:04:49.931940 | 2021-10-30T15:51:17 | 2021-10-30T15:51:17 | 258,919,537 | 0 | 1 | MIT | false | 2021-10-30T15:51:17 | 2020-04-26T02:21:09 | 2021-10-30T15:42:26 | 2021-10-30T15:51:17 | 228 | 0 | 1 | 0 | Python | false | false | # https://www.codewars.com/kata/555eded1ad94b00403000071/train/python
'''
Instructions:
Task:
Your task is to write a function which returns the sum of following series upto nth term(parameter).
Series: 1 + 1/4 + 1/7 + 1/10 + 1/13 + 1/16 +...
Rules:
You need to round the answer to 2 decimal places and return it as S... | UTF-8 | Python | false | false | 699 | py | 138 | Sum_of_the_first_nth_term_of_Series.py | 137 | 0.666667 | 0.569385 | 0 | 26 | 25.884615 | 100 |
taltil/Sudoku | 4,320,737,123,345 | 15a7405606718c38e0456e96944cf21fb4bc9fee | 6b74561adbb55d99977669eb000820538c3d86ad | /main.py | a4eab13c85a2b8be2d021d290548f05f3bb57033 | [] | no_license | https://github.com/taltil/Sudoku | 02ffa1a0bb894005b7830b11d060f92e75413b6a | b8ea0d1f1e0b8fe28fabe4a0008a938d11c8e859 | refs/heads/master | 2021-09-14T12:04:11.474671 | 2018-05-13T10:28:11 | 2018-05-13T10:28:11 | 124,799,529 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from SudokuUI import *
root = Tk()
app = SudokuUI(root, 'board.txt')
root.title('Sudoku Game')
root.mainloop()
| UTF-8 | Python | false | false | 112 | py | 6 | main.py | 5 | 0.696429 | 0.696429 | 0 | 6 | 17.666667 | 33 |
isysc1/django_project | 18,305,150,624,658 | caa62458ec7fcb784f285a2f1a4a8648f647ca8e | f04c5d67300b77137ca96789fb135cb315d671be | /utils/__init__.py | 85f795019e589f67b2585359f7bbb288e37b9a67 | [] | no_license | https://github.com/isysc1/django_project | 6e8dc510ebc068ee6213ceb7d7fefbae1544882d | 64aae255136f0077566a0de87b636eb6a0e4571d | refs/heads/master | 2020-06-08T15:16:11.209624 | 2019-06-27T12:45:06 | 2019-06-27T12:45:06 | 193,249,691 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Created by Young on 2019/6/25 16:43
"""
| UTF-8 | Python | false | false | 47 | py | 17 | __init__.py | 14 | 0.574468 | 0.340426 | 0 | 3 | 13.666667 | 35 |
MarcelArthur/leetcode_collection | 17,128,329,611,498 | a186dcb74d0a7f018ccc3c0574c4f6829bc45e4a | 6b43695ca4a86d8f1a57268a7f8cb7c138ef5771 | /984_String_Without_AAA_or_BBB.py | 9ed13b428ff5b28846763be52d92fb41b1c45f31 | [] | no_license | https://github.com/MarcelArthur/leetcode_collection | bd3a8a23f3095fbea79831e6a6ea4c515bddfd7c | a39280ab6bbbf3b688a024a71ef952be5010d98e | refs/heads/master | 2021-11-23T15:40:21.874639 | 2021-11-20T16:15:17 | 2021-11-20T16:15:17 | 110,528,906 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!python3
"""
Given two integers A and B, return any string S such that:
S has length A + B and contains exactly A 'a' letters, and exactly B 'b' letters;
The substring 'aaa' does not occur in S;
The substring 'bbb' does not occur in S.
Example 1:
Input: A = 1, B = 2
Output: "abb"
Explanation: "abb", "bab" and "bba" ... | UTF-8 | Python | false | false | 1,528 | py | 259 | 984_String_Without_AAA_or_BBB.py | 258 | 0.487062 | 0.464231 | 0 | 58 | 21.62069 | 81 |
WillyWilsen/KU1102-Praktikum-Pengenalan-Komputasi | 1,821,066,137,884 | 2cb850764cd2834d37bcc248ef74fb74e3121e62 | 3af1c386c2d6bd42d66973de33a3fe0c64998abb | /src/Tugas Praktikum/P04_16520145_02.py | 8831182d7574bfe3bde1c3ebcf2d0564cc0e7f72 | [] | no_license | https://github.com/WillyWilsen/KU1102-Praktikum-Pengenalan-Komputasi | c98bf23d07a18c1a55bb9cc31ed4ae139b924081 | 249354c03f1f7b8a041a61ac07d63bf49cb7c955 | refs/heads/main | 2023-08-11T14:09:14.360825 | 2021-10-10T18:52:08 | 2021-10-10T18:52:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Nama : Willy Wilsen
# NIM : 16520145
# Tanggal : 2 Desember 2020
# Deskripsi : Membuat program mengeluarkan matriks yang berisi angka-angka
# KAMUS
# A : int
# B : int
# T : matriks
# ALGORITMA
A = int(input("Masukkan jumlah baris matriks: ")) # input A
B = int(input("Masukkan jumlah kolom matriks: ")) # input B
T ... | UTF-8 | Python | false | false | 3,173 | py | 31 | P04_16520145_02.py | 24 | 0.325244 | 0.29751 | 0 | 87 | 35.471264 | 107 |
sahaia1/python | 11,166,914,993,952 | d0713073039f5df3404a063640d7aa0f80b9f6bd | 77041bd6b1225c01ad123ac6eeab11f635dd9560 | /gcd.py | efac33ed6bf992bc8eb05baf7246eaaf345e0b0c | [] | no_license | https://github.com/sahaia1/python | 8434aeec41b8461f29bcc37916108b584b7aa89c | 0563d6d432c4a89c876258e40b7c4c80669ee4c3 | refs/heads/master | 2020-12-31T07:55:36.572446 | 2015-12-23T06:12:52 | 2015-12-23T06:12:52 | 47,989,397 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
def gcd(m, n):
if m > n:
larger = m
smaller = n
else:
smaller = m
larger = n
while True:
if larger % smaller == 0:
return smaller
else:
r = larger % smaller
larger = smaller
smaller = r
def euclid_gcd(a, b):
if a > b:
m = a
n = b
else:
... | UTF-8 | Python | false | false | 1,282 | py | 26 | gcd.py | 26 | 0.49454 | 0.482059 | 0 | 67 | 18.134328 | 80 |
desgyz/MultiMonit | 7,722,351,204,453 | 9714a843abe463fc3814cee2b81938832270ad54 | fc41d1b7949301b31556acfefcdd2c52fd895a4e | /controllers/base.py | 55f0802b94aad2229af614a2861c146f546f534a | [] | no_license | https://github.com/desgyz/MultiMonit | 21182b9c2f67398ee626420f35eb8baa6f5bd69f | ebc64a932f9e87b045a565fdf3300f7b6e23b412 | refs/heads/master | 2021-05-04T11:27:56.162524 | 2016-02-28T12:22:52 | 2016-02-28T12:22:52 | 51,357,985 | 4 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import inspect
import cherrypy
from jinja2 import Environment, FileSystemLoader, TemplateNotFound
from controllers.jinjahelper import JinjaHelper
from models.loghelper import Logger
class BaseController:
def render_template(self, path, template_vars=None):
template_vars = template_vars if template_vars el... | UTF-8 | Python | false | false | 1,638 | py | 16 | base.py | 10 | 0.622711 | 0.620879 | 0 | 36 | 44.5 | 89 |
Aasthaengg/IBMdataset | 4,681,514,367,553 | 8817ce3f77c84e692a0f4a46c6d52bb9005a5d7c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02628/s362193022.py | e87e9fcbd77032044050c2062ff678d78bac50f8 | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
N, K = map(int, input().split())
a = input().split()
a = list(map(int,a))
a.sort()
b = sum(a[:K])
print(b)
| UTF-8 | Python | false | false | 112 | py | 202,060 | s362193022.py | 202,055 | 0.517857 | 0.517857 | 0 | 10 | 10.1 | 32 |
tsunammis/software-craftsmanship | 15,487,652,096,836 | cc70dad88e08282db1bf21174558f7504912afda | a3f1f4f558d9d6340865e9c08f301bc627c961e2 | /development/python.py | 32bd7e64e3dca2f6531e45852be514e1a72aca0c | [
"MIT"
] | permissive | https://github.com/tsunammis/software-craftsmanship | 0793641fcf0e53ecf71295b2fcb7513630289585 | e5631ac431fbe13d6814aa2c2c18b602e564da0f | refs/heads/master | 2020-12-24T16:34:01.294869 | 2018-06-15T13:00:48 | 2018-06-15T13:00:48 | 35,549,841 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
High quality resources
- https://github.com/vinta/awesome-python
- Manage CLI -> http://plumbum.readthedocs.org/en/latest/
- Create tasks -> http://www.pyinvoke.org/
- https://automatetheboringstuff.com/
PEP 8 is the de-facto code style guide for Python.
pip install pep8
$ pep8 optparse.py
optpar... | UTF-8 | Python | false | false | 11,728 | py | 25 | python.py | 21 | 0.675136 | 0.67002 | 0 | 249 | 46.100402 | 150 |
luizolima/estudo-python | 7,765,300,889,493 | da2345bd7df2645c24bc00fd4cb6f7b15472e93c | 6022301811e6900b44062341943e6edc2cf13052 | /66-seek_e_cursors.py | 1d091c6ad1d60a373d305420e314a3298c07d4b5 | [] | no_license | https://github.com/luizolima/estudo-python | 780b7c94da9afa4e9b1f3599edf1667ce0d7da04 | fec2fec1114c23aef273007fcb6a0d66e3bcfed3 | refs/heads/main | 2023-06-08T11:12:13.816088 | 2021-06-28T02:43:38 | 2021-06-28T02:43:38 | 361,577,869 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Seek e Cursors
seek() -> Utilizada para movimentar o cursor pelo arquivo.
arquivo = open('texto.txt', encoding='UTF-8')
print(arquivo.read())
# A função seek() é utilizada para movimentação do cursor pelo arquivo. Ela recebe um
# parâmetro que indica onde queremos colocar o cursor.
# Movimentando o cursor pelo ... | UTF-8 | Python | false | false | 1,956 | py | 33 | 66-seek_e_cursors.py | 25 | 0.733541 | 0.726283 | 0 | 82 | 22.52439 | 93 |
iufl/Geo_Classifier | 2,611,340,144,510 | ecf5080f500c9c21b868b3e659f03a18eb70eba0 | c98097efa0d4fde7a5521044e4b06928e6e7f077 | /Predefined Labels - Biologic Process.py | 9a7358566451178965be8b42d314c9489198de3b | [] | no_license | https://github.com/iufl/Geo_Classifier | 99f7ce3c0b2a31c4c4a1654ad87c406f76c1e9dd | 12d08fd5875feed1fb5441f8f63b8856e9fb1b8b | refs/heads/master | 2020-07-31T15:00:26.232417 | 2020-03-31T06:46:55 | 2020-03-31T06:46:55 | 210,644,449 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
cellular_process_info = ['cell', 'adhesion', 'communication', 'signal_transduction', 'extracellular_stimulus', 'hormone_secretion',
'intracellular_signaling_cascade', 'enzyme_linked', 'receptor_protein', 'small_GTPase-mediated_signal_transductio... | UTF-8 | Python | false | false | 1,469 | py | 23 | Predefined Labels - Biologic Process.py | 1 | 0.651464 | 0.650102 | 0 | 22 | 65.5 | 157 |
Akilan10/Python-bootcamp | 5,033,701,679,478 | 13518335657f152d7e6c3949757fc63c3f500150 | 282c56aafeb96c7c306aa69e038d2a69c14c273a | /Day-14 task.py | 1673c3926bcc0bd2f2e3e2bd41ff56946daef738 | [] | no_license | https://github.com/Akilan10/Python-bootcamp | 1e12f3ef5fb545ff7e68a3743ca1e43c1c3678ab | ccd29b55849e92ec9519371352a79e5dd0c84136 | refs/heads/main | 2023-06-16T08:05:41.348161 | 2021-07-16T05:27:58 | 2021-07-16T05:27:58 | 376,889,048 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 1
# Name error
list=12
print(list1)
# Type error
a='123'
a+=123
# Syntax error
for i range(1,10):
print(i)
# index error
l=[1,2,3,4,5,56,6,7]
for i in range(len(l)):
print(l[i+1])
# Module not found error
import numpys
# Key error
dict1=dict()
dict1={1:12,11:12,13:14}
print(dict1... | UTF-8 | Python | false | false | 1,394 | py | 23 | Day-14 task.py | 23 | 0.480631 | 0.43759 | 0 | 76 | 16.368421 | 44 |
pesfahanian/ML_API | 8,899,172,248,547 | aa63af4115e85b9332df60519aef9610d1714c6d | f2e151cd8e7e927941ab90e56015258744fe2bfc | /API/dashboard/routers.py | 7f313fa447bbb4d0a7b5a3eec37f625800e6537a | [] | no_license | https://github.com/pesfahanian/ML_API | 10adfd135ec061ef5c140a63bfd474f515a742c3 | e17daa214f4bc8394e9bc096aca6a04b0fba04e9 | refs/heads/master | 2023-05-26T04:10:37.102786 | 2021-06-02T15:25:12 | 2021-06-02T15:25:12 | 306,056,646 | 6 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from datetime import datetime
from fastapi import APIRouter, HTTPException
from .urls import DASHBOARD_ENDPOINT
from authentication.decorator import authentication
from database.usersdb import users_database, users
from utils.security import make_hash
from utils.misc import user_credentials
logger ... | UTF-8 | Python | false | false | 8,175 | py | 36 | routers.py | 28 | 0.599388 | 0.593517 | 0 | 241 | 32.921162 | 81 |
xiawy/common_summary | 1,752,346,662,048 | 9ef54acd8a735abf95046b44a76704c0584d5968 | f7be5f0acf23bff29992fa0a383558a01aa76ee4 | /algorithm/search_algorithm.py | 0426acec70ac4f589805ac3a705c417b8fd5cfa6 | [] | no_license | https://github.com/xiawy/common_summary | ecd3997a72b4900ac24a1a439aab1f47a6ae48ba | 7fae5f7912a47cfc5f51b52d9dfe2879ec0ba886 | refs/heads/master | 2020-05-23T11:50:13.787415 | 2019-05-30T11:58:36 | 2019-05-30T11:58:36 | 186,745,121 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
# -------------------------- 顺序查找 ---------------------------
# 描述:从第一个元素开始逐个与查找的元素进行比较,当元素相同时返回对应元素的下标,如果到
# 最后都没有找到,则返回-1
# 缺点:当N很大时,平均查找查找长度较大、效率低
# 优点:对表中数据元素的存储没有要求。对于线性链表,只能进行顺序查找
def sequential_search(array, key):
length = len(array)
for i in range(length):
if array[i] == key:
... | UTF-8 | Python | false | false | 3,226 | py | 9 | search_algorithm.py | 6 | 0.492462 | 0.479899 | 0 | 85 | 27.070588 | 79 |
gerlindee/UBB-Artificial-Intelligence | 15,719,580,319,609 | 478c0068c6faeb2e3f749458893d2afe46c429fe | 3c48adcc837314986344d7db6f9a66ab7ddbfea8 | /laborator_1/UI.py | aeb9af5441ec23115936426f9253a3681769e2e3 | [] | no_license | https://github.com/gerlindee/UBB-Artificial-Intelligence | cde83e9bc5275d18d3f47da787ee76a9f49e9a97 | 60b5dc5d938a1e8623253e12af7b488935266254 | refs/heads/master | 2020-04-28T22:43:40.841422 | 2020-03-03T08:58:12 | 2020-03-03T08:58:12 | 175,628,499 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from SudokuBoard import SudokuBoard
from Problem import Problem
from Controller import Controller
class UI:
def __init__(self, controller):
self._controller = controller
@staticmethod
def mainMenu():
print("0. exit;")
print("1. select game board;")
print("2. solve using an... | UTF-8 | Python | false | false | 4,416 | py | 36 | UI.py | 26 | 0.456975 | 0.442029 | 0 | 104 | 41.461538 | 76 |
navidbahadoran/echo-server | 2,405,181,730,867 | a15a22ae78cca3198fcbf3422cb020ae321a493d | 347a6b676e66d89a55b6b85ef30a654f70d33c2a | /echo_client.py | e1f22dcc17dd96d31057f970c6cee643c2c275e5 | [] | no_license | https://github.com/navidbahadoran/echo-server | ac922c2b4540fb82db672d7138c4fb28708583ee | 523c08258df03ffb36e0d5e73a672bb70abbc238 | refs/heads/master | 2020-06-11T02:15:28.761204 | 2019-07-06T03:18:05 | 2019-07-06T03:18:05 | 193,823,829 | 0 | 0 | null | true | 2019-06-26T03:35:11 | 2019-06-26T03:35:11 | 2019-03-31T18:22:11 | 2019-03-31T18:22:09 | 142 | 0 | 0 | 0 | null | false | false | import socket
import sys
import traceback
def client(message, log_buffer=sys.stderr):
server_address = ('localhost', 10000)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
# print('connecting to {0} port {1}'.format(*server_address), file=log_buffer)
sock.connect(server_ad... | UTF-8 | Python | false | false | 1,908 | py | 1 | echo_client.py | 1 | 0.546646 | 0.530398 | 0 | 55 | 33.690909 | 82 |
peeyush-tm/pyobjc | 8,950,711,851,169 | 6d34660eba43bc8d5428fc459c8eb6f0a06d384f | 4b89a7de426fb53b999b5f3834404215a90817df | /pyobjc-framework-AVFoundation/PyObjCTest/test_avplayer.py | cc42405e4b998866800b7c0408a9505a88cc437f | [] | no_license | https://github.com/peeyush-tm/pyobjc | a1f3ec167482566ddc7c895cfa2aca436109cf66 | da488946f6cc67a83dcc26c04484ca4f10fabc82 | refs/heads/master | 2021-01-20T19:26:06.015044 | 2016-05-22T14:53:37 | 2016-05-22T14:53:37 | 60,502,688 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from PyObjCTools.TestSupport import *
import AVFoundation
class TestAVPlayer (TestCase):
@min_os_level('10.7')
def testConstants(self):
self.assertEqual(AVFoundation.AVPlayerStatusUnknown, 0)
self.assertEqual(AVFoundation.AVPlayerStatusReadyToPlay, 1)
self.assertEqual(AVFoundation.AVP... | UTF-8 | Python | false | false | 2,242 | py | 77 | test_avplayer.py | 48 | 0.767172 | 0.751115 | 0 | 45 | 48.822222 | 128 |
leonw774/rnnstuck | 9,534,827,444,629 | f20cf8bef1ea5308ce12a1151e396cc0d987e0fb | 6aa637069704152f8f62aad1dbd911b7078b97b1 | /ganstuck.py | 6532330ffd947cdeaa2fb2136fe66792e02b7315 | [] | no_license | https://github.com/leonw774/rnnstuck | eddc3155cbf6c575ce29f0cc40c8a691f126d228 | 65c3f7ee37e751979573f70f1580261afe726947 | refs/heads/master | 2021-12-14T23:45:49.604510 | 2020-10-01T07:35:27 | 2020-10-01T07:35:27 | 135,281,943 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import re
import sys
import numpy as np
import math
import h5py
import datetime
from configure import *
from train_w2v import *
from gensim.models import word2vec
from keras import activations, optimizers
from keras import backend as K
from keras.models import Model, load_model
from keras.callbacks import Ca... | UTF-8 | Python | false | false | 10,808 | py | 8 | ganstuck.py | 7 | 0.63495 | 0.622917 | 0 | 271 | 38.867159 | 247 |
noootown/algorithm | 17,892,833,755,762 | 0134de666c96fc1c543b066a1da003bf8c32d289 | 02eef3d6f2bd05ffd64ff5df63bf4bfb0721a31a | /leetcode/string/345.py | 8bcfab540cabb712d1d2f262949e734464921122 | [] | no_license | https://github.com/noootown/algorithm | 7e06a35071f8ff9cb2dbd56be8575168a44618ab | 84132372485ec4b1fbb3c0ab87362c1b0b37aa1c | refs/heads/master | 2021-09-27T03:10:12.763215 | 2018-11-05T19:32:52 | 2018-11-05T19:32:52 | 117,585,824 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://leetcode.com/problems/reverse-vowels-of-a-string/
# http://bit.ly/2H7sjLs
import re
class Solution:
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
vowels = re.findall('(?i)[aeiou]', s)
return re.sub('(?i)[aeiou]', lambda m: vowels.pop(), s)
assert Solution().reverseV... | UTF-8 | Python | false | false | 398 | py | 135 | 345.py | 131 | 0.628141 | 0.623116 | 0 | 16 | 23.875 | 59 |
Jothapunkt/tournament-network | 3,289,944,969,713 | fb9eb2355e387d2826ed1f93531c425e9411133c | 083163376119755d26ca3ff9aab18700244f590e | /tournament_organizer.py | 71d48b0c225092a5b9c242de55a03d618eebd955 | [] | no_license | https://github.com/Jothapunkt/tournament-network | 818f07904b7eb3d3e04fb41567831bf49b258a7e | e8dcc717b01a981ed1a91d4ca8a13866217f68e8 | refs/heads/master | 2022-01-08T17:00:15.920947 | 2019-02-27T20:38:31 | 2019-02-27T20:38:31 | 167,858,728 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
from random import *
from player import RemotePlayer
from mutator import Mutator
import copy
from gamesim import GameSim
from game_data import *
from ball import *
class Tournament(object):
def __init__(self):
self.mutator = Mutator()
self.data = GameData() #Game Data is stored in singleton
self.pla... | UTF-8 | Python | false | false | 3,551 | py | 35 | tournament_organizer.py | 24 | 0.663757 | 0.654745 | 0 | 120 | 28.533333 | 163 |
zymrytekabashi/python_fundamentals | 2,774,548,905,853 | 4d6b82de45772d8190d11927a24ca9cd83bab008 | 0142aa7bca656c66d59be3e90a0bd8d2a2bf1133 | /insertion-sort.py | 0b50b470d1456f7aa9840731b95daac4f7860f7a | [] | no_license | https://github.com/zymrytekabashi/python_fundamentals | 6ce5b5ff7ba125648d55276e43460c1632b974de | eaa634ceef0e9958caf32d0bf724c401c7f15693 | refs/heads/master | 2022-12-02T03:14:24.759910 | 2020-08-21T13:31:22 | 2020-08-21T13:31:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #insertion sort
def insertion_sort(my_list):
for i in range(len(my_list)-1):
for j in range(i, len(my_list)-1):
while j>0 and my_list[j-1]<my_list[j]:
j-=1
my_list[i], my_list[i-1]=my_list[i-1], my_list[i]
my_list=[7,1,4,3,2]
insertion_sort(my_list)
print(my_list)... | UTF-8 | Python | false | false | 636 | py | 18 | insertion-sort.py | 18 | 0.515723 | 0.471698 | 0 | 24 | 25.5 | 61 |
bayneri/fake-commit-bot | 377,957,144,026 | f94802281d0d9a66c2f82745664ba14c9672a4b9 | b9a9204e417e492236c08a15af4f41ae04ac4d7a | /bot.py | 5b395411d75b5b3df54b08e82ff4c6bba6b4750f | [] | no_license | https://github.com/bayneri/fake-commit-bot | ebfd593769c279e720ec41ca0272e834386167ad | 89ac86daf832ef8f9ea0778763589839235ee7b9 | refs/heads/master | 2021-09-05T14:28:31.163614 | 2018-01-28T21:25:00 | 2018-01-28T21:25:00 | 119,252,910 | 1 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | import subprocess
import random
rand = random.randint(0,10)
if rand >= 5:
# my little tiny miny fake github activity
subprocess.Popen(["bash", "/Users/halil/Desktop/funfunfun/fake-commit-bot/git.sh"])
else:
print('unlucky')
| UTF-8 | Python | false | false | 238 | py | 4 | bot.py | 2 | 0.705882 | 0.689076 | 0 | 10 | 22.8 | 87 |
LARS-robotics/lars-ros | 11,690,900,987,463 | a6f2326c587f1b6a1155048c9e5b8d4fae04232f | 2a79e87928f4b17575171e029b54f9fe7f00046e | /src/connectivity_controller/cfg/ConnectivityVariables.cfg | 3e7bc7201a9d60fc1cf393eeaa59e76338b358e8 | [
"Apache-2.0"
] | permissive | https://github.com/LARS-robotics/lars-ros | 4303c6e2c1b351484a428dcd9f1c55b8e93c00c2 | 83b0161e1339b39f638276dcbc29f5c71a9c3d06 | refs/heads/master | 2016-09-06T08:48:59.616170 | 2015-07-07T19:56:41 | 2015-07-07T19:56:41 | 37,946,032 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
PACKAGE = "connectivity_controller"
#import roslib;roslib.load_manifest(PACKAGE)
from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
gen.add("r_min", double_t, 0, "Radius min", .4, 0.0, 1.5)
gen.add("r_max", double_t, 0, "Radius max", .7, 0.0, 1.5)
exit(gen... | UTF-8 | Python | false | false | 392 | cfg | 252 | ConnectivityVariables.cfg | 57 | 0.721939 | 0.691327 | 0 | 13 | 29.153846 | 79 |
priyanshu3666/Iedaas-python-bootcamp | 12,180,527,270,503 | 80f5ca17f2a0f47f0957b3cfd2dc0b79cbfaffe3 | 54909b9c7b0d033b371643dbdf9a4b03bc85552b | /day4/student.py | 63472651da8131d3b8d9e3c219ad6bc9d5b72287 | [] | no_license | https://github.com/priyanshu3666/Iedaas-python-bootcamp | 2e710eaa4d6978c4ca4be015b49a537007fc9aa5 | 853f31452d98bfa1a33dfcf750493edf44d9a3cd | refs/heads/main | 2023-08-05T10:00:12.099226 | 2021-09-18T05:37:27 | 2021-09-18T05:37:27 | 404,589,347 | 0 | 0 | null | false | 2021-09-18T05:37:28 | 2021-09-09T04:50:28 | 2021-09-16T05:58:28 | 2021-09-18T05:37:27 | 13,948 | 0 | 0 | 0 | Python | false | false | class Student():
def __init__(self,name,roll):
self.name = name
self.roll= roll
def display(self):
print(self.name)
print(self.roll)
def setAge(self,age):
self.age=age
def setMarks(self,marks):
self.marks = marks
stuu =Student("priyanshu",50)
stuu.display() | UTF-8 | Python | false | false | 290 | py | 104 | student.py | 85 | 0.648276 | 0.641379 | 0 | 14 | 19.785714 | 31 |
rafelafrance/traiter_brazil | 6,158,983,151,451 | b651827a7dc258d93023aeb1dfed1c727de2a49b | 88b40052d6c36bdc136a97827209dcdfe7026c87 | /tests/matchers/test_surface.py | 9be8f758288e7a40fc266a94a7cd426c12bf4707 | [
"MIT"
] | permissive | https://github.com/rafelafrance/traiter_brazil | d4e4303adced0873cca9603925ec5798422cc9ff | b3ce904a48c368a66c30edd2e7b70bd7c2166d8a | refs/heads/master | 2023-02-25T22:46:04.095548 | 2021-01-31T22:01:13 | 2021-01-31T22:01:13 | 324,609,565 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Test plant surface trait matcher."""
# pylint: disable=missing-function-docstring, too-many-public-methods
import unittest
from tests.setup import test
class TestSurface(unittest.TestCase):
"""Test plant surface trait matcher."""
def test_surface_01(self):
self.assertEqual(
test('in... | UTF-8 | Python | false | false | 2,427 | py | 35 | test_surface.py | 28 | 0.509683 | 0.49485 | 0 | 68 | 34.691176 | 86 |
AbdElRahmanFarhan/Autonomous_Serial_Manipulators_for_Industry | 644,245,100,613 | a3d6aeb9a019e62a1998b8bd926b90766c0ff23d | 6560bbe097cb01b5a6d0297df6b6a00c8091b4c1 | /Autonomous_Serial_Manipulators_for_Industry/attrobot/scripts/target_pose.py | 1ba55fa62e009701b2675689b238b18d486585b9 | [] | no_license | https://github.com/AbdElRahmanFarhan/Autonomous_Serial_Manipulators_for_Industry | c35dde2f826886622be34d9730c8b8d60de089eb | 9eb70062d56b1fb4550aecde64ca0c7fcb453310 | refs/heads/master | 2022-11-07T03:33:19.642671 | 2022-10-30T14:57:34 | 2022-10-30T14:57:34 | 196,573,878 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
import sys
import rospy
from moveit_commander import RobotCommander, MoveGroupCommander, PlanningSceneInterface, roscpp_initializer
from trajectory_msgs.msg import JointTrajectory
from geometry_msgs.msg import Pose
from moveit_msgs.msg import RobotState
from sensor_msgs.msg import JointState
fro... | UTF-8 | Python | false | false | 1,753 | py | 41 | target_pose.py | 32 | 0.728465 | 0.692527 | 0 | 54 | 31.462963 | 107 |
denis-shamray/shopbox | 14,061,722,973,404 | 8fd981f7449bff9f1e73f1822bdd6fb0af70ae14 | e05e417880a13996b139553cab2d35c77ec037cf | /main/migrations/0004_auto_20160422_1137.py | 04d6abdd18c060d44292139da7ef4b0134daa2d0 | [] | no_license | https://github.com/denis-shamray/shopbox | 201d8b5aebc2730dc22eb2933398ab0975a6485e | b3d2adb7157e08fc375d5e4332b03e7268641d33 | refs/heads/master | 2021-01-21T04:41:32.996495 | 2016-07-17T11:31:48 | 2016-07-17T11:31:48 | 55,285,921 | 0 | 1 | null | false | 2016-05-13T15:26:40 | 2016-04-02T08:50:52 | 2016-04-19T19:25:41 | 2016-05-13T15:26:39 | 36,692 | 0 | 0 | 0 | CSS | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-22 11:37
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20160415_1151'),
]
operations = [
migrations.AlterModelOptions(
... | UTF-8 | Python | false | false | 521 | py | 30 | 0004_auto_20160422_1137.py | 11 | 0.554702 | 0.493282 | 0 | 23 | 21.652174 | 47 |
minqiang/ProjectEuler | 5,394,478,973,339 | 2bb66725d91b4c00e3fe4487834366c1281fafff | 41961531401b6cb1ff753a3f2b1600a857bc2abf | /Python_Code/010_summation_of_primes.py | dff8a980ec52445c1bd6c6d97d087f322f29516d | [] | no_license | https://github.com/minqiang/ProjectEuler | d0c2212299e57fbf5fdf64f1a502274bb596af20 | 97df621b7fac00154226ce4cc9be7bb5ab1e86e3 | refs/heads/master | 2021-01-20T00:29:26.035304 | 2015-07-27T01:58:53 | 2015-07-27T01:58:53 | 18,692,702 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #===============================================================================
# Problem 10:
#
# The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
#
# Find the sum of all the primes below two million.
#===============================================================================
# Author: Minqiang Li (any co... | UTF-8 | Python | false | false | 1,171 | py | 21 | 010_summation_of_primes.py | 14 | 0.457728 | 0.437233 | 0 | 42 | 26.690476 | 80 |
purelledhand/fat32_carving | 953,482,763,437 | 29076d8ef3ea91951c31d9782896e7c5eaf106d0 | 57969afdd8e3c1b273e92c125b76f4b3f2267b03 | /fat32/fat32parser/models.py | 616b02519e08f61d7989f012302b5302cf15b9bd | [] | no_license | https://github.com/purelledhand/fat32_carving | 3e2ec15b8a0adcbe165c74235decaee7ddfcd982 | 760350262793aef2cacee93181fd3642eb540901 | refs/heads/master | 2021-04-28T13:55:48.368907 | 2018-02-18T13:29:06 | 2018-02-18T13:29:06 | 121,953,480 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from django.utils import timezone
# Create your models here.
class Carving(models.Model):
bytes_per_sector = models.IntegerField()
sectors_per_cluster = models.IntegerField()
reserved = models.IntegerField()
fat32_size = models.IntegerField()
cluster_size = models.IntegerField()
FAT1... | UTF-8 | Python | false | false | 629 | py | 7 | models.py | 5 | 0.745628 | 0.72655 | 0 | 26 | 23.230769 | 45 |
mushahiroyuki/beginning-python | 18,184,891,540,917 | a1c4e781411d51b91a49f313e1b39baf58413216 | 1a24def8879972f21d846ffb3813632070e1cf12 | /Chapter10/1007-webbrowser.py | 9a7ade3b6da6b6d104c6bd13a90c5451b65fadd6 | [] | no_license | https://github.com/mushahiroyuki/beginning-python | 03bb78c8d3f678ce39662a44046a308c99f29916 | 4d761d165203dbbe3604173c404f70a3eb791fd8 | refs/heads/master | 2023-08-16T12:44:01.336731 | 2023-07-26T03:41:22 | 2023-07-26T03:41:22 | 238,684,870 | 5 | 4 | null | false | 2023-09-06T18:34:01 | 2020-02-06T12:33:26 | 2023-07-25T09:42:56 | 2023-09-06T18:33:58 | 23,447 | 5 | 2 | 2 | Python | false | false | #ファイル名 Chapter10/1007-webbrowser.py
import webbrowser
webbrowser.open('http://www.python.org')
| UTF-8 | Python | false | false | 105 | py | 209 | 1007-webbrowser.py | 185 | 0.8 | 0.736842 | 0 | 3 | 30.666667 | 40 |
hiroaster/syslog-monitor | 6,184,752,944,043 | df2f18927ba828efb3e9778d5c05b23fc425c4a0 | ffdb900645e7b9f070a9a898e4dbf1d07bc8f861 | /dbconn.py | bf26d26b6b3a3596e04ca5d0c17b646e867abc3a | [] | no_license | https://github.com/hiroaster/syslog-monitor | a21589f05d176af82dc3a10799333578545a6760 | 8bbf873ac2dfa251bfce4f37757f4657c8a2f57d | refs/heads/master | 2021-01-24T12:04:13.475565 | 2017-10-17T10:41:46 | 2017-10-17T10:41:46 | 55,965,469 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#edit: wenyang
#
# -*- coding: utf-8 -*-
# encoding: utf-8
#!/usr/bin/python
import MySQLdb
import time
ISOTIMEFORMAT='%Y-%m-%d'
today = time.strftime(ISOTIMEFORMAT,time.localtime())
def rule_exist(hostname,itemname,db_ip,db_user,db_pass):
db = MySQLdb.connect(db_ip,db_user,db_pass,"enigma"... | UTF-8 | Python | false | false | 1,298 | py | 5 | dbconn.py | 5 | 0.607088 | 0.604006 | 0 | 53 | 23.490566 | 102 |
grapin3/django-annuaire-alumni | 2,284,922,606,588 | e2951c3adcfbfab98c1de7d5f97196bb7d95d09e | d9049630f6307285f69d1a4c808be1e749f31c67 | /apps/annuaire/migrations/0001_initial.py | 3060b1d3ea3ea52ad5049d7b4d471d5ba0fe7881 | [] | no_license | https://github.com/grapin3/django-annuaire-alumni | c577a8c0262a0900704bb4d3ff538a624c6a1205 | 21dbd90800253500053d6f2baba60f015614f8cb | refs/heads/master | 2020-03-21T08:20:24.511700 | 2018-08-28T15:26:49 | 2018-08-28T15:26:49 | 138,336,923 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.6 on 2018-08-17 15:52
import apps.annuaire.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swapp... | UTF-8 | Python | false | false | 2,701 | py | 33 | 0001_initial.py | 12 | 0.608003 | 0.594665 | 0 | 54 | 48.981481 | 133 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.