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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
edufanelli/simAD | 3,702,261,848,033 | fb4d2003fd73ae664b68addd9863fc5cd25162ed | be0c6c5818916bf275dacc0a875198a42ed83d71 | /eventos.py | a47652b82314acfcf72ad6486a731320890ff48f | [] | no_license | https://github.com/edufanelli/simAD | 386be26fbd23386e9c8f188a512193fe850552a2 | 74ffac6c1b6563d80f526586da78b694a3102850 | refs/heads/master | 2021-01-10T12:31:22.071681 | 2016-03-12T19:28:58 | 2016-03-12T19:28:58 | 53,749,422 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import numpy
#from main import MAX_EVENTOS
###
def geraListaEventos(MAX_EVENTOS, taxaChegada1, tipoSaida1, taxaSaida1, taxaChegada2=None, tipoSaida2=None, taxaSaida2=None):
prox_evento = ""
lista_eventos = []
###1 Saída Exponencial (Cenário 1)###
if tipoSaida1 == "exponenc... | UTF-8 | Python | false | false | 13,953 | py | 4 | eventos.py | 3 | 0.50766 | 0.476228 | 0 | 261 | 52.268199 | 125 |
Slugskickass/NDR_detection | 3,453,153,711,327 | b7214508440616b7844e17f40a9adee6c0c7d345 | cae558765de2455baa45333b16227f3f34b26a72 | /Detect.py | 68a71aca01cdad826e62f1c1bf405d368671320f | [] | no_license | https://github.com/Slugskickass/NDR_detection | 8858b6bde5441de49890b3a57e99e5f594d2361c | 8ef4c38cd2d1cec73fbf394257e75a36bfdf52b9 | refs/heads/master | 2023-01-24T00:57:36.043703 | 2020-12-04T10:17:05 | 2020-12-04T10:17:05 | 318,478,582 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from PIL import Image
import numpy as np
from scipy import stats
import ruptures as rpt
import utilities as util
import matplotlib.pyplot as plt
from scipy import stats
def loadtiffs(file_name):
"""
This function returns an array of images in numpy format
:param file_name:
:return: an array containing... | UTF-8 | Python | false | false | 3,788 | py | 3 | Detect.py | 3 | 0.627244 | 0.618268 | 0 | 116 | 31.663793 | 152 |
krisekenes/semiRestfulPets | 12,154,757,458,619 | 336ef13391d034a0b5587f2e4241bae1a312b555 | 517bee7b3153e303bb275284ae018f48f5450ad0 | /apps/pets/views.py | b9b7e9634f5bdb6a55406535eb6814bc352d6e11 | [] | no_license | https://github.com/krisekenes/semiRestfulPets | 5144dda7ac4233157f29d3b1e65d76f98bead4b9 | d689972f8fc84b901ec4e3943a9839f723b4555b | refs/heads/master | 2018-12-31T14:10:14.728623 | 2016-09-23T19:04:53 | 2016-09-23T19:04:53 | 69,044,912 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render, redirect
from .models import Pets
def index(request):
context = {
'pets': Pets.objects.all()
}
return render(request, 'pets/index.html', context)
def new(request):
return render(request, 'pets/new.html')
def create(request):
Pets.objects.create(name=re... | UTF-8 | Python | false | false | 1,065 | py | 4 | views.py | 2 | 0.649765 | 0.649765 | 0 | 40 | 25.625 | 120 |
kg0r0/atcoder | 14,731,737,861,791 | 7faa6975cc3dc900fcd6faae08f7830aee26412b | 42d0298db18fd6bae5628527cd1a37097d0c6106 | /abc/146/c.py | e6c078296ad7f7d5efe1ca92853fb36d22e09b87 | [
"MIT"
] | permissive | https://github.com/kg0r0/atcoder | c242f8e8d57510a259cde816019b7f3c4f73e089 | 4deb31157235085a6512631fa8522b00df6c88e9 | refs/heads/master | 2020-06-23T16:50:57.508932 | 2020-06-22T14:48:41 | 2020-06-22T14:48:41 | 198,686,649 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | a,b,x=map(int,input().split())
l=0
r=10**9+1
while r-l>1:
c=(r+l)//2
v=a*c+b*len(str(c))
if v<=x:
l=c
else:
r=c
print(l)
| UTF-8 | Python | false | false | 137 | py | 403 | c.py | 366 | 0.489051 | 0.437956 | 0 | 11 | 11.454545 | 30 |
SD2E/python-datacatalog | 19,258,633,384,449 | 8bdb0fd5a87babcf009a2b878ffbf26e332e158b | 089f1d32f83e380499c263be654595671a17fdfb | /datacatalog/formats/ginkgo/convert.py | 83cd20a60431566c79603c5d32732f96e8a64e60 | [
"Python-2.0",
"BSD-3-Clause"
] | permissive | https://github.com/SD2E/python-datacatalog | 4930f7e1de33d035a42f319383c7ee7faee5d370 | 51ab366639505fb6e8a14cd6b446de37080cd20d | refs/heads/master | 2021-12-06T23:38:57.288649 | 2021-08-31T16:17:28 | 2021-08-31T16:17:28 | 149,484,835 | 0 | 1 | NOASSERTION | false | 2019-10-21T15:20:22 | 2018-09-19T17:06:26 | 2019-08-16T12:46:14 | 2019-10-21T15:13:40 | 70,753 | 0 | 1 | 0 | Python | false | false | import sys
from ..converter import Converter, ConversionError, ValidationError
class Ginkgo(Converter):
"""Convert Transcriptic samples.json to sample-set schema"""
VERSION = '0.0.2'
FILENAME = 'ginkgo_samples'
def convert(self, input_fp, output_fp=None, verbose=True, config={}, enforce_validation=Tru... | UTF-8 | Python | false | false | 792 | py | 840 | convert.py | 388 | 0.612374 | 0.608586 | 0 | 17 | 45.588235 | 98 |
Neptuos/TIL | 6,262,062,332,547 | 473332932e9bebc22c689387b865bd4b6a368044 | 5eed713b9c49bb7cae36b8d5d391b9a01a4446ee | /Python/periodic_table.py | 66209e97fee199a073e7c0a99ce0c164f2707d2f | [] | no_license | https://github.com/Neptuos/TIL | 8842b54ffdf2626901355555a1a671130e8a013d | d964f5a85c3840b56cd900cb8116907220de0232 | refs/heads/master | 2023-06-07T10:57:00.093072 | 2023-06-05T19:02:18 | 2023-06-05T19:02:18 | 256,842,243 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Just enter the correct name of element and know all about it
#for example if you want to know about hydrogen just enter hydrogen as input.
#this periodic data contain only data till atomic number 118
try:
import pandas as pd
a = input().capitalize()
a = " ".join(a.split())
periodicdata = pd.read_csv("... | UTF-8 | Python | false | false | 648 | py | 257 | periodic_table.py | 194 | 0.759259 | 0.666667 | 0 | 11 | 57.909091 | 225 |
karthikpappu/pyc_source | 3,032,246,928,260 | 382982edb3a38085142f1146fc23087c6036fafa | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pycfiles/egi-0.9.0-py2.7/socket_wrapper.py | e78f5e3ebf3d26c95a37c998327bec1d8e57c8d1 | [] | no_license | https://github.com/karthikpappu/pyc_source | 0ff4d03e6d7f88c1aca7263cc294d3fa17145c9f | 739e7e73180f2c3da5fd25bd1304a3fecfff8d6e | refs/heads/master | 2023-02-04T11:27:19.098827 | 2020-12-27T04:51:17 | 2020-12-27T04:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: build/bdist.macosx-10.6-intel/egg/egi/socket_wrapper.py
# Compiled at: 2016-09-08 05:35:24
import socket
class Socket:
""" wrap the socket() class """
... | UTF-8 | Python | false | false | 1,147 | py | 114,545 | socket_wrapper.py | 111,506 | 0.61116 | 0.568439 | 0 | 34 | 32.764706 | 77 |
anon-legion/Noobseries_utilities | 3,272,765,081,742 | 7270f579dc9b307adaaf60793377e762183e583d | 72479b0f78a923dc9a7be75891a8ff17872084ae | /wifi_stored_password/wifi_stored_password.py | f27ab00db4a652746ecbce5f3e04d45c9af80faa | [] | no_license | https://github.com/anon-legion/Noobseries_utilities | 4e163bc50e933539e3429b88a966840af07754e5 | db524eb26071dcd98b81227b737f20b98c391a73 | refs/heads/main | 2023-08-21T18:40:19.387976 | 2021-10-15T05:37:00 | 2021-10-15T05:37:00 | 329,648,678 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Dec 23 14:58:23 2020
@author: =GV=
"""
from datetime import datetime as dt
import subprocess as sp
import webbrowser as wb
try:
wifis = [(ssid.split(':')[1][1:-1], password.strip().split(':')[1][1:]) for ssid in sp.check_output(['netsh','wlan', 'show', 'prof... | UTF-8 | Python | false | false | 1,514 | py | 3 | wifi_stored_password.py | 1 | 0.579921 | 0.558124 | 0 | 32 | 45.3125 | 366 |
Yuvv/LeetCode | 3,186,865,772,959 | 1d366b5c98880a84da1759296c74c9ca757be9c2 | 422f49ef76dcc5a0ef5f380cc69b81c56bfc9116 | /1301-1400/1331-rank-transform-of-an-array.py | 6a2f59c223f5b229ecd1c600d68405aac2e139db | [] | no_license | https://github.com/Yuvv/LeetCode | ddac7a722a4c665a2b7f6da196fc3c16458b7d80 | c1297d9f3696ced0e8174ae675f348552fe6561a | refs/heads/master | 2023-08-19T02:58:28.471587 | 2023-08-13T15:58:05 | 2023-08-13T15:58:05 | 136,820,599 | 0 | 1 | null | false | 2020-06-26T04:25:17 | 2018-06-10T15:25:59 | 2020-06-26T04:19:22 | 2020-06-26T04:19:20 | 174 | 0 | 1 | 0 | Java | false | false | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @File : 1331-rank-transform-of-an-array.py
# @Date : 2020/01/26
# @Author : Yuvv <yuvv_th@outlook.com>
from typing import List
class Solution:
def arrayRankTransform(self, arr: List[int]) -> List[int]:
numbers = {}
for i, it in enumerate(sorte... | UTF-8 | Python | false | false | 642 | py | 959 | 1331-rank-transform-of-an-array.py | 951 | 0.570093 | 0.484424 | 0 | 25 | 24.68 | 71 |
MaesterPycoder/Python_Programming_Language | 2,594,160,274,492 | 5fb44591566400d0a7ab051079a5f46b469cde7c | 87667097e487b51cb1338b3694834b41f219a24b | /python_codes/pro1.py | 8603e67fe2fe5e7b4be19069466634e77fa44b55 | [] | no_license | https://github.com/MaesterPycoder/Python_Programming_Language | 2c8e50589470f04f223926339f24a00959c52882 | 122f6d1e665a7540684672a9f4fd468be9872eb5 | refs/heads/main | 2022-12-27T07:36:42.537711 | 2020-10-13T17:32:32 | 2020-10-13T17:32:32 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | d=[]
s=input("Enter you array:")
j=0
for i in range(len(s)):
f=0
for j in range(i+1,len(s)):
if (s[i]==s[j]):
f+=1
if (f==0):
d.append(s[i])
print(d.(","))
| UTF-8 | Python | false | false | 227 | py | 179 | pro1.py | 169 | 0.365639 | 0.343612 | 0 | 11 | 16.909091 | 31 |
sharonLuo/LeetCode_py | 8,246,337,254,217 | 35f268ffe0213c53b1ed021851f98e5189e68ef5 | 9dbc9b51736f23e72ecefead6585564b3ddfcb7e | /balanced-binary-tree.py | 5a7861f0b6e50b9a3f607ed514bae17fc42e7195 | [] | no_license | https://github.com/sharonLuo/LeetCode_py | 4784a89c037d322f3f8f3ccd87a85615168e8902 | b903cbed6026535cad62c02719c8939eaf82ac6f | refs/heads/master | 2021-01-10T04:15:17.174285 | 2016-03-14T21:50:24 | 2016-03-14T21:50:24 | 45,428,147 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# ... | UTF-8 | Python | false | false | 2,005 | py | 93 | balanced-binary-tree.py | 91 | 0.600499 | 0.592519 | 0 | 66 | 29.30303 | 157 |
voidblue/network_programming | 5,935,644,833,300 | c8394025419739bf1267d19401d3f7d3d153d954 | 124e073d15b69128dd7e56b636b07a12150e3013 | /beforemidtest/Http_method.py | ba4230b3127a46a21b8c2e851de7fbd0a5bc9018 | [] | no_license | https://github.com/voidblue/network_programming | 62a130c6fa8e892181a583af3fdfa0763498a03a | f123ece24a80a8a4c6717f5a81c273e5b60e0e36 | refs/heads/master | 2021-01-18T07:29:42.212889 | 2017-04-28T06:18:35 | 2017-04-28T06:18:35 | 84,290,184 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from urllib.request import Request, urlopen
from urllib.parse import urlencode,urljoin
data_dict = {'q':'Python'}
data = 'search?' + urlencode(data_dict) #딕셔너리를 '키=값'의 스트링 형태로 변환
print(data)
url = urljoin('http://search.daum.net/',data)
req = Request(url)
print(req.full_url) #리퀘스트 url출력
print(req.get_header... | UTF-8 | Python | false | false | 455 | py | 29 | Http_method.py | 28 | 0.705596 | 0.705596 | 0 | 14 | 28.428571 | 66 |
qiurongsong/Tourism_NLP | 11,647,951,352,776 | d1c58ef28b34bf100359aca60e5847de455b64bc | 8fe7bd5058defeb0656a1478a6713638258b3c9d | /data_admin.py | c4069545d5c2a8986ed85fb92c58a799d9e43926 | [] | no_license | https://github.com/qiurongsong/Tourism_NLP | b435bba5f3a250f4028d146b856026ce4bd8a0ad | 193af0d4be5e81ea36b20ec1e646a9482412b452 | refs/heads/master | 2022-12-12T17:15:37.268088 | 2020-08-27T15:06:08 | 2020-08-27T15:06:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author : Gary
import pymysql
# ******************************************数据库操作***************************************************#
class Database:
# 数据库初始化,port得是数值int型,暂时先这样,(后续情况需要可以开放多库多服务器查询(允许传入参数)
def __init__(self, ):
self.host = '127.0.0.1' # 主机名... | UTF-8 | Python | false | false | 3,531 | py | 14 | data_admin.py | 5 | 0.480226 | 0.469924 | 0 | 75 | 39.12 | 129 |
ladnir/ocr | 13,417,477,859,255 | a216fe015805b797a198e125b67c44893534efd2 | 423ec2a2d7c993415e2da563cf7d5de057bbf62c | /examples/parallel_mergesort/parse_pthread_speedup.py | 498079e126fdbc89a7b2427ca18d6e154ce24f6f | [
"BSD-2-Clause"
] | permissive | https://github.com/ladnir/ocr | 1752d6f36c2cae7c9cba089a55ad6e998879cf02 | a7a9ec87a64e5e7ad6125c5cdd30d26d6a25bfb0 | refs/heads/master | 2016-09-16T11:20:38.839639 | 2014-05-16T06:33:26 | 2014-05-16T06:33:26 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
import sys, csv, string
if len(sys.argv) != 3:
print "Usage: parse_pthread_speedup.py <input csv file> \
<output csv file>"
exit()
inFile = open(sys.argv[1], "rb") #Open the input file
inReader = csv.reader(inFile) #Grind it into CSV format
inputRow = inReader.next() #Grab the f... | UTF-8 | Python | false | false | 815 | py | 245 | parse_pthread_speedup.py | 26 | 0.656442 | 0.644172 | 0 | 29 | 27.068966 | 64 |
rwflick/djangoXNFLDemo | 14,267,881,377,983 | 4b60de257d8022fde5fa7e8038e5934d45aed488 | 20d403fc88418bc6decc75c31a86bd5f6474446c | /nfl/models.py | 5da1343273d9cd046db13f854ab5be118a58bea8 | [
"MIT"
] | permissive | https://github.com/rwflick/djangoXNFLDemo | 314f698c3a714b4bb011717fb982d55b04e53259 | 825072b25b9b33eba9687d7ec358d59c7706a16f | refs/heads/master | 2022-12-15T01:56:54.387187 | 2020-09-13T23:37:48 | 2020-09-13T23:37:48 | 295,256,920 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
# Create your models here.
class Team(models.Model):
CONFERENCES = [
('AFC', 'American Football Conference'),
('NFC', 'National Football Conference')
]
DIVISIONS = [
('N', 'North'),
('S', 'South'),
('E', 'East'),
('W', 'West')
... | UTF-8 | Python | false | false | 1,645 | py | 15 | models.py | 11 | 0.543465 | 0.534954 | 0 | 56 | 28.375 | 80 |
ml4ai/BioContext_annotator | 2,430,951,532,374 | 0b1fb2c8d8262d096204545d883db1a03082acb4 | f4af064c16f3defc90b2666f7e5783d5821006c7 | /server/app/exceptions.py | 53d211783ca0190a1c307ea20dc42c0225f87c28 | [] | no_license | https://github.com/ml4ai/BioContext_annotator | 1144daad8d3012658663534c9587d7a05f84dff5 | 4ddc8a87ccdd91df60e033c7e3b806e5f1f97486 | refs/heads/master | 2021-07-26T00:56:51.645698 | 2021-06-25T20:15:58 | 2021-06-25T20:15:58 | 149,360,468 | 0 | 0 | null | false | 2021-06-25T20:17:01 | 2018-09-18T22:39:04 | 2021-06-25T20:16:09 | 2021-06-25T20:15:59 | 7,729 | 0 | 0 | 0 | Python | false | false | """
Exceptions
"""
class RestartInterrupt(Exception):
"""
Server Restart
"""
def __init__(self):
self.value = "RestartInterrupt"
def __str__(self):
return repr(self.value)
class ShutdownInterrupt(Exception):
"""
Server Shutdown
"""
def __init__(self):
s... | UTF-8 | Python | false | false | 768 | py | 394 | exceptions.py | 30 | 0.572917 | 0.572917 | 0 | 42 | 17.285714 | 70 |
stephanie-wang/ray | 8,358,006,407,021 | 1eaf2448c0a94967785d2104612410daf20ec0de | 613d9b4259e63e6b5ee4f85131c93389569e3f17 | /python/ray/autoscaler/kubernetes/node_provider.py | a65f7e82350f2417a8e23cbf9ef9e26429232fa0 | [
"Apache-2.0",
"MIT"
] | permissive | https://github.com/stephanie-wang/ray | 097986a02eb517eeeddddc3c636eb4c380f1c714 | 62bb26d5d04343e339d014f302a9fbacbd4482d7 | refs/heads/master | 2023-08-31T08:07:38.864072 | 2020-02-06T17:49:40 | 2020-02-06T17:49:40 | 77,302,388 | 4 | 3 | Apache-2.0 | true | 2022-05-24T22:22:31 | 2016-12-24T22:37:23 | 2021-04-14T14:37:25 | 2022-05-24T22:22:30 | 234,120 | 2 | 0 | 3 | Python | false | false | import logging
from ray.autoscaler.kubernetes import core_api, log_prefix
from ray.autoscaler.node_provider import NodeProvider
from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME
logger = logging.getLogger(__name__)
def to_label_selector(tags):
label_selector = ""
for k, v in tags.items():
if labe... | UTF-8 | Python | false | false | 3,097 | py | 677 | node_provider.py | 505 | 0.631902 | 0.631902 | 0 | 83 | 36.313253 | 76 |
madelinemarshall/MeraxesCodes | 15,857,019,289,373 | fdccc54940ae7605bdd2f76de44d70b8b6cf4b9e | f52ae11610277969b07d7010b4e82272b4d6dc23 | /Paper2Plots/BHGrowthMechanism_modelComparison_T125.py | 1321371347b1c0d6fa0d57ba2e4c57bd5fcc9652 | [] | no_license | https://github.com/madelinemarshall/MeraxesCodes | 35f03c9672858142638b511920e69c3ed538972c | 7baf2390dae9d8127460c6392c63b3c17f1b8350 | refs/heads/master | 2022-11-28T18:04:47.221839 | 2020-07-29T04:18:08 | 2020-07-29T04:18:08 | 265,444,740 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from dragons import meraxes
import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import sys
import pandas as pd
#Sets plot defaults
matplotlib.rcParams['font.size'] = (9)
matplotlib.rcParams['figure.figsize'] = (7.2,2.5)
plt.rc('text', usetex=True)
plt.rc('font', family=... | UTF-8 | Python | false | false | 4,990 | py | 265 | BHGrowthMechanism_modelComparison_T125.py | 143 | 0.689178 | 0.625852 | 0 | 119 | 40.932773 | 167 |
kstensland/Mood_Checker | 9,491,877,751,554 | 42b428a199e41f0aa4b3e0b002b10582e3e88acb | 1cb219988e97c841b88250f86bd7686f6c9fdd80 | /makeDB.py | 5c5872a1ddb3e58bbb4393c19cda208b7c08f4a9 | [] | no_license | https://github.com/kstensland/Mood_Checker | e2f96c2f19fb603180e9b33f18e8c75069cea9e6 | 88bdcecb7019bfb71a38853aaa11100979a2a745 | refs/heads/master | 2021-01-21T22:26:54.812241 | 2014-02-24T18:29:31 | 2014-02-24T18:29:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import MySQLdb as mysql
con = mysql.connect(user="root", passwd="a1b2c3d4", host='localhost')
db = con.cursor()
def recreateDB():
db.execute('DROP DATABASE IF EXISTS mood_prover')
db.execute('CREATE DATABASE mood_prover')
db.execute('USE mood_prover')
db.execute('CREATE TABLE user('+
... | UTF-8 | Python | false | false | 1,875 | py | 223 | makeDB.py | 6 | 0.523733 | 0.511467 | 0 | 58 | 31.327586 | 80 |
dim-stef/django | 14,826,227,132,395 | ff0b127f137a943ab050c961f9f6199d88fa5fb8 | 1694c38a9666c7c3c3b8d2edba500cf30821e86a | /groups/signals.py | 22e1adcee02b6e61338ee47572ac30a83ed2862c | [] | no_license | https://github.com/dim-stef/django | 207936bd400ea64e4a4711755d58435690fe8623 | 953bb03ce84bacb6bad1c5df61977d7fcc78d111 | refs/heads/master | 2019-07-13T23:28:23.421690 | 2018-11-17T16:24:22 | 2018-11-17T16:24:22 | 124,302,240 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db.models.signals import m2m_changed
from django.core.exceptions import ValidationError
from groups.models import Group
'''def parent_changed(instance, action, **kwargs):
if action == "post_add":
if instance in instance.parents.all():
raise ValidationError({"parents": "Cannot branc... | UTF-8 | Python | false | false | 456 | py | 77 | signals.py | 67 | 0.736842 | 0.732456 | 0 | 12 | 37 | 114 |
Raju379/Tweet-classifier | 16,157,666,975,561 | 973cbfbd7455cf10ec8852bcb6bd847336925d43 | f8515234cfacc7ad5667bfd67567a5c781cca84a | /app.py | b848222d010a0308932b25d9dca2b916be88e1e7 | [] | no_license | https://github.com/Raju379/Tweet-classifier | ea46a9df7476e9a2a174cc690271a5f38c95b9c3 | 64c6f17c26a804825398816f84857d752bc204f7 | refs/heads/main | 2023-04-16T05:43:59.619000 | 2021-04-27T08:58:10 | 2021-04-27T08:58:10 | 362,024,237 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import streamlit as st
import pandas as pd
import numpy as np
import pickle
import re
import string
import nltk
#nltk.download('punkt')
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
def clean_tweet(tweet): # for cleaning the sentence
tweet = re.sub(r'http\S+', '', t... | UTF-8 | Python | false | false | 3,480 | py | 2 | app.py | 1 | 0.57188 | 0.56383 | 0 | 83 | 39.831325 | 136 |
imanursar/sains-komputasi | 7,043,746,397,438 | 58b896dec8812bba0b7d07021c1c2547d27cf944 | 46aac4e9d35279fbddd18149df8a7d288e944b77 | /tugas Algoritma dan Rancangan Perangkat Lunak/find_root.py | f1e2e4b5541871f6a53cfefe66c506678e9bff8d | [] | no_license | https://github.com/imanursar/sains-komputasi | 73b09145f47f625e4648f4d5eb25b57ee9cd6ee3 | 2367a4fc7b5fc3afbaa0647ac2d6b1fe49cdf255 | refs/heads/master | 2020-04-03T20:01:00.563254 | 2018-10-31T11:11:00 | 2018-10-31T11:17:20 | 155,544,147 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import Menu
# import tooltip_oop as tt
import numpy as np
import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg... | UTF-8 | Python | false | false | 6,579 | py | 35 | find_root.py | 28 | 0.593251 | 0.563155 | 0 | 163 | 39.361963 | 138 |
colinkelleher/CorkCity_ShortestPath | 2,920,577,772,044 | 3b7574b4e0451fd340e873ac1e3292ee9b2cb0b6 | 0eff8ca11f23305a06f389f9c45ee809a839fc20 | /Element.py | ad46ff38aca1e87a6332e7d028f9d3b25e9a1229 | [] | no_license | https://github.com/colinkelleher/CorkCity_ShortestPath | 7b9422e39e09165c13a41d8caf6283d8949ca924 | 723b97043d1c7cac765db8b7e45addca92aa8c6d | refs/heads/master | 2022-04-27T18:37:39.418610 | 2020-04-30T11:17:38 | 2020-04-30T11:17:38 | 215,151,552 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # *********************************************************
# CLASS ELEMENT
# COLIN KELLEHER 117303363
# ASSIGNMENT 2 - CS2516
# *********************************************************
class Element:
# *********************************************************
# __init__
# Creating an element of a key, value and i... | UTF-8 | Python | false | false | 1,926 | py | 7 | Element.py | 6 | 0.371236 | 0.363967 | 0 | 65 | 28.630769 | 81 |
yw778/COMS4705_nlp | 8,254,927,178,889 | 2ea450c950f88c70db352ae1625471b71d4f2338 | 197d1e555430b8524b2f8ef62539a65005d53f44 | /hw1_tagging/4_2.py | c037d1ff67db4e756d039dfdbf5085726996426d | [] | no_license | https://github.com/yw778/COMS4705_nlp | b721aa5c20d7620d826cd39887b6f16699f51efb | b66dedf26af7e746454e6becfa01a314c5bf664e | refs/heads/master | 2021-03-27T19:57:36.796081 | 2018-05-26T22:21:16 | 2018-05-26T22:21:16 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/python
import os
from collections import defaultdict
from math import log
def get_emission_prob(input_file = "ner_rare.counts"):
lines = []
count = defaultdict(int)
with open(input_file,'r') as input:
for line in input.readlines():
if line.strip():
lines.app... | UTF-8 | Python | false | false | 1,822 | py | 9 | 4_2.py | 7 | 0.532382 | 0.525247 | 0 | 60 | 29.366667 | 91 |
yamaton/codeforces | 5,815,385,733,462 | aeb8baa2bb340d41bdc8964cf523d4239b16fa0a | bb151500b0fc5bb9ef1b1a9e5bba98e485b4b34d | /problemSet/600C_Make_Palindrome.py | 855783e09dc68c5e6d5a334621dd66747e864556 | [] | no_license | https://github.com/yamaton/codeforces | 47b98b23da0a3a8237d9021b0122eaa498d98628 | e0675fd010df852c94eadffdf8b801eeea7ad81b | refs/heads/master | 2021-01-10T01:22:02.338425 | 2018-11-28T02:45:04 | 2018-11-28T03:21:45 | 45,873,825 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Codeforces Educational Round 2
Problem 600 C. Make Palindrome
@author yamaton
@date 2015-11-30
"""
import collections
def solve(s: str) -> [str]:
n = len(s)
chars = collections.Counter(s)
base = [c for c in chars if chars[c] >= 2 for _ in range(chars[c] // 2)]
rest = sorted(c for c in chars if ... | UTF-8 | Python | false | false | 658 | py | 222 | 600C_Make_Palindrome.py | 168 | 0.579027 | 0.548632 | 0 | 32 | 19.5625 | 76 |
hxca/58CrackVerification | 19,018,115,233,989 | d44bfadce26eeb325b7169afe381a934028ff71a | 8c42b99d2dc7017e1c1e492749627afb13cc4511 | /crack_verification_58.py | 3e34940e06356989cb6913e37b46f32e5068d408 | [] | no_license | https://github.com/hxca/58CrackVerification | d1e1a17691823a557cd4cef308f15db2a3ec784b | ee900f30f9614d1b4bfe5899e04cf1cd8fa99f64 | refs/heads/master | 2020-12-05T19:36:23.583442 | 2020-05-01T05:54:40 | 2020-05-01T05:54:40 | 232,226,626 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
import json
import math
import random
import re
import time
from binascii import b2a_hex, a2b_hex
import cv2
import numpy as np
import requests
from Crypto.Cipher import AES
class CrackVerification(object):
def __init__(self):
self.__bg_img = 'bg_img.jpg'
self.__puzzle_i... | UTF-8 | Python | false | false | 12,868 | py | 3 | crack_verification_58.py | 1 | 0.514538 | 0.453607 | 0 | 373 | 32.747989 | 121 |
jae-yong-2/IP_HW | 14,809,047,273,389 | 0b470a9d5386c986e0c25e143a2571909a28b3d1 | 8145dbfe0771b2ce5e3bf32f4d7e3332c6a99697 | /my_JPEG_DCT.py | 318a0dd5caae665c4bbfe9a4e78ee042fc71ce34 | [] | no_license | https://github.com/jae-yong-2/IP_HW | f703a79cf48c2e31d2c08a2b1040d95cecdc8c4e | f9d929b584ece08010f0ffa976c1279bb7a9c67c | refs/heads/master | 2022-11-09T12:16:03.276159 | 2020-06-30T10:13:16 | 2020-06-30T10:13:16 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
def my_normalize(src):
dst = src.copy()
if np.min(dst) != np.max(dst):
dst = dst - np.min(dst)
dst = dst / np.max(dst) * 255
return dst.astype(np.uint8)
def my_DCT(src, n=8):
###############################
# TODO #
... | UTF-8 | Python | false | false | 1,886 | py | 9 | my_JPEG_DCT.py | 9 | 0.39373 | 0.37779 | 0 | 60 | 29.366667 | 106 |
avcjeewantha/Online-Karate-Event-Management-System | 2,310,692,422,231 | 06aa1ceddad1bd5e788516530e3decad84eae724 | 0e6acfaa78a66cd77b5cee1d37d2d4aa633203ae | /mysite/EventManagementSystem/models.py | 1db6aa1b62046141d5cbd9e99a15dbbbe2ad281f | [] | no_license | https://github.com/avcjeewantha/Online-Karate-Event-Management-System | 8f46e54c833979d6f9ab8f973d1246f4881f5bf4 | 39b7a20feeede9b221fd3b82b1399a902010bc2b | refs/heads/master | 2020-03-28T06:19:26.996262 | 2018-12-11T17:27:48 | 2018-12-11T17:27:48 | 147,827,922 | 1 | 0 | null | true | 2018-09-07T18:02:56 | 2018-09-07T13:35:26 | 2018-09-07T14:59:48 | 2018-09-07T18:02:56 | 498 | 0 | 0 | 0 | HTML | false | null | from __future__ import unicode_literals
from django.contrib.auth.models import AbstractUser
from django.core.validators import MinValueValidator
from django.db import models
class User(AbstractUser):
# New field needs to be added to the User table.
# This gives a select box to the user to choose from. First ... | UTF-8 | Python | false | false | 4,940 | py | 56 | models.py | 28 | 0.709109 | 0.698381 | 0 | 124 | 38.83871 | 120 |
Snufkin0866/pyliquidpnl | 15,917,148,827,026 | 379190f9053fea905d39ef3a57f56102d6e63c56 | d83f45ecff6b408dc23b46d5f4b2092dfed37958 | /calc_INITIAL_CAPITAL.py | 5f28800a4b676bb0585e826f0a84544367fc04be | [
"MIT"
] | permissive | https://github.com/Snufkin0866/pyliquidpnl | 40826c2944fb3c2c519f5f19445dc8c3ca73cdde | 0350cf1063acff4c6b6dedcbc51df7c6de9a4e46 | refs/heads/master | 2020-05-09T22:38:34.647089 | 2019-04-28T04:50:50 | 2019-04-28T04:50:50 | 181,477,781 | 0 | 9 | MIT | false | 2019-04-26T01:23:55 | 2019-04-15T12:01:48 | 2019-04-26T01:23:23 | 2019-04-26T01:23:55 | 34 | 0 | 4 | 0 | Python | false | false | # -*- coding: utf-8 -*-
import pyliquid
import config
key = config.KEY
secret = config.SECRET
api = pyliquid.API(key, secret)
FUNDING_CURRENCIES = config.FUNDING_CURRENCIES
def get_rates():
product_id = {'BTC':5, 'ETH':29, 'XRP':83, 'QASH':50, 'BCH':41}
rate = {}
rate['JPY'] = 1
rate['USD... | UTF-8 | Python | false | false | 942 | py | 8 | calc_INITIAL_CAPITAL.py | 4 | 0.561571 | 0.545648 | 0 | 33 | 26.424242 | 93 |
btravers/ABR | 12,601,434,053,742 | 3d8165bd98e8db555257dee32ef0418f262bab2c | c879d57414cfb2f68490b33b5f8a90357bc7bcd3 | /abr/document/urls.py | 3c8cbee26a147ced9d2a404daba1990a2df9478e | [] | no_license | https://github.com/btravers/ABR | c1bf683c8b35f4fee5fc96f920d818d9df214126 | 3555bc2c4a96e09bd85b61d6b2c29cc8edae5723 | refs/heads/master | 2016-08-07T04:28:50.666336 | 2015-08-20T20:04:17 | 2015-08-20T20:04:17 | 35,184,591 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url
from . import views
from .views import DocumentCreateView, DocumentDeleteView, DocumentListView
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^new/$', DocumentCreateView.as_view(), name='upload-new'),
url(r'^delete/(?P<pk>\d+)$', DocumentDeleteView.as_view()... | UTF-8 | Python | false | false | 415 | py | 25 | urls.py | 11 | 0.686747 | 0.686747 | 0 | 11 | 36.818182 | 85 |
matematik1903/Django_Framework_-_Business_Employer_DB | 1,460,288,896,927 | d0b9241554c0b3700010faace2a8a5f231ccd737 | 036138a37565306f6074643a56eb4c26b275a02d | /landing/migrations/0003_auto_20171105_2035.py | b9ea5f5f0984d926825c31cec16687932b9af0f9 | [] | no_license | https://github.com/matematik1903/Django_Framework_-_Business_Employer_DB | 9df078f20d1fd3fadd795978c2cdb17124d66934 | 25c07af2cbbf9a8f137a94e71f33d065e86fb3d0 | refs/heads/master | 2021-05-05T13:58:18.422758 | 2018-01-22T06:19:29 | 2018-01-22T06:19:29 | 118,414,120 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-05 18:35
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('landing', '0002_auto_20171105_2026'),
]
operations = [
migrations.RenameModel(
... | UTF-8 | Python | false | false | 400 | py | 35 | 0003_auto_20171105_2035.py | 20 | 0.59 | 0.5075 | 0 | 19 | 20.052632 | 48 |
yaswanth1199/zero.c | 12,738,873,013,388 | 7f81cc244972a59c587b882d5ac8c6953669d7c3 | c6537d77b62e7c7762b1460a12421e8bbcd221e6 | /sdkfs.py | 2f79790fe6a46257dc0dda5034ffa6ba8149c3f5 | [] | no_license | https://github.com/yaswanth1199/zero.c | 9b9e3913b177009c6adf4fc8c97db907cf40f095 | 44c56800ed6cbd47ab9a0d23f080ff750a4446e1 | refs/heads/master | 2020-06-05T17:00:00.397858 | 2019-07-16T09:25:41 | 2019-07-16T09:25:41 | 192,490,403 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | a=int(input())
x= range(1,11)
if a in x:
print('yes')
else:
print('no')
| UTF-8 | Python | false | false | 81 | py | 38 | sdkfs.py | 7 | 0.530864 | 0.493827 | 0 | 6 | 12.5 | 16 |
SamuelDGeorge/JupyterCloudInstructorNotebook | 11,914,239,293,906 | d835ff19ac072ce3c86fe29e325bb46c2955a423 | 1fb18ae0d1270652096e760f7f85ddce5d562af9 | /DataTools/__init__.py | 39cd9cc2c38a9a8534a0da4833853ba2ad2a9117 | [] | no_license | https://github.com/SamuelDGeorge/JupyterCloudInstructorNotebook | 3876202be93d0e6d1a6eb03caa4a7851814e1beb | a27e3c613db99d1dad04531ed1c60f72eb8792ca | refs/heads/main | 2023-03-24T02:02:47.519554 | 2021-03-14T20:30:15 | 2021-03-14T20:30:15 | 347,694,028 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .DataProcess import DataProcess | UTF-8 | Python | false | false | 36 | py | 4 | __init__.py | 3 | 0.888889 | 0.888889 | 0 | 1 | 36 | 36 |
tainona/lesson01 | 16,363,825,411,180 | 36d60ba455027fdeb488fe9f26ad090372bbe46d | 0cc5f9a36a901d463f59af8fddc8890cfa13e7fa | /4-4/main.py | fada0ff15a3dbdecd79205e968e1be8928876ab5 | [] | no_license | https://github.com/tainona/lesson01 | 07e91e64bbd678b51d6b9c8ce6066c2c5c82ef81 | 47852b2a1a3b2dbed76771df4a5130485d984c36 | refs/heads/main | 2023-04-16T02:56:57.515577 | 2021-04-30T15:18:26 | 2021-04-30T15:18:26 | 360,157,124 | 0 | 0 | null | true | 2021-04-30T15:18:26 | 2021-04-21T12:13:06 | 2021-04-30T15:14:06 | 2021-04-30T15:18:26 | 22 | 0 | 0 | 0 | Python | false | false | import random
a = []
for i in range(10):
a.append(random.randint(0,9))
print(*a)
| UTF-8 | Python | false | false | 85 | py | 22 | main.py | 21 | 0.635294 | 0.588235 | 0 | 5 | 16 | 33 |
GuiSeSanz/myScripts | 8,409,546,002,694 | ae4d500fff5895074bc98ad7497c12bbf68c52a4 | 9fd31e1fcb941124840a80ce3a9d9440afad8b5a | /Rename_prot.py | 9bd31f36112ba9c57a812fae8a225971ce029f9c | [
"Apache-2.0"
] | permissive | https://github.com/GuiSeSanz/myScripts | d4011c67b50f07b5fcdf613cd5ae13ec0a20ea75 | 21ae4940fceeaba1549ab6c9cd5f2e2bee22b970 | refs/heads/master | 2021-01-19T05:07:45.726085 | 2018-06-04T07:16:04 | 2018-06-04T07:16:04 | 64,406,323 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 18 10:39:09 2016
@author: guillermo
"""
import sys
def LeerProt(archivoprot):
infile = open(archivoprot, "r")
lista = []
sequence = False
for line in infile:
if (line.startswith("# protein sequence of predicted genes")):
sequen... | UTF-8 | Python | false | false | 2,582 | py | 48 | Rename_prot.py | 35 | 0.530209 | 0.516654 | 0 | 94 | 26.414894 | 70 |
jiang43605/BJGuaHaoSpider | 10,926,396,826,318 | ebb8a4705b3309305ede598e52d46c3c1ab6cb08 | af7689c3d43ae49f9aa9d3bfa614c2a6f3da8eef | /departmentSpider.py | 02478725ee0db510d2863673fe3f327fa1663ade | [] | no_license | https://github.com/jiang43605/BJGuaHaoSpider | 8083af9114c79ae3c188adccb997732ab4fe16e3 | 6ae96e7e05cceb2327147bd791e542f99013459f | refs/heads/master | 2021-01-09T06:50:19.599912 | 2016-04-19T08:15:25 | 2016-04-19T08:15:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: UTF-8 -*-
import re
import urllib.request
import urllib.error
import urllib.parse
import timeSpider
import Validator
# 获取科室信息类
class DepartmentInfo:
# 初始化方法
def __init__(self, baseUrl):
# base链接
self.baseUrl = baseUrl
# 科室列表信息
self.departments = []
# 返回科室列表
... | UTF-8 | Python | false | false | 3,138 | py | 3 | departmentSpider.py | 3 | 0.538881 | 0.524898 | 0 | 89 | 31.94382 | 136 |
072jiajia/AIHW3 | 3,204,045,638,177 | c17f8d8dd0b1eee17afeaad20229e152921a7f22 | 7905318a26026f7a46632ba6459929f617312e27 | /HW3/Tools/neighbor.py | 3083bffd778e94272a09372baf1144ee0c12429b | [] | no_license | https://github.com/072jiajia/AIHW3 | 5f58c2eae6b263049b05498c522bbe781253d9d9 | c02138132df371ee65438eae7bcf5a962b02e66e | refs/heads/master | 2022-07-18T20:25:57.740545 | 2020-05-21T10:35:22 | 2020-05-21T10:35:22 | 265,820,017 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def neighbor(size, pos):
'''get neighboring blocks'''
(x, y) = pos
ret = []
for (dx, dy) in neighbor.neighbor_list:
if (x + dx < 0 or x + dx >= size[0] or
y + dy < 0 or y + dy >= size[1]):
continue
ret.append((x + dx, y + dy))
return ret
... | UTF-8 | Python | false | false | 437 | py | 9 | neighbor.py | 9 | 0.400458 | 0.354691 | 0 | 14 | 28.785714 | 62 |
0lidaxiang/fu2DoList | 19,602,230,773,849 | d2fe944f833bf186f89068d6ff6c68c3f24e4cf5 | 6dc445aa82de153f589ad09a2fcd04f064407289 | /myCalendar/migrations/0001_initial.py | 088a7c2a639ecc1723b7a9a3412e5b2e5e058ba0 | [
"MIT"
] | permissive | https://github.com/0lidaxiang/fu2DoList | beba86edb3f8b4712648fe525c2df90f51ffbe68 | 40b845cfac5c71cdacadca18a2609169e25ea4ac | refs/heads/master | 2023-01-19T04:18:41.430480 | 2020-11-27T09:39:59 | 2020-11-27T09:39:59 | 125,611,544 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.5 on 2018-07-03 05:35
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Book',
fields=[
('id', models.AutoField(pri... | UTF-8 | Python | false | false | 716 | py | 14 | 0001_initial.py | 12 | 0.551676 | 0.518156 | 0 | 25 | 27.64 | 76 |
VyUng0711/competitive-programming-solutions | 18,597,208,427,723 | 32cf75f41022aea7218b7f828aca9b16e4bd0838 | a63e490f79716bf1271ee56063ce6552e2aa5c6e | /leetcode/sort_colors.py | 807264077632dc54fb18c7640d1ade94e09b1dc0 | [] | no_license | https://github.com/VyUng0711/competitive-programming-solutions | 07166b9bf0eb2615e9fbf8c836a7f1ea0861bb5c | d88b522681569ac2c2bfec57d77ed1cc9e2079a5 | refs/heads/master | 2020-03-14T03:53:15.357812 | 2019-02-11T06:05:29 | 2019-02-11T06:05:29 | 131,429,375 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def sort_colors(nums):
end_of_0 = 0
end_of_2 = len(nums) - 1
i = 0
while i < end_of_2:
if nums[i] == 0:
nums[end_of_0], nums[i] = nums[i], nums[end_of_0]
end_of_0 += 1
elif nums[i] == 2:
nums[end_of_2], nums[i] = nums[i], nums[end_of_2]
end_of_2 -= 1
i -= 1
i += 1
pri... | UTF-8 | Python | false | false | 584 | py | 342 | sort_colors.py | 322 | 0.517123 | 0.467466 | 0 | 26 | 21.5 | 55 |
XinyanWang/ZhihuAnalyse | 2,164,663,536,094 | 260118106236ccaacc1af09d800fde2d65016a31 | ff348930faa51f9ad32a103fda9a39749c9d280b | /UsersSpider.py | 1eecd7b8ab0980e246178ecf82805bde6d77ab45 | [] | no_license | https://github.com/XinyanWang/ZhihuAnalyse | 5677b12727ee84bedb2c23008e5a3e645daeb590 | d45466adf21ffd34afe1f93bef22d4eeb496f5b8 | refs/heads/master | 2021-01-01T05:34:13.128710 | 2015-06-01T09:39:17 | 2015-06-01T09:39:17 | 31,769,101 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
import re,time,pickle,requests
from BeautifulSoup import BeautifulSoup
from multiprocessing.dummy import Pool as ThreadPool
from lxml import etree
import zhihu_tools as tools
import UserInfos
def bridge(tp):
print 'working...'
try:
t=UserInfos.User(tp[0],tp[1])
except ... | UTF-8 | Python | false | false | 2,690 | py | 3 | UsersSpider.py | 2 | 0.609492 | 0.520553 | 0 | 111 | 23.063063 | 158 |
BlaCkinkGJ/Safety-Helmet-Embedded-Device | 7,198,365,204,332 | ac2328afbd3fbb0008e08ffd4095882c95fbaffa | 22628cdf787b56ca4705d3d38dfda5619a1a07ef | /Admin/res/signUp.py | 5c45ee7e7f9cc8b821f041cc64e6fe2c2bea965b | [
"MIT"
] | permissive | https://github.com/BlaCkinkGJ/Safety-Helmet-Embedded-Device | e9a57a40f2a9b23ad58ec275d7b38267c3b4e287 | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | refs/heads/master | 2020-03-22T15:29:12.353031 | 2018-09-11T09:17:43 | 2018-09-11T09:17:43 | 140,256,718 | 1 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'signUp.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import pipeline as pipe
import re
import hashlib
from res import signIn
from PyQt5.... | UTF-8 | Python | false | false | 8,288 | py | 26 | signUp.py | 16 | 0.647736 | 0.625344 | 0 | 194 | 40.201031 | 100 |
ersaijun/python_liaoxuefeng | 10,720,238,382,916 | 3c60fab6eb4d962af7442e9bac08b6935571e230 | b82afdc116e71a5f7c77fe46554a89cdd61598af | /6class.py | db66dceab035c6539f9b33555124bfd2d78f85bb | [] | no_license | https://github.com/ersaijun/python_liaoxuefeng | 600689e0154fc0f211d5071f8b9cb7befcf17caf | 7624a24cf06097a33f643e0245ad8425d4c862c7 | refs/heads/master | 2020-04-25T03:09:06.487807 | 2019-02-25T10:38:13 | 2019-02-25T10:38:13 | 172,465,798 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding : utf-8 -*-
# @Time : 2019/1/30 9:52
# @Author : Kaspar
# @File :6class.py
# 在Python中,实例的变量名
# 如果以__开头,就变成了一个私有变量(private),只有内部可以访问,外部不能访问
class Student(object):
def __init__(self, name, score):
self.__name = name # 私有
self.__score = score
def print_score(self):
... | UTF-8 | Python | false | false | 669 | py | 11 | 6class.py | 10 | 0.590018 | 0.561497 | 0 | 24 | 22.416667 | 53 |
sgdlavoie/python-coding-challenges | 6,399,501,297,072 | 74de9498d6703bf8f85c8af269054e5fe652b42f | fc99e21a006400b8b47d6ecee1d3ac346f0b364f | /websites_programming_challenges/euler/problem017.py | 6b5d811c6c9cc9baaf4ad0cdf888cdadb79cb99f | [] | no_license | https://github.com/sgdlavoie/python-coding-challenges | 0624528e3d4470ece3c521db037615d4afd20708 | 8f533d325a989a2439258cf18539d4d207d756e3 | refs/heads/master | 2018-10-15T03:26:33.723015 | 2018-10-14T14:54:08 | 2018-10-14T14:54:08 | 117,031,573 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # What is the sum of the digits of the number 2^1000?
number_exponent = str(2 ** 1000)
list_number_exponent = []
for char in number_exponent:
list_number_exponent.append(int(char))
print(sum(list_number_exponent))
| UTF-8 | Python | false | false | 221 | py | 165 | problem017.py | 164 | 0.719457 | 0.674208 | 0 | 9 | 23.555556 | 53 |
SamElliott4/LOST | 18,305,150,649,339 | 73e9382c494396edc1da3c5fd7ce67477fa4eaf7 | b9af5ab6f6c8f1fd10f5d6ce80236661baea3dec | /import/import_data.py | 5c30889c88f5105c0a784f8356e00bfff075a462 | [] | no_license | https://github.com/SamElliott4/LOST | 280d22edad275259f71293b50686dd1ad24399b3 | 61c4d302fb90ea7218c3810bb0e04a4e42fdc8c3 | refs/heads/master | 2021-01-11T23:35:58.423879 | 2017-03-22T05:00:17 | 2017-03-22T05:00:17 | 78,607,018 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # vim: background=dark
import csv
import sys
import psycopg2
dbname = sys.argv[1]
path = sys.argv[2]
db = psycopg2.connect(dbname=dbname, host='/tmp/', port='5432')
cur = db.cursor()
def main():
global db, cur, path
# import users and facilties first, no internal dependencies
# users
with open(path... | UTF-8 | Python | false | false | 6,151 | py | 30 | import_data.py | 11 | 0.528369 | 0.519265 | 0 | 143 | 41.993007 | 153 |
primarinovic/python | 3,289,944,991,392 | cac052f2f4c24656901536b225fb2ec5d9efeceb | ff4adaa003e35007057fd6d36a1ce004a610cffc | /18 seno, cosseno e tangente.py | ed98e5a70c6896a802b07e334950e5fec04ee676 | [] | no_license | https://github.com/primarinovic/python | 8ec1981565c4edcd6bb01b8303da1785ca3a0792 | b4a980479e0c5186dc63eaca95bda1a969053935 | refs/heads/master | 2022-12-14T06:30:06.852018 | 2020-09-26T15:06:51 | 2020-09-26T15:06:51 | 282,308,240 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from math import sin, cos, tan, radians
angulo = float(input('Informe o ângulo: '))
print(f'O seno de {angulo}° é {sin(radians(angulo)):.2f}. \nO cosseno de {angulo}° é {cos(radians(angulo)):.2f}.')
print(f'A tangente de {angulo}° é {tan(radians(angulo)):.2f}.')
| UTF-8 | Python | false | false | 272 | py | 45 | 18 seno, cosseno e tangente.py | 44 | 0.664151 | 0.65283 | 0 | 6 | 43.166667 | 114 |
nobleblackk/InterviewBit | 6,519,760,391,864 | b7889eda32f7113d5c34d289308d79a5a049bc6e | e962954e5fb86615e30449fe7e437d8c8d4010c9 | /Arrays/Maximum_Absolute_Difference.py | 4bbdf5f26eecc547a7d463c5bf0d19185a631965 | [] | no_license | https://github.com/nobleblackk/InterviewBit | d41f4c9c1601f2a8de07c26c40b5ec9a9c7004a4 | 78485d70585bf9b58445cc8fd559647bb6c8aa68 | refs/heads/master | 2020-09-04T05:14:52.346876 | 2019-11-24T15:12:39 | 2019-11-24T15:12:39 | 219,665,598 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
# @param A : list of integers
# @return an integer
def count(self,A,i,j):
Sum=abs(A[i]-A[j])+abs(i-j)
return Sum
def maxArr(self, A):
res=0
for i in range(len(A)):
for j in range(1,len(A)):
temp=self.count(A,i,j)
... | UTF-8 | Python | false | false | 408 | py | 11 | Maximum_Absolute_Difference.py | 10 | 0.433824 | 0.428922 | 0 | 14 | 26.857143 | 39 |
jketts/QuantumGraphState | 3,152,506,021,665 | c978796ecb8d1dab718167a440d7b46f1c522f95 | af4477bcc8160afab0c1ac8477311c6e7946dbb6 | /convert.py | 378a92aa9c71e069a5c11bef852e789627bab0b7 | [] | no_license | https://github.com/jketts/QuantumGraphState | 0c6586dcfc7d2f2b6c97cb3d390b2b73a6901685 | 5bff321e450d3db6fc94d620acdf7900afe1b3ce | refs/heads/master | 2021-01-18T13:32:26.006097 | 2015-09-16T06:23:17 | 2015-09-16T06:23:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!usr/bin/python
import itertools
import numpy as np
def EdgeListtoAdjacency(edgeList,dim):
#generating adjacency matrix from ground up
Matrix = np.zeros((dim,dim),dtype=int)
for edge in edgeList:
Matrix[edge[0]][edge[1]]=1
Matrix[edge[1]][edge[0]]=1
return Matrix
def AdjacencytoEdgeL... | UTF-8 | Python | false | false | 502 | py | 8 | convert.py | 4 | 0.659363 | 0.645418 | 0 | 19 | 25.368421 | 65 |
nickvandewiele/RMG-database | 18,313,740,582,530 | 704df1658be6b8a7889dc1ec8565e37904eeac42 | 104a0ec7cfb5d4bf948f22b47edb59122a886363 | /input/kinetics/libraries/Sulfur/DMDS.py | fb061e4303ff8bc85be61c161ef286df152b55d8 | [] | no_license | https://github.com/nickvandewiele/RMG-database | 3afbe88df46a5641c6abbaf032bf4a0b6b9aae73 | dc3cbc7048501d730062426a65d87ea452e8705f | refs/heads/master | 2020-12-25T08:19:49.436773 | 2014-08-04T21:37:26 | 2014-08-04T21:37:26 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# encoding: utf-8
name = "Sulfur/DMDS"
shortDesc = u""
longDesc = u"""
"""
entry(
index = 1,
reactant1 =
"""
C2H5SJ1
1 C 0 0 {2,S} {3,S} {4,S} {5,S}
2 C 1 0 {1,S} {6,S} {7,S}
3 S 0 2 {1,S} {8,S}
4 H 0 0 {1,S}
5 H 0 0 {1,S}
6 H 0 0 {2,S}
7 H 0 0 {2,S}
8 H 0 0 {3,S}
""",
product1 =
"... | UTF-8 | Python | false | false | 2,531 | py | 18 | DMDS.py | 18 | 0.519953 | 0.406164 | 0 | 134 | 17.880597 | 387 |
buaahsh/AnomalyClassifier | 13,168,369,746,154 | bf81b1da4757d089804a5d66056ffdda78500c24 | 728096b0983bbc5102bd89eae22d8be3552574e2 | /DBSCAN4AP/Model/Core/StandardScaler.py | c0cb1f176c7a8190742911e3de37f8609c233ad5 | [] | no_license | https://github.com/buaahsh/AnomalyClassifier | e0377375329aa960a2b74ee268da47ba914c3a2f | 428b0521ce8aa810b59061c658166b625287d7a3 | refs/heads/master | 2021-01-10T12:55:12.384184 | 2017-03-03T01:51:50 | 2017-03-03T01:51:50 | 46,794,905 | 3 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
standard scaler
The standard scaler is the preprocessing module, which can process the raw data.
"""
# Author: Shaohan Huang <buaahsh@gmail.com>
#
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.ut... | UTF-8 | Python | false | false | 4,131 | py | 86 | StandardScaler.py | 47 | 0.498184 | 0.494069 | 0 | 125 | 32.056 | 80 |
arossbrian/my_short_scripts | 9,277,129,374,823 | 1b81cee68a487b5e50df3678ae38088ee66a5382 | e0cbea0cb68f0ba5dba837dbe60067eb88e3d151 | /factors.py | 120c668ef52ae290eca71ba2f68c33e1e14fec23 | [] | no_license | https://github.com/arossbrian/my_short_scripts | 74fb689ac25feaffb14437496902ee1a0dcc5b60 | a34923f7ecbf027d8a0704400fcfb3e71ed662fd | refs/heads/master | 2023-05-24T16:45:51.050321 | 2023-05-11T16:20:30 | 2023-05-11T16:20:30 | 195,057,250 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #has a function that divide evenly an integer
def factors():
number = input("Please enter an integer to find its factors : ")
print("THe number entered is ", str(number))
for number in range(0, int(number)):
if (int(number) % 2) == 0:
print(str(number), "is divisble by 2")
... | UTF-8 | Python | false | false | 437 | py | 76 | factors.py | 66 | 0.578947 | 0.562929 | 0 | 12 | 34.25 | 68 |
xxxwarrior/Basic-Design-Patterns-Python | 3,255,585,230,770 | 28e3862697dc263e9ee2515a0f9159709df4f953 | 5d57c2a7d66ec3605e86d0ac52ee55d0e736bee8 | /Observer/observer.py | 1eac3ba842b3572d99be651f51d69104ccbe03db | [] | no_license | https://github.com/xxxwarrior/Basic-Design-Patterns-Python | 1183fb5caea8fd9981dc0b7dc73154fd2a180beb | 882edf988e958e3605edcfb607410ffdbc539d3d | refs/heads/main | 2023-01-07T14:45:04.765236 | 2020-11-07T21:50:55 | 2020-11-07T21:50:55 | 310,418,401 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Observer is used to define "one-to-many" relations betweeen the objects,
so when the state of one (observable) object changes, all its dependents (observers) are notified,
usually by calling one of their methods.
"""
from typing import Any
class Observer:
def update(self, observable: 'Observable... | UTF-8 | Python | false | false | 1,407 | py | 47 | observer.py | 23 | 0.628287 | 0.628287 | 0 | 53 | 24.509434 | 99 |
don-luigi/asc | 16,243,566,318,426 | e75f22738ba281c0e093b748ccc468d4051b3359 | a0d81d56f064b37bcb1e8c137b10127349880c70 | /lab03 - concurenta/lab03.py | 21f9e4cb8b9ee5c18cf65c33f2dfba8fb470c9ce | [] | no_license | https://github.com/don-luigi/asc | 1dae31c643e9d0e37cae8f5013d13c935430022a | ce634276f9f4fa3b53cb87f7d79bb89d476b9662 | refs/heads/master | 2022-08-01T15:56:16.825438 | 2020-05-28T15:13:38 | 2020-05-28T15:13:38 | 267,662,828 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from threading import *
numThreads = 4
self.numThreads = numThreads
self.countThreads = numThreads
self.countLock = Lock()
self.countLock2 = Lock()
self.threadsSem = Semaphore(0)
self.threadsSem2 = Semaphore(numThreads)
self.countThreads2 = numThreads
def barrier(self):
self.threadsSem2.acquire()
self.countLock.ac... | UTF-8 | Python | false | false | 940 | py | 25 | lab03.py | 15 | 0.738298 | 0.718085 | 0 | 36 | 25.138889 | 96 |
Senuch-Uzair-Tariq/Workspace | 14,568,529,079,968 | 1921fb3abab0ea542280e3cf95211f516d5cf3a4 | d63387eedaeca0f86177ea61eb856679b86b3017 | /Python Mark Lutz- Volume 1/Python52.py | d74dc67633eef6aec5d5d2f6bec32ccb1110e038 | [] | no_license | https://github.com/Senuch-Uzair-Tariq/Workspace | c5923cb0dc135672a819f162845ea2c90abcc795 | 2f7b35c207397f07a781c31d70a57f64e5fe59a4 | refs/heads/master | 2021-06-27T16:22:46.438618 | 2017-09-17T15:33:51 | 2017-09-17T15:33:51 | 103,842,193 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | l1,l2,l3,l4=[1,2,3,4,5],[5,4,3,2,1],{1,2,3,4,5},set([1,2,3,4]);
print(l1);
print(l2);
print(l3)
print(l4)
s={'spam'}
print(s) | UTF-8 | Python | false | false | 125 | py | 262 | Python52.py | 257 | 0.552 | 0.336 | 0 | 7 | 17 | 63 |
BrandonCline/wheeler | 6,270,652,286,672 | 463153e9f10507d67e166d1e9408bc99ef4cb410 | 1cc1703c4d0c7d61c682272d89f9a0184e96ac5a | /tests/caviar/math_tests.py | 195227fb3a25fd5ba4f093e7b6242e1f614cc7a5 | [] | no_license | https://github.com/BrandonCline/wheeler | a254a743854395a2aa0964a7c2c3f3c253ca7cf1 | f23f7deddb3feb6ba90e46b5c670f6f20a26e91a | refs/heads/master | 2021-01-22T19:36:37.369334 | 2013-09-14T20:31:42 | 2013-09-14T20:31:42 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
from category import *
from common import *
from interpreter.tools import parse
class TestMath(unittest.TestCase):
def test_simple_addition(self):
expression = '1 + 2'
result = parse(expression, ROOT).evaluate()
self.assertTrue(result.has('3'), "Expected 3 in the result but I see: %s" % resu... | UTF-8 | Python | false | false | 957 | py | 26 | math_tests.py | 21 | 0.659352 | 0.646813 | 0 | 43 | 21.255814 | 95 |
tarunkant/webhacking.kr | 2,465,311,250,441 | 158e2728011f5b60b6c96859a87839a8da2ef547 | 83e44cdfe8fada6a8e53df830e851a3f9f577886 | /c_21.py | 9f2f648779db4bdb9629a1151183f7adb997de68 | [] | no_license | https://github.com/tarunkant/webhacking.kr | f675073c73a1fbd6a86ecf990f905f4e6731d9fb | e1d7858703aeffcfabb56415f7e6173edc4e650b | refs/heads/master | 2021-06-13T10:26:57.062502 | 2017-03-29T12:46:08 | 2017-03-29T12:46:08 | 82,685,224 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from time import time
import requests
cookie = {'PHPSESSID': 'c8b31fd8eb78951438782461b686983a'}
url = "http://webhacking.kr/challenge/bonus/bonus-1/index.php?no=1 "
dbname= ""
#Password is
for i in range(1, 20):
for j in range(40, 125):
query = url + " or if(ascii(substr(pw," + str(i) + ",1))=" + str(... | UTF-8 | Python | false | false | 582 | py | 5 | c_21.py | 4 | 0.556701 | 0.489691 | 0 | 22 | 25.090909 | 100 |
GabrielSalvadorCardoso/restful_ide | 2,911,987,870,031 | 9a7a836e6660520e37abc28e55651e6c7efd82f8 | 7089434d753c769a81598096d9d63ce8766a450d | /bcim/temp.py | 5eb9d81fb5487d3a01946ff5e92fb877f4e4d1b3 | [] | no_license | https://github.com/GabrielSalvadorCardoso/restful_ide | 86404da80af27431d3cc2a54d394c04c0a578b30 | 4aa065b19f5461f7fac3031ed93b3f8f72ef0d18 | refs/heads/master | 2022-05-22T09:38:47.288791 | 2019-12-06T19:42:42 | 2019-12-06T19:42:42 | 201,837,422 | 0 | 0 | null | false | 2022-04-22T22:08:57 | 2019-08-12T01:40:13 | 2019-12-06T19:42:45 | 2022-04-22T22:08:55 | 165 | 0 | 0 | 2 | Python | false | false | 'edif-pub-militar': reverse('bcim:EdifPubMilitar_list', args=args, kwargs=kwargs, request=request),
'adm-edif-pub-militar-p': reverse('bcim:AdmEdifPubMilitarP_list', args=args, kwargs=kwargs, request=request),
'posto-fiscal': reverse('bcim:PostoFiscal_list', args=args, kwargs=kwargs, request=request),
'edif-agropec-ext... | UTF-8 | Python | false | false | 6,209 | py | 14 | temp.py | 9 | 0.774199 | 0.774199 | 0 | 63 | 97.555556 | 128 |
aminehadbi/binance-alerts | 4,226,247,850,802 | 129089bc267409571038787316fdc07be13ded7b | 68b9ea8391efa466d21906b6db63fd6fb40bf07b | /server.py | 8207d07607dc001729f9049f1a601c9752ef7721 | [] | no_license | https://github.com/aminehadbi/binance-alerts | f7fb1ecbe8fdd624c1c2724e2b50ef8f2878baf2 | c3189800fd447ea8cdf3c9fc5963025491e877c6 | refs/heads/main | 2023-04-28T23:35:22.828483 | 2021-05-12T15:54:38 | 2021-05-12T15:54:38 | 356,705,386 | 7 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
import requests
# Restrict to a particular path.
class RequestHandler(SimpleXMLRPCRequestHandler):
rpc_paths = ('/RPC2',)
# Create server
with SimpleXMLRPCServer(('0.0.0.0', 8000),
requestHandl... | UTF-8 | Python | false | false | 2,082 | py | 9 | server.py | 7 | 0.534582 | 0.519693 | 0 | 67 | 30.074627 | 85 |
realnumber666/LeetCodeEveryday | 14,001,593,397,314 | 505b97ea3cef1132deabc978063bda930833935d | 6289684e00446f49e35acd14b9b6c78a172160d9 | /21.merge-two-sorted-lists.py | cfabbca490f183f838c294f8df17541f0ae001fa | [] | no_license | https://github.com/realnumber666/LeetCodeEveryday | 08eab16a80ec09cf2a8f7b301eff4d464f62fe17 | 9fa6778e48808db5ceab00833a60ac712acbed7e | refs/heads/master | 2023-07-23T06:22:43.815413 | 2023-07-17T10:35:31 | 2023-07-17T10:35:31 | 168,924,686 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# @lc app=leetcode id=21 lang=python3
#
# [21] Merge Two Sorted Lists
#
# https://leetcode.com/problems/merge-two-sorted-lists/description/
#
# algorithms
# Easy (45.31%)
# Total Accepted: 513.1K
# Total Submissions: 1.1M
# Testcase Example: '[1,2,4]\n[1,3,4]'
#
# Merge two sorted linked lists and return it as a ... | UTF-8 | Python | false | false | 1,998 | py | 29 | 21.merge-two-sorted-lists.py | 26 | 0.52051 | 0.482262 | 0 | 67 | 25.791045 | 73 |
alainrk/pretix | 13,340,168,437,814 | cc633f374bd47aed63c4262f6ef49d61ada6af9f | 2660859a9e1a73da695a42d73b75863e02185dce | /src/pretix/plugins/stripe/views.py | eb74521d88bc6b59834aca87d6c55664322d291b | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | https://github.com/alainrk/pretix | d4931a5528cfd42b1a9d9fb1b1df02aeee507171 | 867a8132aa1ed73dd9513efae5b3c46b5bbae140 | refs/heads/master | 2021-01-18T19:49:27.366758 | 2017-04-01T13:23:11 | 2017-04-01T13:23:11 | 86,915,380 | 1 | 0 | null | true | 2017-04-01T13:31:04 | 2017-04-01T13:31:04 | 2017-04-01T08:00:33 | 2017-04-01T13:23:32 | 10,595 | 0 | 0 | 0 | null | null | null | import json
import logging
import stripe
from django.contrib import messages
from django.db import transaction
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.views.decorato... | UTF-8 | Python | false | false | 4,533 | py | 148 | views.py | 78 | 0.655416 | 0.649239 | 0 | 110 | 40.209091 | 124 |
bressanmarcos/pade-plus | 16,724,602,666,138 | 48765eb39fd9a971fa184e5c7817cd57d50a808e | 619840d0d50450c298665187ba9167301b9c9faa | /examples/concurrent_request.py | 5100c2bdedce80108b15e6ac5d3e4557ded8e762 | [
"MIT"
] | permissive | https://github.com/bressanmarcos/pade-plus | fe28b1df693c5bbc01ce16710fdd4104d38114fe | b879a3c543f6c291a8779879efdc8119ce8ed0d5 | refs/heads/master | 2023-02-26T10:17:20.527373 | 2021-02-01T02:13:46 | 2021-02-01T02:13:46 | 318,867,663 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
from random import randint, random
from pade.acl.aid import AID
from pade.acl.messages import ACLMessage
from pade.behaviours.highlevel import *
from pade.behaviours.highlevel import FipaRequestProtocol
from pade.plus.agent import ImprovedAgent
from pade.misc.utility import display_message, start_loop
from... | UTF-8 | Python | false | false | 2,493 | py | 15 | concurrent_request.py | 14 | 0.620939 | 0.602086 | 0 | 80 | 30.1625 | 78 |
Leon109/IDCMS-Web | 7,370,163,896,699 | 5ec65c3afb9c53683d5a4ad5d32f2363ddac0c40 | 5251be65c0e7297be4f9f27626827e2181e24622 | /web/app/ticket/notice/views.py | 5fe8d885a07bbb3c3461d4133debbdf88b75807f | [
"Apache-2.0"
] | permissive | https://github.com/Leon109/IDCMS-Web | 0c119d00f44367f4e3af992d62c54504817b1e16 | b15c9ef447f89d08f836123eb87e8f1e0e550428 | refs/heads/master | 2017-11-02T13:46:34.055635 | 2016-09-07T09:07:53 | 2016-09-07T09:07:53 | 42,795,127 | 3 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding=utf-8
from .forms import NoticeForm
from ..same import *
from app.models import Notice
check_field = ['title', 'body']
endpoint = '.notice_view'
@ticket.route('/ticket/notice/view', methods=['GET', 'POST'])
@login_required
def notice_view():
task_info = ticket_status()
page = request.args.get('page... | UTF-8 | Python | false | false | 1,825 | py | 86 | views.py | 66 | 0.622173 | 0.617209 | 0 | 53 | 33.207547 | 92 |
boraxpr/bitesofpy | 9,268,539,474,426 | 835c410c1ea013c7d6c0447a64c6dd7e08bf0448 | b24302829278afbc8d95fa6e70aa11fd9ff983b6 | /127/ordinal.py | 6f1a8b117dea4bf42078069f140c31e98b383681 | [] | no_license | https://github.com/boraxpr/bitesofpy | 1e01351021153dfe8a69b958593e90c6438f84b0 | ff0176e029ddbc6469ecf79ea9fc1c3ff284c2e5 | refs/heads/master | 2023-05-10T22:27:01.093996 | 2023-05-07T11:59:52 | 2023-05-07T11:59:52 | 215,345,303 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def get_ordinal_suffix(number):
"""Receives a number int and returns it appended with its ordinal suffix,
so 1 -> 1st, 2 -> 2nd, 4 -> 4th, 11 -> 11th, etc.
Rules:
https://en.wikipedia.org/wiki/Ordinal_indicator#English
- st is used with numbers ending in 1 (e.g. 1st, pronounced first)
... | UTF-8 | Python | false | false | 1,283 | py | 75 | ordinal.py | 73 | 0.603274 | 0.539361 | 0 | 25 | 50.28 | 82 |
profitware/restful-image-rotator | 5,592,047,448,504 | 48fed2046c07cb9cbda4ddd1a7e2702af4dab270 | dbf128fe8ac2bfd891b0c680902b315b18a69e58 | /rotator/api/v1/__init__.py | fe87e00964556f748bc40791ac35e7651e0a6331 | [
"MIT"
] | permissive | https://github.com/profitware/restful-image-rotator | ffd1914c59e8a9ec7b7121906614fc4c260473f4 | d396b60e905a9d96ef5dd5d77df741b64094c660 | refs/heads/master | 2020-05-19T08:46:22.942916 | 2015-02-10T14:38:46 | 2015-02-10T14:38:46 | 30,429,682 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'Sergey Sobko'
from json import dumps
from twisted.web.resource import Resource
from rotator.api import log_me
from rotator.api.v1.common import check_content_type, has_api_method, generate_link, \
API_VERSION, RELS
class RootResource(Resource):
# pylint: disable=too-f... | UTF-8 | Python | false | false | 1,372 | py | 17 | __init__.py | 14 | 0.599854 | 0.595481 | 0 | 58 | 22.655172 | 86 |
MMaltez/CLItools | 6,451,040,916,468 | 66553232d8cae4545053c359039e3dc2338acbdb | 4b9bed2f2d618a74cc1d0fe3c055d743093fd175 | /spaces2tab.py | aa0f984c1f6dd586c26760841fd6ba84265c5707 | [] | no_license | https://github.com/MMaltez/CLItools | e05d14b510c774dea8967db3803ac334a1de2f66 | 9c6af2019a2910301f8401a736e47d66df276f2a | refs/heads/master | 2020-04-21T02:49:03.041256 | 2019-11-04T11:53:52 | 2019-11-04T11:53:52 | 169,266,232 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Convert leading spaces to tabs.
@author Miguel Maltez Jose
@created 20180525
"""
import sys
def spaceCount(line):
"""Returns number of leading spaces."""
i = 0
while line[i] == " ":
i += 1
return i
def processFile(infile, outfile, identation=4):
for line in inf... | UTF-8 | Python | false | false | 1,117 | py | 10 | spaces2tab.py | 8 | 0.655327 | 0.641898 | 0 | 50 | 21.34 | 73 |
LizaPersonal/personal_exercises | 4,501,125,735,818 | ad2e21d4c35932b4de9e978ff3d240de3a01f85f | c6dc8b682aea706b18b05952f791e01989db3669 | /LearnHardWay/ex48/tests/parser_tests.py | a91091c85cd33a844b266b0549e58d6a7f2ac156 | [] | no_license | https://github.com/LizaPersonal/personal_exercises | aeb9ceb2593a6d5ee1a8e9f7c0862ce638acd29b | 649dc0c116861995fbf58b4736a0c66fd75d648c | refs/heads/master | 2021-04-03T02:17:51.850676 | 2018-07-31T21:10:59 | 2018-07-31T21:10:59 | 125,123,778 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from nose.tools import *
from ..ex48 import parser
def test_peek():
assert_equal(parser.peek([('direction', 'north')]), 'direction')
result = parser.peek([('noun', 'ball'),
('verb', 'throw')])
assert_equal(result, 'noun')
def test_match():
assert_equal(parser.match([('direc... | UTF-8 | Python | false | false | 2,310 | py | 80 | parser_tests.py | 68 | 0.515584 | 0.514719 | 0 | 65 | 34.553846 | 102 |
nicolassnider/python_39 | 5,798,205,880,354 | 12af0f49f5090bf0cfb4be5a65668642c2f81f57 | 94a20c93910120d673d2a0f3dd7d648912d0df53 | /seccion16/47 - ej1.py | 314243a98f7a3bf39baa5c56ffd4401e42456138 | [] | no_license | https://github.com/nicolassnider/python_39 | 548a8af706e163ec34bf8cea606c5171a4a736b0 | 2edf11be473a842fa426d47aacbe80fd370d8f10 | refs/heads/master | 2023-02-05T23:11:20.636687 | 2020-12-18T02:58:32 | 2020-12-18T02:58:32 | 316,996,398 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def superposicion(lista1, lista2):
"""
docstring
"""
for el in lista1:
for el2 in lista2:
return True
pass
return False
l1 = [1,2,3,4,5]
l2 = [10,9,8,7,6]
print (superposicion(l1,l2))
| UTF-8 | Python | false | false | 233 | py | 65 | 47 - ej1.py | 56 | 0.540773 | 0.454936 | 0 | 15 | 14.533333 | 34 |
Smirl/baroness | 609,885,369,983 | 343852212262224b71720e8be6fd10c077279ad1 | 1bc94e2249e01a5992fdb8ff6f9d95da58eb37b4 | /tests/check_version.py | 6d711a7ec08b409e9bc2a536205dda516e952f87 | [] | no_license | https://github.com/Smirl/baroness | 34ce0762d34dead02db73f69d2a88d45a5ccb4dc | 3286ecbb835d0f9dcbcba83a37b182bc8b59e7d0 | refs/heads/master | 2021-09-24T21:54:45.081672 | 2018-10-15T09:40:49 | 2018-10-15T09:40:49 | 112,948,604 | 3 | 0 | null | false | 2018-10-15T09:40:50 | 2017-12-03T17:33:32 | 2018-10-15T09:32:32 | 2018-10-15T09:40:49 | 23 | 1 | 0 | 0 | Python | false | null | """Test that version in version.txt if unique when we deploy."""
from collections import namedtuple
from functools import total_ordering
import os
import subprocess
import re
SEMVER_REGEX = re.compile('^(\d+)\.(\d+)\.(\d+)$')
@total_ordering
class Version(namedtuple('Version', 'major minor patch')):
"""A name... | UTF-8 | Python | false | false | 1,808 | py | 14 | check_version.py | 8 | 0.605088 | 0.605088 | 0 | 58 | 30.172414 | 109 |
woohams/Python | 7,112,465,860,402 | 4d51270476e3a0027df81e88c0de8e499becae2c | 8f72a48dbc8e066f2c8aa72a04d913c254b12781 | /01_start.py | ae9e63eafcca672edecb70010492d77e015c511a | [] | no_license | https://github.com/woohams/Python | 2a0ee367cfdc609ee3ce72a0275a14921795d923 | af72dea3e0e5747dab056d0ff5bbe9456d22cfed | refs/heads/master | 2020-06-18T16:06:19.216659 | 2019-10-05T16:33:43 | 2019-10-05T16:33:43 | 196,359,124 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #주석
'''
들여쓰기 4개 / 들여쓰기 2개 / tab 1개
REPL : Read Eval Print Loop
Interactive shell : 대화식 프로그램 환경, 대화형
'''
# 변수 = 값
a = 100
b = 200
# 출력
print(a)
print(b)
print(a+b)
# 문자 출력
print('a')
print("a")
print('a'+"b")
# type이 달라서 + 불가
print("a = " + a)
| UTF-8 | Python | false | false | 373 | py | 34 | 01_start.py | 33 | 0.477816 | 0.447099 | 0 | 26 | 9.115385 | 41 |
byuccl/spydrnet | 6,528,350,335,336 | f3c254225790a049327d24330dd7b2f4aa2ff20f | b19c00e9af1a6971e0a38220d8936afb0c0d312e | /spydrnet/composers/verilog/tests/test_composer_unit.py | 2c8082078e07ce4ee122d5ab421ecc7687608d1f | [
"BSD-3-Clause"
] | permissive | https://github.com/byuccl/spydrnet | 94519f4f6731552890b155af54f4e06df78dd7ed | ea580b6b9f81821f6ed9a5e14929ccb21498e5b4 | refs/heads/master | 2023-06-01T13:26:29.410556 | 2023-04-18T17:12:23 | 2023-04-18T17:12:23 | 210,388,987 | 66 | 16 | BSD-3-Clause | false | 2023-09-14T18:25:04 | 2019-09-23T15:25:09 | 2023-09-11T04:51:53 | 2023-09-14T18:25:03 | 47,821 | 65 | 17 | 44 | Python | false | false | #Copyright 2021
#Author Dallin Skouson
#see the license for details
#
#Tests the verilog composers functions and output
from collections import OrderedDict
import unittest
from unittest.case import expectedFailure
import spydrnet as sdn
from spydrnet.composers.verilog.composer import Composer
from collections import O... | UTF-8 | Python | false | false | 22,662 | py | 198 | test_composer_unit.py | 149 | 0.6003 | 0.591828 | 0 | 632 | 34.856013 | 171 |
lmb633/leetcode | 8,297,876,834,201 | cbefdd38853ed4d731579671cad6f52d45894b04 | c0fad90611a6e943277c3d79eeb48ccd5f0d0a88 | /300lengthOfLIS.py | 619c2d00f89b68d69730096a3f6b594710c323aa | [] | no_license | https://github.com/lmb633/leetcode | e2da31984af07b9e16787f4d57f82dab2dcb551a | d91568d245dd8fb66f46ff73737cbad974f490a6 | refs/heads/master | 2021-07-19T16:07:40.864854 | 2021-02-24T10:57:40 | 2021-02-24T10:57:40 | 243,146,182 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def lengthOfLIS(self, nums):
length = len(nums)
if length == 0:
return 0
result = [1 for i in range(length)]
for i in range(length):
for j in range(i):
if nums[i] > nums[j]:
if result[j] > re... | UTF-8 | Python | false | false | 1,480 | py | 138 | 300lengthOfLIS.py | 138 | 0.426351 | 0.414865 | 0 | 46 | 30.173913 | 62 |
francocruces/todolst-bdd | 5,042,291,633,586 | 19be062b5ef9a6966b06fcd071116a8e5994c031 | 9f5f2a3a507a23ac5be4e4e5411d0b987b30a334 | /todolist/models.py | 09621505bb64bfbaa7918c805aa69a3e0f385e40 | [] | no_license | https://github.com/francocruces/todolst-bdd | df0adbe25cae2f03f904613dc3acb6e9eaba3428 | b9ed6aaf94e7f25d033b515f9459b2af9494968d | refs/heads/master | 2020-03-09T21:16:03.458769 | 2018-04-27T13:53:20 | 2018-04-27T13:53:20 | 129,004,959 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import unicode_literals
from django.db import models
class Task(models.Model):
name = models.CharField(max_length=256)
| UTF-8 | Python | false | false | 145 | py | 9 | models.py | 3 | 0.731034 | 0.710345 | 0 | 6 | 22.5 | 43 |
opendr-eu/opendr | 1,778,116,490,453 | c160a7734be71d10297247cc3e670151ed2c6152 | 5f69a6549b8d5e417553d910622e6855b2ae679b | /projects/python/perception/pose_estimation/lightweight_open_pose/demos/wave_detection_demo.py | c7febd532f66a3ae362f8ad73d880dab9ca66411 | [
"Apache-2.0"
] | permissive | https://github.com/opendr-eu/opendr | 822219f709613d77c5eb62c5d02808d344239835 | b3d6ce670cdf63469fc5766630eb295d67b3d788 | refs/heads/master | 2023-08-31T07:02:36.375231 | 2023-08-29T06:39:51 | 2023-08-29T06:39:51 | 293,755,225 | 535 | 82 | Apache-2.0 | false | 2023-09-13T16:53:34 | 2020-09-08T08:55:04 | 2023-09-11T17:57:18 | 2023-09-13T16:53:33 | 2,450,511 | 539 | 86 | 22 | Python | false | false | # Copyright 2020-2023 OpenDR European Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | UTF-8 | Python | false | false | 9,241 | py | 1,235 | wave_detection_demo.py | 821 | 0.558922 | 0.539011 | 0 | 217 | 41.585253 | 115 |
JoeBarcus/flask_api | 2,551,210,592,756 | 548a783efef389db30db9ae95064c69bb1533e0d | 83faa30de7906563453529db8085632293d9b946 | /flask-restful/venv/lib/python3.7/heapq.py | 23f252edf8c0714f770ce6263e54bafbfb72071f | [] | no_license | https://github.com/JoeBarcus/flask_api | 4aac140659ec1532b6aadb3a5d161fadba05092d | 2d3d110d8217fb04447a98a18fec6b3f5afaba2f | refs/heads/master | 2020-05-26T18:04:52.842158 | 2019-05-24T01:29:31 | 2019-05-24T01:29:31 | 188,328,999 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /home/joe/anaconda3/lib/python3.7/heapq.py | UTF-8 | Python | false | false | 42 | py | 46 | heapq.py | 44 | 0.809524 | 0.738095 | 0 | 1 | 42 | 42 |
gadia-aayush/sample | 10,093,173,167,334 | a1d7829491c95b519998cd6836801290c828ea80 | aa3b7c6a81a323d2e17a1be7cb7ce90a20d6099a | /cproject/get_address/apps.py | 52669702c1b80e14bca69b5dcc7a10ec50311b69 | [] | no_license | https://github.com/gadia-aayush/sample | fdf00a4a890af6e4380b133cc64d7df89c1defff | 145b83206f9fb0972d19bef9229da0c1bf0aede0 | refs/heads/master | 2022-12-22T16:54:50.228277 | 2020-08-18T20:26:05 | 2020-08-18T20:26:05 | 288,516,734 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.apps import AppConfig
class GetAddressConfig(AppConfig):
name = 'get_address'
| UTF-8 | Python | false | false | 96 | py | 82 | apps.py | 54 | 0.760417 | 0.760417 | 0 | 5 | 18.2 | 34 |
djohnson67/sPython3rd | 11,699,490,917,685 | 9cf1af42c51a4af9ae5f149de184fb9f9af0f6ce | c7a6cab7f62a55ca3afbca629103e2d28d822f26 | /math/io/file_write.py | 2a557be59b3b6e6513d2d52ee18654636223e289 | [] | no_license | https://github.com/djohnson67/sPython3rd | e7610c967aa5164e0ed2d2f414dba7e0ef6c1cd3 | dae305182fbd84bb58761a3fcd8e564afe88779d | refs/heads/master | 2020-05-15T09:20:54.878008 | 2019-05-05T16:45:45 | 2019-05-05T16:45:45 | 182,175,315 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #writes 3 lines of data to a file
def main():
#open file
outfile = open('philosophers.txt','w')
#write three names
outfile.write('John Locke\n')
outfile.write('David Hume\n')
outfile.write('Edmend Burke\n')
#close file
outfile.close()
#cal main
main() | UTF-8 | Python | false | false | 300 | py | 43 | file_write.py | 42 | 0.606667 | 0.603333 | 0 | 15 | 18.133333 | 42 |
k-pom/turbo-adventure | 3,032,246,958,830 | 3f9f872c979dcad980243cd1e87701309129dbcf | 92962659c2c183fab4b0fb41906a2038767bbd81 | /lib/python2.7/site-packages/motor/util.py | d97f7ad62096947c56377954080ed2f6f8f96bdd | [] | no_license | https://github.com/k-pom/turbo-adventure | 67c37454094558879c50f26f236c5debd4b3e5ad | 06021f1ad07b5ca5c024d2b41b8f2b414af9388c | refs/heads/master | 2021-01-01T15:24:54.415683 | 2013-07-19T02:47:49 | 2013-07-19T02:47:49 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright 2013 10gen, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | UTF-8 | Python | false | false | 2,846 | py | 38 | util.py | 28 | 0.611384 | 0.605411 | 0 | 101 | 27.168317 | 74 |
CatdBD/assorted_PhD_code | 1,975,684,978,801 | 47ec15cbbbb36dc910e2d52912422ebb3e750196 | f3986effabae6251136b72a1f98c209a08ab02af | /TG_cf_Moster.py | 2f844cf12d534a8a0e2f1869e4f9a5ab1ea6f8a2 | [] | no_license | https://github.com/CatdBD/assorted_PhD_code | 261cef54fda090e1ee56f2e1467c170e862db693 | fdebaf554b97513a66f53465184134f42f9d4193 | refs/heads/master | 2019-11-19T20:49:40.086186 | 2017-02-03T11:34:37 | 2017-02-03T11:34:37 | 80,823,717 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
def import_digitised(fname):
import numpy as np
f = open(fname,"rb")
c = 0; x = []; y = []
print 'importing', fname,':'
print '======================='
for line in f:
c+=1
if c>6:
xy = line.rstrip(',\n').split(',')
x.append(xy[0])
y.append(xy[1])
... | UTF-8 | Python | false | false | 2,778 | py | 6 | TG_cf_Moster.py | 5 | 0.645428 | 0.586033 | 0 | 70 | 38.657143 | 143 |
manish33scss/comp_vision | 3,367,254,360,776 | 6c447f7859309c6bd487b16658aa5796422a897f | 39872eea40405c5434480670d089aa7ae226603c | /convertimage2videocv.py | 076aac85ba6028c4bf57fceda2da748922720b49 | [] | no_license | https://github.com/manish33scss/comp_vision | 663c11801870f5aa7da546d2d62be52066dcb568 | fffd2736df7aa319a07f31ed533bf7cfb26a426d | refs/heads/master | 2023-02-03T18:31:02.307378 | 2023-01-28T10:23:17 | 2023-01-28T10:23:17 | 187,157,861 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
import glob
import os
img_array = []
for filename in os.scandir(r"D:\Work\Data\steps"):
img = cv2.imread(filename.path)
height, width, layers = img.shape
size = (width,height)
img_array.append(img)
out = cv2.VideoWriter('try1.avi',cv2.VideoWriter_fourcc(*'DIVX'), 24, ... | UTF-8 | Python | false | false | 402 | py | 6 | convertimage2videocv.py | 5 | 0.674129 | 0.656716 | 0 | 18 | 21.333333 | 75 |
Rossonero/qlin | 12,927,851,601,329 | e3567a402e678cb972d6a0cbe1ea4fc59ddf0355 | 4d2a007fb3810d0b1de676d0193eb24cb0134180 | /parser/UrlTransID.py | 3e75f9766dd36a913b77ce1f300132ecaadcdd11 | [] | no_license | https://github.com/Rossonero/qlin | 241a822402beb4b05fe69f024978148a5758a765 | 02cc017daf3e540cfd9b5bfe7e021c176d5e90e1 | refs/heads/master | 2021-01-18T00:26:45.747983 | 2012-02-13T01:43:12 | 2012-02-13T01:43:12 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import os
import UrlSorter
class UrlTransID:
def __init__(self,url_ph):
'''
将urllist转化为docid
通过根据hash排序的方法
'''
self.urls=[]
f=open(url_ph)
lines=f.readlines()
f.close()
f... | UTF-8 | Python | false | false | 1,927 | py | 133 | UrlTransID.py | 41 | 0.450353 | 0.446012 | 0 | 107 | 15.607477 | 61 |
Eddie6382/python_practice | 8,718,783,610,973 | 0eaadbaa9bbbde24b101415c15da0aaf1d0af8e3 | 8ae87ae1120a4c30e43009eb393da939bc2cd1ec | /physics_hw/project/magnus_omega.py | bed33e4971cd3b4a8457d325568a90cd15748637 | [] | no_license | https://github.com/Eddie6382/python_practice | cb7e4d1b649f856e4c7e481ba51f7d8ff3e066b9 | a2b3b145a22f97bf0efdffafccd13e0328432823 | refs/heads/master | 2020-12-27T12:57:14.728715 | 2020-04-01T06:22:58 | 2020-04-01T06:22:58 | 237,911,201 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from vpython import *
g = vec(0, -9.8 ,0) # g = 9.8 m/s^2
size = 0.215 /2 # ball radius = 0.25 m
weight = 0.45 #ball weight
Cd = 0.47 #drag coefficient
Cm = 0.40 #magnus coefficient
Cw = 0.08 #rotational friction coefficient
rpm = 240 ... | UTF-8 | Python | false | false | 2,761 | py | 37 | magnus_omega.py | 31 | 0.544006 | 0.495473 | 0 | 70 | 37.328571 | 149 |
liuqinglong110/H-SRDC | 2,113,123,911,934 | 593ed7466f3ebd71f3ecbeac1482569d00f4bdf4 | b76baa268efa234b00899f2a33d49b4437551fed | /opts.py | 3a051343bf453c522bc8f8272f54c909e8f2d6d9 | [
"MIT"
] | permissive | https://github.com/liuqinglong110/H-SRDC | 661c42ea883d9fed3e3a75693cd74a1a345f2382 | 6595ac3a743ed85821091e1a07ca5742649d12f3 | refs/heads/main | 2023-07-14T14:17:37.865873 | 2021-08-24T13:33:20 | 2021-08-24T13:33:20 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
def opts():
parser = argparse.ArgumentParser(description='H-SRDC', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# datasets
parser.add_argument('--data_path_source', type=str, default='./data/datasets/Office31/', help='root of source training set')
parser.add_argument('--data... | UTF-8 | Python | false | false | 6,090 | py | 30 | opts.py | 7 | 0.706076 | 0.694745 | 0 | 72 | 83.583333 | 172 |
dushuai0/RegressionTest | 2,516,850,850,711 | 1fb9b948c1e36c34524f76e42ebd8ef65df05051 | b713546464131c4bd1aecbf3897446121ade96f7 | /src/utils/browser.py | e46232f6f6e9ea9187ccdc232c8864a2a6875e46 | [] | no_license | https://github.com/dushuai0/RegressionTest | 54e2a7f89eb0720f8b6663b1f7edd40dff76a0fa | e40ef04e9e3380a3ac566516f026831a1c07882a | refs/heads/master | 2020-07-22T17:40:03.416651 | 2019-09-09T09:54:30 | 2019-09-09T09:54:30 | 207,277,966 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
from selenium import webdriver
from src.utils.configurations import Settings, DRIVER_PATH
class UnSupportBrowserTypeError(Exception):
pass
class Browser:
def __init__(self):
self.browsertype = str(Settings.get_value_by_key('BROWSER_TYPE'))
if self.browsertype.lower() == 'chrome':
... | UTF-8 | Python | false | false | 1,222 | py | 28 | browser.py | 17 | 0.649755 | 0.649755 | 0 | 37 | 31.972973 | 105 |
npvoid/OnlineDoubleOracle | 6,176,163,014,763 | 98902a286b547ab2565cbefd0862d9434d6da4bd | 8c20a31d9afc40eac30e1bd2366fcf695a492483 | /games/kuhn_poker.py | d66a04bce04a4aa662b50ad12379522f9a1c4619 | [] | no_license | https://github.com/npvoid/OnlineDoubleOracle | ef1c600d9fb32ff6b28272b0138c08e66c2b1b91 | be94f316f7672951aff31d4baea3211bf7dd5288 | refs/heads/master | 2023-04-09T01:12:19.952646 | 2021-04-23T16:04:15 | 2021-04-23T16:04:15 | 360,935,047 | 11 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
"""
An implementation of Kuhn Poker based on following posts
https://ai.plainenglish.io/building-a-poker-ai-part-6-beating-kuhn-poker-with-cfr-using-python-1b4172a6ab2d
"""
import numpy as np
from typing import List, Dict
import random
import itertools
KUHN_INFOSTATES = ['KPB', 'K', 'QPB', 'Q', 'JPB', 'J', # turn f... | UTF-8 | Python | false | false | 5,915 | py | 12 | kuhn_poker.py | 11 | 0.569907 | 0.552663 | 0 | 157 | 36.452229 | 123 |
HeerKirov/sdust-online-judge | 10,084,583,214,666 | 300fd350c81ecef34ebc20bbbe574741fb71fb67 | 6c80a888f9cc3dda6522fb4af46436232fce0791 | /Judge/virtual-judge/conf.py | a46f6ebfaa66202eb6e925d150353f47c8de4d82 | [
"LicenseRef-scancode-sata"
] | permissive | https://github.com/HeerKirov/sdust-online-judge | e17032fa2911b39a6fa2e72cdd03f5af7ecf9c6f | e34bc34b1749caa2e3d1eb467cb40a82ce246a1b | refs/heads/master | 2021-01-21T10:13:43.101911 | 2018-04-17T12:00:36 | 2018-04-17T12:00:36 | 92,946,531 | 11 | 4 | null | true | 2017-08-29T13:17:44 | 2017-05-31T13:09:15 | 2017-08-02T13:51:32 | 2017-08-29T13:17:44 | 2,272 | 0 | 2 | 0 | Python | null | null | # == SDUSTOJ 通信相关设置 ==============================================================================================
# SDUSTOJ数据库的参数
pg_db = {
'user': 'heer',
'password': '1234',
'host': 'localhost',
'port': '5432',
'database': 'sdustoj_server'
}
# 用于监听SDUSTOJ消息的Redis的参数
redis_db = {
'host': 'lo... | UTF-8 | Python | false | false | 1,678 | py | 203 | conf.py | 79 | 0.429435 | 0.398522 | 0 | 77 | 18.324675 | 114 |
eddiejessup/chemopore | 4,776,003,674,325 | a7b65f3214dfa5ca224509ec694f77a8918ddd67 | 80ab5697e687b04b4473dc5eeb57275bf2b0d1b2 | /make_mesh.py | 850aa93caefea2b03672e49b46e92ed325afdabc | [] | no_license | https://github.com/eddiejessup/chemopore | c93a785a13bb4735ce5effdaff06137dc317f817 | d9c9d6d028288976015bfdf92a97775464f2713f | refs/heads/master | 2021-01-10T20:28:51.647085 | 2015-07-17T17:12:13 | 2015-07-17T17:12:13 | 24,348,844 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import fipy
import numpy as np
# All arguments on the left hand side are indices to the various constructions.
gmsh_text_box = '''
// Define the square that acts as the system boundary.
dx = %(dx)g;
Lx = %(Lx)g;
Ly = %(Ly)g;
// Define each corner of the square
// Arguments are (x, y, z, dx); dx is the desired cell s... | UTF-8 | Python | false | false | 2,606 | py | 10 | make_mesh.py | 10 | 0.545664 | 0.510361 | 0 | 95 | 26.431579 | 79 |
Rosie-Hasan/Keeping | 12,146,167,556,584 | f14db8df1e2126a9eb5e6ca65d46371c77e4fc0e | e4ce93e2910cf1e93cb5a82495a7095000a99547 | /Making_arrays.py | 1c6a17c016409ef64667ca285d22110841f15ace | [] | no_license | https://github.com/Rosie-Hasan/Keeping | 2d02dcb2ed6d5fa983dea4703fad1b84e40a8600 | beadf8bb106562898a59fea2a4f11fd32ea95abf | refs/heads/main | 2023-07-13T08:28:21.137451 | 2021-08-20T12:18:03 | 2021-08-20T12:18:03 | 398,018,082 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
from numpy import save
HLT_dict = np.load('HLT_dict.npy', allow_pickle='TRUE').item()
LRT_dict = np.load('LRT_dict.npy', allow_pickle='TRUE').item()
Offline_dict = np.load('Offline_dict.npy', allow_pickle='TRUE').item()
Truth_d... | UTF-8 | Python | false | false | 7,249 | py | 9 | Making_arrays.py | 9 | 0.532349 | 0.514002 | 0 | 296 | 22.47973 | 89 |
maya-shankar/flask-blog | 1,357,209,682,759 | 1ab32aba39c17378233389e6a09bf02c0eb328df | e0b49bcc851c2620a14b8df7a5cc3ca8b7922209 | /app.py | d31d24fae5b4e35fce6520f7324305d1805d06db | [] | no_license | https://github.com/maya-shankar/flask-blog | 955f59f5f3c236625371bc949d5ebcce47dc03ca | ec0f564b9b812d356d3d598b3cdfa3a685653579 | refs/heads/main | 2022-12-27T11:42:23.355306 | 2020-10-17T22:32:24 | 2020-10-17T22:32:24 | 304,897,103 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sqlite3
from flask import Flask, render_template, request, url_for, flash, redirect
import db
app = Flask(__name__)
app.config['SECRET_KEY'] = 'rGfS1AGyCIkOQN5inOgYNtfhAtYbQ5psY9D6g4d7CcZeHwFcUcLHPw=='
@app.route('/')
def index():
posts = db.get_posts()
return render_template('index.html', posts=post... | UTF-8 | Python | false | false | 1,553 | py | 4 | app.py | 2 | 0.611719 | 0.606568 | 0 | 56 | 26.732143 | 85 |
anurag3it/Happy_Hacking | 18,957,985,673,385 | fd56ac1d2f0b30e489747ef78bda8865be1a2cbf | 57e8e2ec13350bb55120ba51c1e73a3b3b5766f9 | /is_armstrong.py | d49e87c8ebf997f96a67cfb1d096ca3b2a513a77 | [
"MIT"
] | permissive | https://github.com/anurag3it/Happy_Hacking | 7121e970faa9b974da6daee0b6eff4354260b25c | 2981305e43633b0432f9d64cab39e6967431cf72 | refs/heads/master | 2020-04-03T07:47:40.472579 | 2018-10-28T20:43:04 | 2018-10-28T20:43:04 | 155,113,435 | 0 | 0 | null | true | 2018-10-28T20:39:02 | 2018-10-28T20:39:02 | 2018-10-28T16:42:39 | 2018-10-28T20:01:30 | 17,640 | 0 | 0 | 0 | null | false | null |
def is_armstrong(n):
m=0
t=n
while n>0:
r=(n%10)
m=m+(r*r*r)
n=n/10
print m
if m==t:
print "Yes it is armstrong"
else:
print "Not it is not armstrong"
is_armstrong(153)
| UTF-8 | Python | false | false | 187 | py | 1 | is_armstrong.py | 1 | 0.59893 | 0.550802 | 0 | 14 | 12.285714 | 33 |
igorosha53/specialist | 18,880,676,240,198 | d232df096835ae4e1df89c96c2ed1bb6b8494b7e | 7a1bfb6ae572e53c3be0413acc9e8e9d96eb035a | /Lesson_2/For/for_index_list.py | 2499372333394ac4d435d4fc0abe11b7cefb34e3 | [] | no_license | https://github.com/igorosha53/specialist | c59f6ff6eb27716c0ad49231bce7898c69c6cae6 | 99621ac88b84ec12fb76cf5fbf103c28932319a2 | refs/heads/master | 2020-06-03T21:57:37.770206 | 2019-07-08T08:48:31 | 2019-07-08T08:48:31 | 191,747,654 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | s = [71, 35, 14, 65, 8, 5, 71] # не підходить, бо якщо будуть однакові числа...то й індекс продублюється
# for i in s:
# print(i, s.index(i))
n = len(s)
for i in range(n):
print(i, s[i])
s[i] = s[i] + 5
print()
print(s)
| UTF-8 | Python | false | false | 292 | py | 115 | for_index_list.py | 115 | 0.564103 | 0.508547 | 0 | 10 | 22.4 | 105 |
cash2one/xai | 15,831,249,473,430 | 7269151da1d050c59e115c703ac2b171656fc7bb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_compotes.py | df70d07860ba7dd413f3bd7da4baa3b8f46338f4 | [
"MIT"
] | permissive | https://github.com/cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from xai.brain.wordbase.nouns._compote import _COMPOTE
#calss header
class _COMPOTES(_COMPOTE, ):
def __init__(self,):
_COMPOTE.__init__(self)
self.name = "COMPOTES"
self.specie = 'nouns'
self.basic = "compote"
self.jsondata = {}
| UTF-8 | Python | false | false | 245 | py | 37,275 | _compotes.py | 37,266 | 0.657143 | 0.657143 | 0 | 10 | 23.3 | 54 |
alexander89116/python_workshop | 18,451,179,520,861 | 7597135af1de89785e36ce1584830986d0671e90 | a72128c02966874730bd88ab6bd90416d0259fff | /contest3/C.py | 375da142e82f241b3ab44d64bdb401ec583968bf | [] | no_license | https://github.com/alexander89116/python_workshop | e3fabdd4571c8dccb5458f750e8be1f6b559de09 | fa3a2c8d9334df97f1a238dd62e1469eb335dd09 | refs/heads/master | 2020-04-27T17:41:44.229051 | 2019-09-15T13:38:48 | 2019-09-15T13:38:48 | 174,533,029 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | m = {}
s = input()
n = int(input())
i = 0
while n + i <= len(s):
s1 = s[i:n + i]
if s1 in m:
m[s1] = m[s1] + 1
else:
m[s1] = 1
i += 1
a = list()
for k in m.keys():
if m[k] >= 2:
a.append(k)
print(sorted(a))
| UTF-8 | Python | false | false | 251 | py | 28 | C.py | 25 | 0.398406 | 0.358566 | 0 | 16 | 14.6875 | 25 |
seoljeongwoo/learn | 4,526,895,542,856 | 8dd714460f9f9e524a986a63a8662c5a8025de48 | cf5f24e5a32f8cafe90d4253d727b1c0457da6a4 | /algorithm/boj_1506.py | 7d09c23b11244e584125fff194e4eafa4af54873 | [] | no_license | https://github.com/seoljeongwoo/learn | 537659ca942875f6846646c2e21e1e9f2e5b811e | 5b423e475c8f2bc47cb6dee09b8961d83ab08568 | refs/heads/main | 2023-05-04T18:07:27.592058 | 2021-05-05T17:32:50 | 2021-05-05T17:32:50 | 324,725,000 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
input = sys.stdin.readline
def dfs(c):
v[c] = True
for n in e[c]:
if v[n]==True: continue
dfs(n)
st.append(c)
return
def rev_dfs(c):
v[c] = True
ret = [c]
for n in rev_e[c]:
if v[n] == True : continue
ret += rev_dfs(n)
return ret
n = int(input(... | UTF-8 | Python | false | false | 917 | py | 410 | boj_1506.py | 369 | 0.526718 | 0.520174 | 0 | 40 | 21.9 | 68 |
TalentFlow/Brandee-backend | 5,514,738,021,586 | 39264b16b3f363eb1f4682f4990462b5fafca4fc | dbaad69b1752a0a0a0268c53e6e6f2a1f172ace1 | /products/migrations/0001_initial.py | 5a1f6954d82ecdd6e7180a7638a2f6985b8d40b3 | [] | no_license | https://github.com/TalentFlow/Brandee-backend | 10a27f2bd9e479f36f9f144594675da63fcaef5c | d87297dbfd4407775db8bafa145b3ed2a965ae24 | refs/heads/master | 2023-02-04T15:08:59.051229 | 2020-12-24T13:02:32 | 2020-12-24T13:02:32 | 324,155,082 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.2 on 2020-12-18 11:14
import cloudinary.models
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
m... | UTF-8 | Python | false | false | 10,527 | py | 16 | 0001_initial.py | 14 | 0.592476 | 0.585257 | 0 | 148 | 70.128378 | 522 |
ShenQianwithC/HistomicsTK-pv | 8,211,977,514,934 | aad27b0507ed149c78adc8ddba207a4fe6bc78ed | 09363052f9f3836b70d4a7bc55a506334ad1f1d9 | /packages/girder_worker/girder_worker/plugins/types/format/table/objectlist_to_rows.py | 6e19c2c4e174295ab3dd9818f2f66fbd70dd4f75 | [
"Apache-2.0"
] | permissive | https://github.com/ShenQianwithC/HistomicsTK-pv | d7ca6ec08951d90eda5faa93d61d6d0333ee9938 | 4ad7e72a7ebdabbdfc879254fad04ce7ca47e320 | refs/heads/master | 2020-04-26T12:53:49.273444 | 2019-04-24T01:53:01 | 2019-04-24T01:53:01 | 173,435,036 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import collections
# Attempt to keep column ordering if objects happen to have ordered keys
field_map = collections.OrderedDict()
rows = []
def subkeys(path, obj, row):
if isinstance(obj, dict):
for k in obj:
if isinstance(k, (str, unicode)):
subkeys(path + [k], obj[k], row)
... | UTF-8 | Python | false | false | 591 | py | 166 | objectlist_to_rows.py | 108 | 0.585448 | 0.583756 | 0 | 26 | 21.730769 | 72 |
JPinSPACE/AdventOfCode | 12,713,103,236,566 | ddb9194b34037b0bfe463e4eb813c854158e496e | 09b65aa15e3a85d57f91defff1f28fedec75b48c | /day15/02_cookies_are_not_meals/solution.py | 01f233472894da7ccc9ef895f84644f6149260d7 | [
"MIT"
] | permissive | https://github.com/JPinSPACE/AdventOfCode | be9b121e5f0e4e3fb85b089751373add961aa838 | af9264633995ff5e756b71b0134f26e44167b881 | refs/heads/master | 2021-01-10T16:27:48.227774 | 2015-12-23T05:56:49 | 2015-12-23T05:56:49 | 47,206,219 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """ Solution to the second puzzle of Day 15 on adventofcode.com
"""
import os
def evaluate_cookie(parts, part_names, ratios):
""" I evaluate cookies by eating them.
"""
cookie_score = 1
attrs = sorted(parts[part_names[0]].keys())
for attr in attrs:
attr_score = 0
for pos, ratio in... | UTF-8 | Python | false | false | 2,147 | py | 33 | solution.py | 31 | 0.446204 | 0.427108 | 0 | 69 | 30.115942 | 68 |
milenmihaylov/SoftUni | 2,379,411,883,706 | 04e04f89c3cb64860af115770c0b7381a3510c9e | 568f5af0bab92edfb5e357407d1e675a25d63109 | /ProgrammingBasics/01.FirstStepsInCoding/06.charity_campaign.py | 8d3c32268512f23ee5a50db125e6cd68765e5846 | [] | no_license | https://github.com/milenmihaylov/SoftUni | 32c002d6d9e9bfe2a5171f8eaeb00c067131215c | 6b4a631e92c810ebfb9d3c04c37762588c1ab5c0 | refs/heads/master | 2023-08-07T09:07:32.478221 | 2021-08-11T07:20:58 | 2021-08-11T07:20:58 | 408,756,145 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | total_days = int(input())
number_of_bakers = int(input())
cakes_per_baker = int(input())
waffles_per_baker = int(input())
pancakes_per_baker = int(input())
cake_price = 45
waffle_price = 5.8
pancake_price = 3.2
total_cakes = total_days * number_of_bakers * cakes_per_baker
total_waffles = total_days * number_of_bakers... | UTF-8 | Python | false | false | 592 | py | 68 | 06.charity_campaign.py | 68 | 0.719595 | 0.70777 | 0 | 20 | 28.6 | 100 |
raman162/lexchains | 10,788,957,895,800 | 59871ed993ddb2ed3f1b72fd80a108839bdbeceb | 1052971cd268f2f769169c83cdf87fbcb9a626a1 | /parse.py | 3104eb4724d6eea314b67b2590aa1a730f1084d2 | [] | no_license | https://github.com/raman162/lexchains | 06c3aabdc62263846c3ffa0581b37f252ea2407a | 98b35fb0036e790f9ca4c772b8aa69a4304da26c | refs/heads/master | 2021-01-10T05:00:54.087904 | 2016-01-29T01:47:45 | 2016-01-29T01:47:45 | 50,628,513 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import nltk
from nltk.corpus import wordnet as wn
nltk.data.path.append('./nltk_data/')
#checks to see if a word has any senses and is a noun, if so we take it on, if not we ignore it
def senseEmp(word):
global unknownWords
global usedWords
try :
senses=wn.synsets(word, pos='n')
... | UTF-8 | Python | false | false | 9,447 | py | 1 | parse.py | 1 | 0.559013 | 0.548322 | 0 | 281 | 32.601423 | 136 |
oldsyang/snake | 16,398,185,153,863 | 4b174eeee4fd4b6d1a4233178f0e4ea4acacef50 | c834519b1edaf8ba6a3a1031ffb370ecc7c9c991 | /utils/var.py | e950d7c0fdf6df92a5910902b94987064aa83a3a | [] | no_license | https://github.com/oldsyang/snake | 4f5e7435046862c416352ba347fb10be2b156135 | 026817ac87805f895981af5167d5b51fbc2132e4 | refs/heads/master | 2023-06-23T14:13:28.991980 | 2021-07-29T11:09:14 | 2021-07-29T11:09:14 | 390,696,711 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import contextvars
from typing import Any
aio_databases = contextvars.ContextVar('databases')
redis_var: contextvars.ContextVar[Any] = contextvars.ContextVar('redis')
| UTF-8 | Python | false | false | 168 | py | 20 | var.py | 18 | 0.809524 | 0.809524 | 0 | 5 | 32.6 | 72 |
SteveStrop/Estate-Agent-Apps-0.0 | 7,971,459,329,859 | d9e6f428ab81850d14aa83b72a347b08469953d4 | e04d47b516a8c73c24a8514c29178c4d976ddbdc | /ka_lib.py | 66a3802da71f945eaf88e4ef17f6f87d7b6fd94b | [] | no_license | https://github.com/SteveStrop/Estate-Agent-Apps-0.0 | 3b0707e76b5c1d95e6d450bb798a0053aa483661 | 1570be950bbcfeb666c755581df5760c9e174d78 | refs/heads/master | 2020-03-23T03:06:34.589779 | 2018-07-15T09:05:25 | 2018-07-15T09:05:25 | 141,010,087 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from selenium import webdriver
import ast
from agent_lib import logon
def rgba_to_hex(rgba):
r, g, b, alpha = ast.literal_eval(rgba.strip("rgba"))
hex_value = '#%02x%02x%02x' % (r, g, b)
return hex_value
# find the correct link and click it
def click_hip_link(jobs_list, job_hip_number, links):
"""Se... | UTF-8 | Python | false | false | 3,561 | py | 8 | ka_lib.py | 7 | 0.619208 | 0.610222 | 0 | 92 | 37.706522 | 118 |
chejeanx/euler | 11,252,814,334,393 | 31d645cbe541bc2ac6d23555845f13b8574d8761 | cbf6fb2a0d93ca13c84b418d33a43c0ef33e866b | /92.py | 2e5eb6c947ffd56b4e75ac6fc47e01b7d43569fe | [] | no_license | https://github.com/chejeanx/euler | 1fddcc964b7b48c24d8c656d5a515668726f10eb | f9e10897b84a05fa5e9ca8049131191e6bd0735f | refs/heads/master | 2021-01-20T15:07:21.243637 | 2017-06-22T15:19:00 | 2017-06-22T15:19:00 | 90,722,860 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Square digit chains
# https://projecteuler.net/problem=92
# Returns terminating number in square digit chain for startN
def squareDigitChain(startN, currentN, chainOutcomes):
if currentN == 1 or currentN == 89:
chainOutcomes[startN] = currentN
return currentN
if currentN in chainOutcomes:
return chainOutcom... | UTF-8 | Python | false | false | 754 | py | 43 | 92.py | 43 | 0.742706 | 0.692308 | 0 | 25 | 29.2 | 87 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.