blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5215749b56c30e17e34ce55e893b8f3e5918a797 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/c5a8b7895621c081b0306f4fd30dbbccae594b98-<main>-fix.py | fac68fd6ab99612265abc6bcdf12b32b3871f596 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,755 | py | c5a8b7895621c081b0306f4fd30dbbccae594b98-<main>-fix.py | def main():
module = AnsibleModule(argument_spec=dict(api_host=dict(required=True), api_user=dict(required=True), api_password=dict(no_log=True), vmid=dict(required=False), validate_certs=dict(type='bool', default='no'), node=dict(), pool=dict(), password=dict(no_log=True), hostname=dict(), ostemplate=dict(), disk=... |
713f360aa2c602d4a145db0c944995bf22e4e124 | c2b5805cc567477c150b923502fd78dc7d4cb6f8 | /getchangetsetfromrepo.py | 4a6abbc6e89319ec84763165caf92a79f8690637 | [] | no_license | goutham24693/getgerritpush | 35078aa51f0e75f709c64eb4a67ab44ff4be782c | d81548d2ce4cb244130bf42ef73274bce540294d | refs/heads/master | 2022-11-21T16:17:48.699990 | 2020-07-18T19:57:16 | 2020-07-18T19:57:16 | 280,728,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | getchangetsetfromrepo.py | from pygerrit2 import GerritRestAPI, HTTPBasicAuth
username = "username"
password = "password"
gerrit_url = "https://gerrit.abcdefgh.com/"
repo = "aaa/bbbb/ccccc/generic"
auth = HTTPBasicAuth(username, password)
rest = GerritRestAPI(url=gerrit_url, auth=auth)
commits = rest.get("/changes/?q=project:" + repo)
for c... |
d6879b9fab8d7e9efd6a3857fc139cd4cb80bfa3 | 7b7c81e39169b7769d2b14618b7fb8f3ef5ea1dc | /tests/ModelingMachine/mbtest_database_service.py | edbc7629b8f09c1b3e34ae11c63f0e9ff10ad7a2 | [] | no_license | tkincaid/tkincaid.github.com | cf349c143056b847c8281d8d363b686a679f6499 | 8a9ab9ea4a061573328b5fcca6706536062e3be5 | refs/heads/master | 2016-09-05T09:24:48.325828 | 2014-09-24T16:49:14 | 2014-09-24T16:49:14 | 21,217,649 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,853 | py | mbtest_database_service.py | import sys
import datetime
import time
import random
import yaml
from bson import ObjectId
from common.wrappers import database
class MBTestDatabaseService(object):
# Run types
PARALLELE = 0
SEQUENCIAL = 1
# Environments
AWS = 0
AZURE = 1
def __init__(self, rid = None, cid = None, persi... |
aa928f3f74f6514a33462ee4712f93e870779223 | 7df5163ed739316c63befbe98357d755f2e8855b | /NGCF4REC/ngcf.py | 31d614e80a58ac2d41e2f7d473839a0299b6c80f | [] | no_license | wtic111/Graph_Code | 8a4c9aea28f2e3ab4ea94154c1cbb8cc361474c1 | 3e6fff7823d577cca5a2262c11b4d7288c127c8c | refs/heads/master | 2020-12-13T22:45:16.658317 | 2020-01-19T23:34:18 | 2020-01-19T23:34:18 | 234,545,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,555 | py | ngcf.py | import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
import torch.nn.functional as F
import torch.optim as optim
from utils import tensor_normalize
import math
class GCNconv(nn.Module):
def __init__(self, in_dim, out_dim, bias=True):
super(GCNconv, self).__init__()
self.in_... |
0fb54f7b339fc762076c8368f2c1a2b68790c5a1 | ab8714c73f34a21ae3756e3e8f90a673e6ffd4d5 | /env/src/uprofile/urls.py | 47edde1dee53fe963d9785abcb64aedfdcbf502b | [] | no_license | ambaresthete/AnybodyCook | f89b858f9a2a02d68c6c8ddf0dfa9fb92c1f1451 | 94af7320e3a6ed32822c5f288d8ba18e12cf6fa7 | refs/heads/master | 2020-03-20T21:53:22.014763 | 2018-11-19T17:24:29 | 2018-11-19T17:24:29 | 137,766,205 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | urls.py | from django.conf.urls import url
from .views import upro
urlpatterns = [
url(r'^$', upro , name='upro'),
]
|
6597a758edd2db4cac7da16946fb11018c4950fb | d9c53493a644005ce4719350acb2405ab5b01a75 | /main.py | 947f4f2b878e6541c60fbf31601237b9ee9423c2 | [] | no_license | f-prime/TwitchPlays | 7df07873701e0fbbded0c3c5e4618110a81c7fb1 | f751f099b7a5cf5f60389618e30948b5a1f470db | refs/heads/master | 2021-05-28T07:57:23.373415 | 2014-03-10T02:54:55 | 2014-03-10T02:54:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | main.py | from pykeyboard import PyKeyboard
import irc
import time
import thread
from data import cmds
class Simulator:
def __init__(self):
self.keyboard = {
"left": "1",
"right": "2",
"up":"3",
"down":"4",
"a":"5",
... |
70d9bb9bac3db66d92edb19826d0bd56f90e0a69 | 2074ceb4a818d345b2c461f041532811e72f2b9b | /openstack_dashboard/dashboards/project/review/urls.py | 04614aa79bd3f22b63bfd00b6db7489ab8dfe156 | [
"Apache-2.0"
] | permissive | NZtechpapa/expert-system | 96fe75e11b8aa6653157293739fd3c884ad132bc | b3105912b7fed7a24599ab8b81621d08d4cc7a03 | refs/heads/master | 2020-04-07T06:07:34.868414 | 2018-07-20T11:09:25 | 2018-07-20T11:09:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | urls.py | from django.conf.urls import url
from openstack_dashboard.dashboards.project.review import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<projectid>[^/]+)/viewreview$', views.ViewReviewContentView.as_view(), name='viewreview'),
url(r'^(?P<projectid>[^/]+)/doreview$',... |
bb47fb56948be0ebde638813be9ac55a9f284bc7 | 5d70992fd84682e8b79ef20efb82d172570591cf | /scientific_python/ch_1/pm1_11.py | 9c4987718353c013bed6568eb2b617643c1024b2 | [] | no_license | mwhit74/practice_examples | 7e8af7b39d6f7a184c56200564aae9d016ea5232 | 577578edd958609faca2a078ff3e8d1a38206233 | refs/heads/master | 2021-01-18T01:50:24.709250 | 2014-10-11T02:48:05 | 2014-10-11T02:48:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | pm1_11.py | """Compute the air resistance on a football."""
#pm1_11.py
from math import pi
#Drag equation variables
C_d = 0.2 #drag coefficient
rho = 1.2 #density of medium [kg/m^3]
a = 0.011 #radius of ball [m]
A = pi*a**2 #cross-sectional area [m^2]
V_120 = 120 #velocity [km/h]
V_10 = 10 #velocity [km/h]
conversion = 0.277777... |
b97eebb995c1362fdda89cf3754d9d94bd697016 | 02bfbfb51c31fff59ea997cb30ab1a8e9d95bf8a | /Python/week3/lab22-practice1.py | 83955a46db1b7b0e34ef25701a6786d4783af11a | [] | no_license | kyledgls/pdxcodeguild_assignments | 58cdd7751791760630733464a64947c7724ab80e | 9b5203c60c8774bfbca83f996e806228724d9856 | refs/heads/master | 2021-08-29T14:31:11.961572 | 2017-12-14T04:16:09 | 2017-12-14T04:16:09 | 105,681,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | lab22-practice1.py |
my_list = []
while True:
my_input = input('Enter a number (or \'done\'): ')
if my_input == 'done':
print(my_list)
break
my_list.append(int(my_input))
|
22084729dae2d3e49dcba16cf74383a51e09ec0b | 87ec99feee7b6f4be70ba0558e8372f1da2e6a60 | /app/base_case_algorithms/informed/a_start.py | f108e482d9b0956c5e1f923556abdb261c514ad5 | [] | no_license | dejuata/Mario-Smart | 7557a208f5076fef00dcfaca03e7aa84e3fc9b88 | 489e05c3dc5b6c6bb822a7d80fec5024573a3424 | refs/heads/master | 2021-04-18T20:25:29.431489 | 2018-05-02T12:49:53 | 2018-05-02T12:49:53 | 126,181,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,165 | py | a_start.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Basado en diapostivas Tema5.pdf del curso de Introducción de IA
try:
import Queue
except ImportError:
# Python 3
import queue as Queue
#(g(n), h(n), city)
tree = {
'Sibiu': [(140, 366, 'Arad'), (151, 380, 'Oradea'), (80, 193, 'Rimnicu'), (99, 178, 'Fagaras')],
... |
5e29712e906c9b2f8a26fb15785adbc5dccf6404 | 023090abd65af2bada11ec9cc32969f6fb97ff70 | /packages/wakatime/projects/projectmap.py | f1f26ae01532c7929cf6615ddd10817780834253 | [
"BSD-3-Clause"
] | permissive | gandarez/sublime-wakatime | 4667589fa2eaad52a02de6b7cb6d1f467045b450 | 483d8f596e820c18c30c3efb7bd031cbb12f7917 | refs/heads/master | 2021-01-26T03:01:31.580278 | 2020-02-13T17:24:11 | 2020-02-13T17:24:11 | 243,283,005 | 1 | 0 | BSD-3-Clause | 2020-02-26T14:30:20 | 2020-02-26T14:30:19 | null | UTF-8 | Python | false | false | 2,023 | py | projectmap.py | # -*- coding: utf-8 -*-
"""
wakatime.projects.projectmap
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use the ~/.wakatime.cfg file to set custom project names by matching files
with regex patterns. Project maps go under the [projectmap] config section.
For example:
[projectmap]
/home/user/project... |
8e9923cac54051de386ee9b9d0b0ef0c8712f8e7 | 657e7b458d6096031e114eb8da023887af95fbf3 | /Bhavani-SwethaRani/Optimization1-master/sg.py | 8e80f202a95084bf92b9f09efae2457c6ad4f755 | [] | no_license | Theresh/EE5327 | fe87914c6c2fcda46ac911973247598840f5f8c9 | a192376842c17ef0e484cf1c86ffadf7d4435180 | refs/heads/master | 2020-05-01T01:20:58.650329 | 2019-03-26T09:43:29 | 2019-03-26T09:43:29 | 177,162,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,445 | py | sg.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
df1 = pd.read_csv(r'''C:\ML ASSIGNMENT\Xsvm1.csv''');
df2 = pd.read_csv(r'''C:\ML ASSIGNMENT\ysvm1.csv''');
x1= list(df1.x1) #conversion of x1into list
x2=list(df1.x2) #conversion of x2 into list
X1=list(zip(x1,x2))
X=np.matrix(X1)
Y1=li... |
a675aafe134a3688ca004d1df1105e78c7a90ef2 | 069762f718a0d338f9d3c89ab245bc52ac60ce4a | /wang/config.py | 5c5e5ef1011b8fbebc52dc6507775f1d3c71850a | [
"MIT"
] | permissive | mindis/movie_recommender | 2aa7b83638b69f2fba489aac190cec997a7182dd | 93eddb89f7ac2a8358bbe5c91b26e7e2b4184c38 | refs/heads/master | 2020-09-24T04:38:37.659198 | 2019-06-25T13:01:08 | 2019-06-25T13:01:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,353 | py | config.py | #
# from wang.dataPretreatment import *
# #嵌入矩阵的维度
# embed_dim = 32
# #用户ID个数
# uid_max = max(features.take(0,1)) + 1 # 6040
# #性别个数
# gender_max = max(features.take(2,1)) + 1 # 1 + 1 = 2
# #年龄类别个数
# age_max = max(features.take(3,1)) + 1 # 6 + 1 = 7
# #职业个数
# job_max = max(features.take(4,1)) + 1# 20 + 1 = 21
#
# #电影ID... |
b942abbb81e2f89d8f5d38780ea412cbc49a31c9 | 7b7d468384b38e90e067bd001ff403a461d9651c | /79 Word Search.py | 7f77ef06e08b06f0e1991990bbd24007f11dc314 | [] | no_license | jianminchen/LeetCode-30 | 6b33f26beb9a265afad5f420f117570f05601337 | 58dcb51f183ac9bf5e825e8cd5c311852c231538 | refs/heads/master | 2021-01-19T18:58:50.758809 | 2016-12-05T04:55:02 | 2016-12-05T04:55:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | 79 Word Search.py | class Solution(object):
def exist(self, board, word):
"""
:type board: List[List[str]]
:type word: str
:rtype: bool
"""
step = zip((0, 1, 0, - 1), (1, 0, - 1, 0))
def dfs(depth, x, y):
if not (0 <= x < len(board) and 0 <= y < len(board[0... |
13163d3f51b7a0d979339dc56f6e58f223231567 | ba694353a3cb1cfd02a6773b40f693386d0dba39 | /sdk/python/pulumi_google_native/clouddeploy/v1/delivery_pipeline.py | 7912b72fdedc5b3821687ac64f96bfa53e5b4704 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-google-native | cc57af8bd3d1d6b76f1f48333ed1f1b31d56f92b | 124d255e5b7f5440d1ef63c9a71e4cc1d661cd10 | refs/heads/master | 2023-08-25T00:18:00.300230 | 2023-07-20T04:25:48 | 2023-07-20T04:25:48 | 323,680,373 | 69 | 16 | Apache-2.0 | 2023-09-13T00:28:04 | 2020-12-22T16:39:01 | Python | UTF-8 | Python | false | false | 23,934 | py | delivery_pipeline.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _u... |
85caa54a6fd169623a4edcf14d27836d66bddb8e | 5508368df9df1036755aeaa8574bdadcc25359f8 | /AmadoAccounting/migrations/0046_auto_20180907_1327.py | e0b1a46e9955c0e0e59db8b7360cae03c00437a2 | [] | no_license | HanSol1994/Amado | 4627a6165009733059e8e87f545244f69d492b91 | 9fbc37250b9974bbf3a3c3a2571a748a300b2d29 | refs/heads/master | 2022-01-23T23:59:30.666584 | 2019-07-23T08:12:19 | 2019-07-23T08:12:19 | 198,373,740 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 938 | py | 0046_auto_20180907_1327.py | # Generated by Django 2.0.5 on 2018-09-07 08:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('AmadoAccounting', '0045_baseagreement_snapp_fee'),
]
operations = [
migrations.AddField(
model_name='salarydetail',
... |
a9e3bcf849b59433196e43880b8277f100eeb13e | 491d63a6ca92a1be80a5b5ebbec98b349f71c945 | /Ranker/service.py | e24f2ec29ce735eb738535442cfd7ec3d547f7fd | [
"Apache-2.0"
] | permissive | hw9603/BioASQ-Rabbit | 07ccc77349f82bcfa92af1f46b6e80e9b1fad13d | 729816c856ed6f78a1a60feace776b205f978119 | refs/heads/master | 2022-08-04T00:36:42.334332 | 2019-03-08T00:44:13 | 2019-03-08T00:44:13 | 173,878,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | service.py | # import logging
# from logging.config import fileConfig
# logging.config.fileConfig('logging.ini')
from CoreMMR import CoreMMR
from SoftMMR import SoftMMR
from HardMMR import HardMMR
import os
if __name__ == '__main__':
print 'Declaring the services'
services = list()
services.append(CoreMMR())
# se... |
3abcb03c52dac220df3f9730fdfbe8b70b136d78 | 1d581781ed7f2466de23d6ec7fdf12ddd05a2b9a | /middleNode.py | b23c461bd12c750ffaf83885ffa0da7d184ad1fa | [] | no_license | athmey/MyLeetCode | 472292c74d7b6c4ae3e7dc9de297341f2bc5969e | 79ca9fdc471a1c84fce188cb05d2ef7b2469eb69 | refs/heads/master | 2020-09-14T17:36:24.222631 | 2019-11-21T15:30:32 | 2019-11-21T15:30:32 | 223,202,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | middleNode.py | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def middleNode(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None or head.next is Non... |
4b860a7463aa2c51da85930184359b142474decd | 3fa5d1f4f774db4751cbca51d2313a7a41e5985f | /src/_backup/bashart-tracker.py | aa4291ebc7d3a804f4ab3438d3f35b487a88444e | [] | no_license | sudhargk/video-annotator | 60a8e14c75b26b93a9ece019e31eaa3a722c33cb | 22f423a167ca31186610957cb351faedd7968f91 | refs/heads/master | 2021-01-25T04:02:08.224861 | 2015-05-14T13:42:28 | 2015-05-14T13:42:28 | 24,286,103 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,496 | py | bashart-tracker.py | import cv2
import numpy as np
import features.interest_points as ip
import features.motion as motion
from sklearn.cluster import MeanShift, estimate_bandwidth
def tracker(path):
#initialization for default value
if path=='0':
path=0;
cap = cv2.VideoCapture(path)
ip_method = ip.get_instace(ip.IPMethod.TOMASI);... |
5c4ef48c0289cc60f33d815db0b364bdf8d484ca | f66f63699ad8f956974bcb9cbdf272b45aacb665 | /fortress/solc_parsing/declarations/modifier.py | 8d7a38a0ce6139246bf377de66cc1a794c6d7359 | [] | no_license | bydolson/fortress-security-audit-engine | 8b0714909d14952c3fb572a6afb2202fa01f256d | 7a55877bdde0d6adabe3ce9c4f92e8ba20b4b3cc | refs/heads/main | 2023-01-24T12:47:38.214542 | 2020-12-08T12:16:05 | 2020-12-08T12:16:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,849 | py | modifier.py | """
Event module
"""
from typing import Dict, TYPE_CHECKING
from fortress.core.cfg.node import NodeType
from fortress.core.cfg.node import link_nodes
from fortress.core.declarations.modifier import Modifier
from fortress.solc_parsing.cfg.node import NodeSolc
from fortress.solc_parsing.declarations.function import ... |
072b86a97e77523d1f3e44b195473928cbdcbefa | 5b3806c892764673d929fbf96d069e5e8206d9b5 | /basic/题/HW/41玩牌高手.py | c3ca47fae2d3d4a3bc6e0d1de54e5a11c982ec45 | [] | no_license | imlifeilong/MyAlgorithm | fdd2386e1ee129b50cf58ec3e9deb92eaca07dc0 | 45c26b4791fc95b19442b909b6744dbe07bf9a56 | refs/heads/master | 2023-09-01T06:55:47.353831 | 2023-08-31T22:38:56 | 2023-08-31T22:38:56 | 104,972,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | 41玩牌高手.py | def main(data):
dp = [0] * len(data)
dp[0] = data[0]
for i in range(1, len(data)):
# 索引从1开始
if i < 3:
# 状态转移 当前值与前一个值的关系
# 前3轮 如果不选 则值为0
dp[i] = max(dp[i - 1] + data[i], 0)
else:
# 如果不选则值还原为前3轮的值
dp[i] = max(dp[i - 1] + data... |
4ea22cc754d1c4cdcfa40adc8c846b9b230fd734 | 44b768cb01b0c9618026013178452ee104fce6ec | /stockutil.py | 055dc53c3fffa4b8d1d8b448167ede341c35521d | [] | no_license | liqinglu/stock_data | 0b4bf715b1087059dbc21c6b96e038f782bd8d4c | adfeea5393c8cc2ab777ca5444cd8d803cd3238d | refs/heads/master | 2021-01-18T23:41:56.053235 | 2016-12-09T14:06:49 | 2016-12-09T14:06:49 | 53,593,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,044 | py | stockutil.py | # coding: utf-8
import pandas as pd
import numpy as np
import datetime,time
import os,sys
import re
import shutil
import logging
import collections as coll
##########################
columnlist=['date','start','highest','lowest','ending','tq','tm']
reshapescript = "format_one_file.sh"
datapath = './data'
tmppath = ... |
f73a22cd6f66b33b8428cb226108cd2194df7edc | 56ed5f84f80729f289d7106ef96a2c4f400cf996 | /database_functionality/__init__.py | 841491d13b9aaebecd8dfef9d99f7e642775aeba | [] | no_license | GACiobanita/vending-machine | 0df42d3a3d248175c6124f9a994b4abeab0f7935 | d244aaee5c7ac996c94fc4492f38303462a8aafe | refs/heads/master | 2020-07-01T07:40:23.294326 | 2020-02-12T22:55:25 | 2020-02-12T22:55:25 | 201,092,739 | 1 | 0 | null | 2020-02-12T22:55:26 | 2019-08-07T17:07:52 | Python | UTF-8 | Python | false | false | 83 | py | __init__.py | from .database_architect import DatabaseArchitect
__all__ = ["DatabaseArchitect"]
|
08f4cf05124411c69937c8d04a442c9ddbebfbaf | ae81f8e35858798d5b01dfb9143b96f81427c599 | /lcn.py | 86baacea36fb16c266a31402b528e7e4ff023cf7 | [] | no_license | TulsiJain/traffic-sign-detection | a1f583e5cde28478faa176f6a6bd3d3ba305e9e7 | 6e4f7b79fc31534ad5d3a1650ed826ad63e8cfee | refs/heads/master | 2020-04-02T19:55:08.376134 | 2018-10-27T03:51:01 | 2018-10-27T03:51:01 | 154,751,013 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,075 | py | lcn.py | import torch
import torch.nn.functional as F
import numpy as np
import PIL.Image as pim
import matplotlib.pyplot as plt
import cv2
import scipy.misc
def LocalContrastNorm(image,radius=9):
"""
image: torch.Tensor , .shape => (1,channels,height,width)
radius: Gaussian filter size (int), odd
"""
... |
2d4430c35d3561830cc68bd6b4448fb85e81c728 | e31af778b76b5f788b0b55a95d36dfab2e6efc06 | /scraper/stats/spiders/shbstats.py | ff6913509c3f0fd4889a7d37a080d7ff2572b77a | [] | no_license | crosstuck/bett | a8861c6e635bf31b0df5b96a4260610e6249a70a | c636c6fc3ceae8c75fe4e775d3e59f179b973870 | refs/heads/master | 2020-07-24T12:24:08.806273 | 2019-03-04T20:24:38 | 2019-03-04T20:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,390 | py | shbstats.py | import scrapy
from stats.items import QuoteItem
from stats.startUrls import startUrls
# from scrapy.shell import inspect_response
def check_team(response, word):
if "ht" in word:
return response.xpath(
'//*[@id="ctl00_ContentPlaceHolder_homeTeamName"]/text()').extract_first()
if "gt" in wo... |
ebfa125c32914ce9f57966c94db0989f3c25e07b | 3fe94cd1efc26bf11fe08e619d3a80569ebc7b9d | /scripts/wij.py | 8795ec5ae5a1b0a9392aac28f8b5c307d3c87a26 | [
"MIT"
] | permissive | sashkarivkind/rnn_for_lm | 85271f6f2c5b6f5ebf78b88f4f6993cb4b901dc2 | 7ee083791331d418899fb9ce636265312e5ac126 | refs/heads/master | 2021-09-13T05:32:07.759374 | 2018-04-25T13:03:45 | 2018-04-25T13:03:45 | 117,092,329 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,445 | py | wij.py | import tensorflow as tf
import numpy as np
import copy
def define_weights_gru(n_in,n_hidden):
theta = {
# Input weights for update gate
'U_Z': tf.Variable(tf.random_normal(shape=[n_in, n_hidden],
# seed=2,
mea... |
ebdb07582a431d43a8eb76d01ed958c2d1e4e20f | a0bea032fa7068bd3e72c1a5a6672463b593b557 | /Test Question Two.py | c1366419d8cafe071bd0ea311d77d0a0815239bd | [] | no_license | Michael-png/olympiad-python-lvl-3 | 981148b2f120bdffd2727e0c4da9da579ae70b65 | 9ca0603bc68b007f1ce465799a98f5eb749a0331 | refs/heads/master | 2023-08-22T05:16:10.579648 | 2021-10-30T01:55:43 | 2021-10-30T01:55:43 | 422,758,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | Test Question Two.py | import math
def printCosines(header, n = 0):
print(header)
while 100 > n >= 0:
n = n+1
CosineAnswer = math.cos(n)
print(CosineAnswer)
printCosines(header="This is the cosines of 0.1's")
|
a46d1d2c5a1cce069be0cf4a85ef4722fa921811 | 3ea1d6dcf3159fbfac4fb40ec265fcedcc598951 | /geomeppy/__init__.py | 7d0aea0d875cbcd08b8c126d978084262ad294fa | [
"MIT"
] | permissive | lymereJ/geomeppy | 3978e1898667671cd732f78886771e869a2ed97b | 98c11ad74647153c24e344703dc74c62e72c3c7e | refs/heads/master | 2022-06-28T14:43:31.202260 | 2020-05-05T04:41:09 | 2020-05-05T04:41:09 | 118,838,970 | 1 | 0 | MIT | 2018-06-27T21:00:20 | 2018-01-25T00:16:32 | Python | UTF-8 | Python | false | false | 72 | py | __init__.py | from geomeppy.idf import IDF
__version__ = "0.11.6"
__all__ = ["IDF"]
|
149d22b772f3d2e37acc2d96259b165695681bed | ce8e9a176650853168bd4e1ad0d870d5710c60a7 | /news_get.py | 49bd48387c314adf1f203512b4bc71622b6c763e | [] | no_license | FCinPJ/get_web_news | a461dceed6336fa4c58ded4db74c48cb41fc6d47 | 907b7279fe04872e38eb9a13f0e5c03df33d9364 | refs/heads/master | 2020-03-31T07:36:25.326470 | 2018-10-30T03:00:35 | 2018-10-30T03:00:35 | 152,027,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,768 | py | news_get.py | from bs4 import BeautifulSoup
import re
from url_get import get_html
from old_or_new import clarify_old_or_new
#url = 'http://www.zjgsu.edu.cn/news/' #浙江工商大学新闻网
def news_get(url,fold_name,selectors): #参数url:要爬取的网站,fold_name:创建存放txt文件的文件夹名,selectors传入任意个数selector
html = get_html(url) #获取html
soup = Beauti... |
e3dd5be51cef7ac13d039220e3cf24942412f014 | 0fe702dfe61ea3b7076dd050f2a8daf81e15301d | /devices/utils.py | 3cf51f02f33a68227e0491e943bce4b3aae59130 | [] | no_license | qx-oo/device_info | 1ae47d95f3c19d343994a3838d580406f2ddacfa | cdf4d9454efb5396c2c786599a0a2d0cdff22957 | refs/heads/master | 2023-01-05T00:07:32.691864 | 2020-10-27T10:05:00 | 2020-10-27T10:05:00 | 307,657,081 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | utils.py | import aioredis
from django.conf import settings
async def get_conn():
client = await aioredis.create_redis_pool(
settings.REDIS_URL, db=7)
return client
class RedisClient():
"""
get redis client
example:
with RedisClient() as client:
client.set("test", "test val")
... |
42eb8e6f0373f6e9710efa79442e5bf984c5705f | e94de78de0e09ebe2cb18e2752870b07d71e3e54 | /Music/admin.py | d43766ae6cfde7261ad5036f4ac0ad3ac6642862 | [] | no_license | shajalalhazari1/Music-Web-Project | f5cbdb17a6cc75d2bc5c2dbd741cea4f1d24ba2f | d8f733526c68befe867e4d116580db01b4eccd33 | refs/heads/master | 2021-05-24T08:45:58.742720 | 2020-04-08T15:11:52 | 2020-04-08T15:11:52 | 253,477,523 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | admin.py | from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Singer)
admin.site.register(models.Album)
admin.site.register(models.Song) |
bee797b5b6b739520216e9f067bb9d9a446f460a | 64f23e205d60317155f7dc35ef7362dd03d00446 | /app/templates/accounts/parse_markdown.py | 6d1ff5c07dd4f27161220c653843bdc4d8200ed0 | [] | no_license | cgjonesdev/finance | 3fe4dd7dfd4b73374809cfd15f73197fa7faf5c6 | 50049f20cd10175e37ddd429600dd580589c6f1c | refs/heads/master | 2020-06-14T09:37:10.094386 | 2017-08-14T18:02:35 | 2017-08-14T18:02:35 | 75,204,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30 | py | parse_markdown.py | ../../../lib/parse_markdown.py |
862d0a1ed85f811f55a03ddbe8f8b62ba337eb03 | 15d84cff3c02a37db42d831e781a6ec519d668bf | /Coursera/1_Specializations/2_Programming_on_Python/1_Dive_into_Python/Week_4/1_/Test_99.py | 56acb8b2f3af519db274a3d92cf8b143ddcdb1b2 | [] | no_license | vnpavlukov/Study | 40c61fc575409bdb301de6f3b98ffffd0f35071e | 0ffbe9a55e6a0972bb42643205134d06924f96c4 | refs/heads/master | 2023-03-01T07:05:23.109572 | 2021-01-26T19:54:29 | 2021-01-26T19:54:29 | 289,244,558 | 0 | 0 | null | 2021-01-26T19:55:11 | 2020-08-21T10:41:18 | Python | UTF-8 | Python | false | false | 72 | py | Test_99.py | import os
import tempfile
import uuid
var = uuid.uuid4().hex
print(var) |
91867fbd28c04635848c4d96d87f608176ed7069 | b406363ac75fb5b99851696fb4262a910af244cf | /01_Introductie/Oef10.py | 4decb7e3f04a6cf179ba727e2830af5308e355bc | [] | no_license | lotterombaut/PythonOefeningen | 336fb2f2be57cbbbc6e3565207018111efa3da0a | 711c2f94962fbbf9a4a7175c40af6c77c61118c2 | refs/heads/master | 2020-03-31T12:18:54.891112 | 2018-10-09T07:13:06 | 2018-10-09T07:13:06 | 152,211,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | Oef10.py | #oefening 10
getal1 = int(input("Geef een getal op: "))
getal2 = int(input("Geef een tweede getal in: "))
uitkomst = (getal1 +getal2) * (getal1+getal2)
print("({0} + {1})^2 = {2}".format(getal1,getal2,uitkomst)) |
c330a2dcf09dc2b78d86266321e02b7baea4c3c9 | b5a2ce19a1ecca74c3bdb8fd1dd45848148746e2 | /HackerRank/Python/replace_nan.py | 7bcede6bcf09a291246f37599504406b66e7dcf0 | [] | no_license | DSJacq/Miscellaneous | 31f1041954bfadc455de109a1dcb201292c4a978 | dd56800eb66c62087ad8e2730f053fc8a8a897a4 | refs/heads/master | 2023-08-08T18:15:45.632410 | 2023-07-21T11:51:55 | 2023-07-21T11:51:55 | 56,696,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | replace_nan.py | fill = {**dict.fromkeys(df.select_dtypes(np.number).columns, 0),
**dict.fromkeys(df.select_dtypes(exclude=np.number).columns, '')}
df = df.fillna(fill)
|
173f2d3c53b395d2869446758c68385e9c0bfe7e | 83fef1ccc8eeb8fd4010aa0fe98792255ce7b29e | /util/create_train.py | 855e8c08a3dd3f9536a7e69b5fd429ec40e6c24d | [] | no_license | wangyongjie-ntu/siamese-network | 43d1fef0846250a239e5066c0c32663af3f18251 | d21b4804e81993e38cb2487f3e90cd8534991e17 | refs/heads/master | 2022-01-19T08:56:05.605557 | 2019-06-04T13:44:56 | 2019-06-04T13:44:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,754 | py | create_train.py | # Author: Wang Yongjie
# Email: yongjie.wang@ntu.edu.sg
# Description: create training examples
import os
import random
def create_pair(items, num):
"""
items: image subdirectory lists
num: number of image pairs
"""
image_list = []
label_list = []
for i in range(num):
# gene... |
e10682e6941ac4bac57e190fba19a90b6ef0d07d | 94de1628ad6ea6ba7f77355a627bdb057c1e0643 | /send_grade_email.py | 48feab43f574db343edc0cbc3303fc691bb5fa46 | [] | no_license | quadrin/grade_checker | 6e4a1692eb7b9c0fab235748aca7168ce95da4d8 | 7f0b76b4bf4abc5bb2d1fdea946e2729c1073964 | refs/heads/main | 2022-12-25T02:18:19.124027 | 2020-10-03T21:00:08 | 2020-10-03T21:00:08 | 300,978,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,142 | py | send_grade_email.py | import smtplib as smt
import time
from grade_checker import *
from grade_config import *
import grade_email_config
def send_email(subject, msg):
try: #trying to connect to gmail server
server = smt.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.logi... |
a36b25c5caf1244f0ed2945975d608275a6b8fb0 | 5da42898d4bd87551945326aa3874916dc4dce1b | /bgtrbl/apps/userprofile/models.py | 2887873b1cb556f49d9ac04cf57d06b4a2d97ad9 | [] | no_license | bgtrbl/trbl-webzin-project | 58fb9d92edb97ceb3433606601a8717d4988a33a | 9e4d43690a140ca300a7d1430e0ec31bffa906ec | refs/heads/master | 2020-05-20T06:17:29.260832 | 2015-03-22T16:44:37 | 2015-03-22T16:44:37 | 31,118,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,103 | py | models.py | from django.db import models
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from ckeditor.fields import RichTextField
# @& 1-1 model - django's auth or allauth, multitable inheritance
# @togoaway image field 지울 예정 (avatar로 대체)
class UserProfile(models.Model):
user = mode... |
e20eb052b93bc898ad676e3c6354957293d67862 | 9d450600b24d1ff71c9a94166ad7958a4026286c | /Lab03/simpleTasks_TA.py | b2b2dec15328e1db89de44653fb93071fe129b19 | [] | no_license | adannawi/ECE-364 | 63dd2cc4e670c7d786d6cd11320550b112399b23 | 65925e96e9b2599edeab8d04f33773161e8d1c72 | refs/heads/master | 2021-03-30T16:28:01.153670 | 2016-12-14T06:00:03 | 2016-12-14T06:00:03 | 76,429,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,827 | py | simpleTasks_TA.py |
# The following variable(s) are the only lines of code that should be outside of a function.
accounts = [
'Mark Thomas: $11.99 $52.08 $81.15 $79.16 $16.23 $88.11 $21.20 $0.02 ',
'Gregory Powell: $97.42 $96.05 $71.82 $24.79 $14.42 $60.84 $35.46 ',
'Kevin... |
b2ed1fa81359d9fff84be7c603a45e153fd32b06 | 2d80fd4916cb3487dc41154ef3eedde4d5b103fb | /Lista2/Lista 2 - Q. 05.py | 8dca7d46643251dd3a386c72a77579fdcb545df6 | [] | no_license | pedrolucas-correa/ies-python-lists | 8ce185b2415b3bbcc0d9e40d62027ef6637fe3ba | 8eacc1bb0cfa37c47cc840810cb6c87283056d8d | refs/heads/main | 2023-06-09T18:35:26.619287 | 2021-06-25T14:12:33 | 2021-06-25T14:12:33 | 380,257,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | Lista 2 - Q. 05.py | num = int(input("Digite um número (Positivo ou Negativo):"))
if num >= 0:
print(num*2)
else:
print(num*3)
|
22523304c9e2ce1339a7527cdbd67a81c780d806 | f0181afd2eea9b086ce9487fb8d7fd949282140a | /phage/comapre_gpdb_mgv.py | dadaaa907011475b03750c64950989ea6627e2c9 | [
"MIT"
] | permissive | linsalrob/EdwardsLab | 4a571676859c8b7238e733a0d3ad98ceb2e83c63 | 3c466acc07f1a56b575860ad26c92f900b272a53 | refs/heads/master | 2023-08-20T17:13:35.466103 | 2023-08-17T09:17:36 | 2023-08-17T09:17:36 | 25,702,093 | 36 | 25 | MIT | 2020-09-23T12:44:44 | 2014-10-24T18:27:16 | Python | UTF-8 | Python | false | false | 2,368 | py | comapre_gpdb_mgv.py | """
We have created mash sketches of the GPDB database, the MGV database, and the SDSU phage, and
this will figure out the top hits and summarize their familes.
"""
import os
import sys
import argparse
def best_hits(distf, maxscore, verbose=False):
"""
Find the best hits
"""
bh = {}
allph = set()... |
669eb2e898c3a127ae01e0ee3020a3674e5e340d | 06051aadd5ca18d90b4aa8e92220b5f0b9f2e5b1 | /yolo/tutorial_pydarknet.py | fe36e186a01d3966f1d56cdab2e3849e8dd7c606 | [] | no_license | cflin-cjcu/mytools | f37eb6285eabfb30425008189b1d8fc007efd3a6 | fffd90de3c783c3e2206feab641c12c12bee3367 | refs/heads/master | 2023-08-18T17:31:07.179455 | 2021-09-13T09:34:23 | 2021-09-13T09:34:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | tutorial_pydarknet.py | from yoloPydarknet import pydarknetYOLO
import cv2
import imutils
import time
yolo = pydarknetYOLO(obdata="../darknet/cfg/coco.data", weights="yolov3.weights",
cfg="../darknet/cfg/yolov3.cfg")
video_out = "yolo_output.avi"
start_time = time.time()
if __name__ == "__main__":
VIDEO_IN = cv2.VideoCapture(0)
... |
6b55a9061bb118558e9077c77e18cfc81f3fa034 | 53eee7eb899cb518983008532257037fb89def13 | /1121.divide-array-into-increasing-sequences.py | 7674f18731fbe64c4282e3b9e18a47c82cdfa3d3 | [] | no_license | chenxu0602/LeetCode | 0deb3041a66cb15e12ed4585bbe0fefce5dc6b26 | 3dc5af2bc870fcc8f2142130fcd2b7cab8733151 | refs/heads/master | 2023-07-05T19:26:21.608123 | 2023-07-02T08:35:35 | 2023-07-02T08:35:35 | 233,351,978 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,492 | py | 1121.divide-array-into-increasing-sequences.py | #
# @lc app=leetcode id=1121 lang=python3
#
# [1121] Divide Array Into Increasing Sequences
#
# https://leetcode.com/problems/divide-array-into-increasing-sequences/description/
#
# algorithms
# Hard (53.30%)
# Likes: 32
# Dislikes: 11
# Total Accepted: 1.7K
# Total Submissions: 3.2K
# Testcase Example: '[1,2,2,... |
d7524a455e62594e321b67f0a32a5c3a7437c1d6 | 27142597cf6b4fc060f5f2e0b54bac4319c3e250 | /openpyxl_example.py | 60b77250775f3f28f617c83152871f29551bde9f | [] | no_license | NekoLines/openpyxlExample | a45fded062b0c2456946164724c31688c3463edd | ce04f1e9e738346f792a825b50e4e75e2e2e0317 | refs/heads/main | 2023-02-21T05:38:54.957650 | 2021-01-24T11:10:33 | 2021-01-24T11:10:33 | 332,427,048 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,470 | py | openpyxl_example.py | # 引入基础的工作表
from openpyxl import Workbook
# 引入增强的修改功能
from openpyxl.styles import Font,Alignment,Border,Side,PatternFill,colors
# import openpyxl
def make_example():
# 设定文件目录
addr = './example.xlsx'
# 初始化文件,切换到活动的工作表
work_book = Workbook()
# 读取文件采用
# work_book = openpyxl.load_workbook... |
9fc9d766915bcefde4f0ba5c24cb83e33fc66272 | d70d4ae7e2165100f0e54bb7b72367083e881102 | /harvester/urls.py | fa29628cb413b5aa1c11acd2ad2cc2575efb6115 | [] | no_license | spawnedc/harvester | 0ade05457c92e6214c94d0ada78b78d6323b12c3 | 4a5c4371a18f276402d2fc74dce15c3af1793fdb | refs/heads/master | 2020-05-03T18:50:34.843625 | 2013-07-04T16:27:29 | 2013-07-04T16:27:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 786 | py | urls.py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
import dbindexer
dbindexer.autodiscover() #This needs to happen before anything else, hence strange import ordering
urlpatterns = patterns('harvester.views'... |
c88e2336432f93d95b4e2285aa532b673a4a410b | fb2cc597f319380d228fc15c4008760a82203687 | /var/spack/repos/builtin/packages/r-dt/package.py | bbd3232d701990628acb82e81868c6121a3b028a | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LGPL-2.1-only"
] | permissive | JayjeetAtGithub/spack | c41b5debcbe139abb2eab626210505b7f930d637 | 6c2df00443a2cd092446c7d84431ae37e64e4296 | refs/heads/develop | 2023-03-21T02:35:58.391230 | 2022-10-08T22:57:45 | 2022-10-08T22:57:45 | 205,764,532 | 0 | 0 | MIT | 2019-09-02T02:44:48 | 2019-09-02T02:44:47 | null | UTF-8 | Python | false | false | 2,064 | py | package.py | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RDt(RPackage):
"""A Wrapper of the JavaScript Library 'DataTables'.
Data obje... |
6b597f1570c022d17e4476e2ab8817e724a166a7 | fb5363ddc5d9a861e884f97ea3ec8e75741ee243 | /reversePolishNotation.py | 85ebf8205cc9c0fa2825d07158ec7f459cb3897b | [] | no_license | PulakMajumdar81/Daily-DSA-prep | d5623b6d9b390cfa46efc2bd3a1648b03fac8793 | bacebba9c9243f99fbb804923c406f182ef357c8 | refs/heads/master | 2023-08-13T02:17:56.713947 | 2021-09-28T06:46:07 | 2021-09-28T06:46:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py | reversePolishNotation.py | class Solution:
def evalRPN(self, tokens: List[str]) -> int:
def operation(op1,op2,op):
if op == "+":
return op1 + op2
if op == "-":
return op1 - op2
if op == "*":
return op1 * op2
if op == "/":
... |
09c3a10230e7d0b3b893ccf236c39fc2dc12b2c6 | 0b9a5094b2c38e5822c0c66a0cb9bc7070864732 | /p10.py | adf00a87e9965940f35200f968e179d194dbbefb | [] | no_license | shy2913/python-tutorial-2 | 8200a87190dc71eaf82ab06bcb7912820b1bcab2 | aa71e83648a19b891ece72ae80cd643c2f16a540 | refs/heads/master | 2023-04-10T19:35:07.625684 | 2021-04-24T14:20:15 | 2021-04-24T14:20:15 | 361,180,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 82 | py | p10.py | dic = {'name': 'Eric', 'age': '25'} # 딕셔너리 형태
print(dic['name'])
|
ecdc8f5f76b92c3c9dcf2a12b3d9452166fcb706 | e0adfbed3274f3e80c3d6b7503747836bdb8bbb2 | /art/tests/rhevmtests/storage/storage_read_only_disks/config.py | 22ad29c495d963a59d69b77d62e69c42bc3eb501 | [] | no_license | AlertBear/ovirt-manager-auto | f65330384ce6e9d1bdb8bd02ae8849abd8092508 | 333521cfb1ac6cbcf2fedd604288ff7ffcb11d45 | refs/heads/master | 2021-01-24T11:04:50.815178 | 2018-02-21T14:37:34 | 2018-02-22T11:17:38 | 123,068,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | config.py | """
Config module for storage read only disks
"""
from rhevmtests.storage.config import * # flake8: noqa
TEST_NAME = "read_only"
VM_NAME = "{0}_vm_%s".format(TEST_NAME)
VM_COUNT = 2
DISK_NAMES = dict() # dictionary with storage type as key
DISK_TIMEOUT = 600
# allocation policies
SPARSE = True
DIRECT_LUNS = UNUSE... |
a55024f0e5edec22125ce53ef54ee364be185cb8 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/mailgun/test_init.py | 03bbfd802875d88c0e697b42d5f32e2540f7e58d | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 6,851 | py | test_init.py | """Test the init file of Mailgun."""
import hashlib
import hmac
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components import mailgun, webhook
from homeassistant.config import async_process_ha_core_config
from homeassistant.const import CONF_API_KEY, CONF_DOMAIN
from hom... |
a5930d2158649dbec10c6af629f16f591aa7602e | ed85cd5090ef11597379cf01e5fde69fac807dd7 | /segment.py | 5f5e4e00d46bfcf79a3a4896fffd7509f945075d | [] | no_license | armsnyder/SickBeetz | 1c68e98a59caf85316cf2bfad7e526ad2a356b05 | e6da8a9724a90b706a2367096cad662c130eebe2 | refs/heads/master | 2021-01-14T14:07:17.072180 | 2015-12-07T06:10:06 | 2015-12-07T06:10:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,482 | py | segment.py | import numpy as np
import librosa
class Segment:
def __init__(self, wave_form, sr, bounds=(None, None)):
self.wave_form = wave_form[bounds[0]:bounds[1]]
self.features = {}
self.sr = sr
def extract_features(self):
# self.features['length'] = np.array([float(len(self.wave_form))... |
b483deac1d12d11befb30fd8444f25b9db7eda49 | 5df779714c34d22b34b00f64874e3e2bae3a9968 | /test.py | 5246c0d0103d2cae66f4da2e20b744d80ea6e50f | [
"MIT"
] | permissive | ingvarbiz/thebestspinner-py | 1301403f242c5777ea89f870f7fc35e8a0caa8ec | 4aa1ab747e263343bc7685fc694b04af18f87cd2 | refs/heads/master | 2016-09-05T13:38:06.616687 | 2011-04-10T02:10:52 | 2011-04-10T02:10:52 | 1,587,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | test.py | #!/usr/bin/env python
import thebestspinner
tbs = thebestspinner.Api("seo@searchenginedominator.co.uk", "0d236e820f47f469a20bcfe363eec209", 50)
print tbs.apiQuota()
#original_text = "This is the text we want to spin"
#spin_text = tbs.identifySynonyms(original_text)
#print spin_text
#ev_text = tbs.replaceEveryones... |
91d5aac71a70e2fa2266a26d15911ef952e61e30 | c0598fe7005351e74b6eef53c716fbdc1b377314 | /otter/rest/limits.py | 5267330c05262ecd6f5eb82abf2f8cc4147508ef | [
"Apache-2.0"
] | permissive | rackerlabs/otter | fb8fce00a53db62e0c21ef7bc47d84dbd3cada8f | 7199cdd67255fe116dbcbedea660c13453671134 | refs/heads/master | 2023-08-29T02:45:48.581828 | 2023-02-22T21:11:27 | 2023-02-22T21:11:27 | 6,097,139 | 20 | 32 | NOASSERTION | 2023-05-09T21:04:44 | 2012-10-05T21:35:59 | Python | UTF-8 | Python | false | false | 1,577 | py | limits.py | """
rest endpoints that return group limits
/v1.0/tenant_id/limits
"""
import json
from lxml import etree
from otter.log import log
from otter.rest.otterapp import OtterApp
from otter.rest.decorators import (fails_with, succeeds_with,
with_transaction_id)
from otter.rest.errors impo... |
95145f3153585fb00963334d3f85a27ac58b4921 | e93fdfd6115d5627101c31dac1f6e3455ba9685c | /DataView/test1.py | 7670bddbf25a63d6dd27630e6d33b9a7db7df1fc | [] | no_license | likaili2016/PythonNote | c02222767527d399e569f717b0b30ab2a2ad1995 | f8a32060be1dba01faa2eb6d2d7cb6025792f68d | refs/heads/master | 2021-06-17T03:59:32.113596 | 2017-05-26T03:42:14 | 2017-05-26T03:42:14 | 84,028,098 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | test1.py | # coding=utf-8
import matplotlib.pyplot as plt
x_value = list(range(0, 1001))
y_value = [x**3 for x in x_value]
plt.plot(x_value, y_value, linewidth=5)
# 设置图表的标题
plt.title('Test1', fontsize=20)
# 设置x轴的参数名称
plt.xlabel('value', fontsize=14)
# 设置y轴的参数名称
plt.ylabel('Cube of Value', fontsize=14)
# 设置刻度的大小
plt.show()
|
78b3e75854729e81f33dd0213f3e988945d65c8c | ca451439ec56be8646110708058bdabcecc0c616 | /Branching and Iteration (while loops).py | 3ae904f54abb298e0adc6e4f1cbc2da9a40cee9e | [] | no_license | goguvova/MIT-courses | d27e74c2becdb1bf3f642a4c6de18ed1193c72fa | 2e3cb90a4db8084d50c6f4602765a8151ce255b5 | refs/heads/master | 2020-04-23T23:10:32.558467 | 2019-02-19T19:42:36 | 2019-02-19T19:42:36 | 171,526,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | Branching and Iteration (while loops).py | ####################
## EXAMPLE: while loops
####################
n = input("You are in the Lost Forest\n****************\n****************\n :)\n****************\n****************\nGo left or right? ")
while n == "right" or n == "Right":
n = input("You are in the Lost Forest\n****************\n****** ***\n ... |
80f48f250d70dd34a860c8ea75ef2c06c9e4b406 | 54df06e1c0cdda4445838d203334d0615bd2cd40 | /VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py | 8754ebc4e7707755602ee536954f1f20f1594de0 | [
"Apache-2.0"
] | permissive | opnfv/samplevnf | b2a0ad40ee0a87f8476d8b182c1cf66b7b837ed8 | 090efc9c81c8b1943d162249d965a3e40502d50e | refs/heads/master | 2023-08-03T08:03:09.389406 | 2023-06-30T15:42:13 | 2023-07-24T13:35:30 | 97,973,205 | 24 | 29 | NOASSERTION | 2022-01-25T12:33:24 | 2017-07-21T17:46:49 | C | UTF-8 | Python | false | false | 11,311 | py | prox_ctrl.py | ##
## Copyright (c) 2010-2020 Intel Corporation
##
## 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 la... |
b2152fdb46608955e42020bcec57db07254f70d5 | 8ef580c1c1d773be1fd7827e50bb865e68588c8a | /kadai2-1.py | 98445e076bb2f0ef4fe3ff07abececb8e1f09377 | [] | no_license | karima-n/youtuber_analysis | b7667e964cc9d9e70a09c169cf041808840dc8c8 | c48160141362901bb3616a5c9d9d10f088fc9c0a | refs/heads/master | 2020-04-06T21:09:22.737583 | 2018-11-16T03:12:39 | 2018-11-16T03:12:39 | 157,794,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py | kadai2-1.py | # NetworkXを用いてModularityを実行
import networkx as nx
import matplotlib.pyplot as plt
from networkx.algorithms.community import greedy_modularity_communities
G = nx.read_edgelist('youtuber4.txt', nodetype=str)
c = greedy_modularity_communities(G)
nodes = nx.nodes(G)
color_list = []
for node in nodes:
for i... |
90888f1c06de055c2a85bd3f78a551ba2c7d8c9f | 38e6a3829044b4e171f6cceca36adf337ca42f90 | /DataOperations/Insert.py | c4c05ee6b07e4e8694c24dfff0c8f30cff356588 | [] | no_license | esealeksandrov/SQLAlchemy_Tutorial | cc2a8226030e42b2d3fdd83abf86f4fb71225a50 | fde600cd0a3e71b8b53ce25ca5024850a29d6a3d | refs/heads/master | 2023-08-11T15:36:10.638924 | 2021-09-21T21:25:11 | 2021-09-21T21:25:11 | 403,038,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,001 | py | Insert.py | from sqlalchemy import engine, insert
from SQL_Alchemy_metadata import user_table, address_table, engine
print("\n{:_^80s}".format("Inser Log Statret")) # Для выделения лога исполнения Insert конструкций
stmt = insert(user_table).values(name="spongebob", fullname="Spongebob Squarepants")
print(stmt)
# Вывод: INSERT I... |
f1b94eb2e4e1084ebf794460661e0c10372531e1 | e10e02bb0e8e648abd050bdcb61374e233f4b798 | /python/monster.py | 0b952e5a69aa6bda8749ad1659b35148aebedecf | [] | no_license | alucas/dsniff | b63cdad108eb30267fb8bd23a7e71f094839c4b0 | f406e0376f19986fb29c54270707da263674a0ee | refs/heads/master | 2020-12-30T09:26:03.268593 | 2011-07-28T23:58:49 | 2011-07-28T23:58:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,086 | py | monster.py | # id int
# nameId int
# gfxId int
# race int
# grade int
# grade int
# monsterId int
# level int
# lifePoints int
# actionPoints int
# movementPoints int
# paDodge int
# pmDodge int
# earthResistance int
# airResistance int
# fireResistan... |
9001bfb874c922c233f81a0ca1e577c5d73fc38c | 6fddad4db219dfafea6024a8c1cb74357850776a | /Python/Finding the percentage/find_per.py | 12852e35db9f75634fb7588d4feee55a6074ac03 | [] | no_license | jeronimofjr/Hackerrank | b5f7d75641709dc3169122627e7988651dae541a | 642764f80d941114c7d72483b54de89b378e7cc4 | refs/heads/main | 2023-08-19T08:12:59.907041 | 2021-09-15T04:02:48 | 2021-09-15T04:02:48 | 406,076,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 160 | py | find_per.py |
x = int(input())
dic = {}
for i in range(x):
a = input().split()
dic[a[0]] = list(map(float, a[1:]))
print('{:.2f}'.format(sum(dic.get(input()))/3))
|
eccdad8086c58017eaf44e1703531a2608ec36eb | 3abe0b8547cad98a11da72b7df71b36a5bc132e2 | /really_fast_tuning/multiprocess_directory/multiprocessing_comparison.py | 2b92dcf987d4dd8fc7dffb07128fbe59544d2737 | [
"MIT"
] | permissive | gnpradeep/fast_python_demo | b92d7ef7cccf87c30062ea0f1cb38702af368746 | 3bc738052f17daca3ea5d221b1742f4dee0439c7 | refs/heads/master | 2023-01-28T15:15:51.843609 | 2020-12-08T10:32:41 | 2020-12-08T10:32:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | multiprocessing_comparison.py | from really_fast_tuning.multiprocess_directory import defs
if __name__ == "__main__":
output = map(defs.f, [1, 2, 3])
print(list(output)) |
53c4f0c420fc30b14a03251b29609cfe2dcc5cf9 | ae3b1315aa3b2bce2c893bb7a53c34a6d14e6a65 | /cherry/ice/models.py | ea3ad0f8500c254a8671e3f06732d888297a0d4a | [] | no_license | Durga592/projects | a3948e9ccc5a677548fec78c555d631dee16049d | a6c4556fa1f41f8bf434d811f5ec9c8c38689849 | refs/heads/master | 2020-03-23T08:13:55.097014 | 2018-09-25T07:23:09 | 2018-09-25T07:23:09 | 141,315,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,825 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Document(models.Model):
description = models.CharField(max_length=255, blank=True)
document = models.FileField(upload_to='documents/')
uploaded_... |
b8913dafe6572a5f988d21eea297bb75feaaa4ce | de40d3fa8d8af0030556d27d6833f6a1a0e7700c | /baekjoon/2263py/a.py | 2d3ba904cadfbaa8e331e11147715c150a15bea1 | [] | no_license | NeoMindStd/CodingLife | cd6a627209c0353f4855f09fd5dfef8da4bbfef6 | bcb6c3752f472e6a4f3b8f158d02bc3599dfcda3 | refs/heads/master | 2022-12-24T10:42:45.390085 | 2022-12-11T16:27:16 | 2022-12-11T16:27:16 | 191,797,634 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 788 | py | a.py | import sys; read = sys.stdin.readline
sys.setrecursionlimit(1_000_000)
results = []
n = int(read())
in_order = list(map(int, read().split()))
in_idx = {in_order[i]: i for i in range(n)}
post_order = list(map(int, read().split()))
def insert_from_in_order(in_start, in_end, post_start, post_end):
if in_start ... |
9616e354986e3b3a69d44af23c65dd0ec27f6370 | 2212a32833776a5d5d2164d8efd11bd18bd3f768 | /tf_agents/bandits/policies/boltzmann_reward_prediction_policy.py | 9d5a7541ec5c2adf440363f0e1316c0af09a2da7 | [
"Apache-2.0"
] | permissive | tensorflow/agents | f39805fb98ef9af712dcaff3ba49e1ac6d42804b | eca1093d3a047e538f17f6ab92ab4d8144284f23 | refs/heads/master | 2023-08-14T04:56:30.774797 | 2023-08-02T17:43:44 | 2023-08-02T17:44:09 | 157,936,206 | 2,755 | 848 | Apache-2.0 | 2023-07-26T02:35:32 | 2018-11-17T00:29:12 | Python | UTF-8 | Python | false | false | 8,551 | py | boltzmann_reward_prediction_policy.py | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
69427149c03bc1c753322d2ee41d5ea1e3d032ff | 956ff36dd72336409298a2c572fcdc2312ff01de | /mycv/myprofile/migrations/0001_initial.py | 96cdd728fd7a982909fd49cc5e27d0724fb383c4 | [] | no_license | H1bertto/MyCvResume | 33f9d71bcefbd7a66819dd6a44d6d01bbe9d3868 | 0eabca0678f6ca9f59c597e099d07a84fa47aa30 | refs/heads/master | 2023-01-08T10:05:16.975167 | 2019-10-23T16:16:02 | 2019-10-23T16:16:02 | 200,555,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,341 | py | 0001_initial.py | # Generated by Django 2.2.4 on 2019-08-23 16:55
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
... |
0680279f4736653c0b3af4a39d78442f648ad8d6 | 4b2466c2b4eadcf0012cd5f75f6e0b690f4a05ef | /codedoor/views/search.py | 475b27281f05d71e9e6ed669912e96842f42c9c4 | [] | no_license | codebase-berkeley/code-door | 02c219c018486dba05db00988779d284b48bcfd3 | 25feb651e39fe5800b7aa184d42bc3584a34ec78 | refs/heads/master | 2021-10-25T05:15:45.555692 | 2019-04-01T19:04:05 | 2019-04-01T19:04:05 | 116,878,032 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,557 | py | search.py | from django.shortcuts import render, redirect, get_object_or_404
from codedoor.models import Profile, Company, Question, Application
from django.http import HttpResponse
from codedoor.models import Review, Company, Profile
from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators imp... |
79c27aa235c077e5e071c62de3a150d702a06989 | 864c74298b9c5ccc092856598bb75faa8dc164da | /processing/erate_draw_ring.py | 8ee376110cbaa337037bb5a2ae6c67fc2a65f943 | [] | no_license | akbaker/erate-fiber | fa749be80b377afdb28cb82d0cbce1edbfcc6056 | 092252330df037cedc4c7ddfb91df4414612a534 | refs/heads/master | 2021-01-15T20:48:38.028675 | 2014-03-21T18:30:00 | 2014-03-21T18:30:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,751 | py | erate_draw_ring.py | ## ---------------------------------------------------------------------------
### VERSION 0.1 (for postgis)
### erate_draw_ring.py
### Created on: June 2, 20123
### Created by: Michael Byrne
### Federal Communications Commission
##
## ---------------------------------------------------------------------------
##thi... |
b760a405021b71ea0d0a7066165083b702781fbc | 7cf8f227861d901202ed08388469b15483817a21 | /unit_tests/composition.py | 7bb74c7e4ec4677cf2c7b6e0e573343ca7a8ec36 | [] | no_license | SkinyMonkey/Pyrser | 2f352ff3e38fc340014c1ddd31d61eb3b4e2a340 | ee343e2152834ee640bd083c7a3db4a061cfbc48 | refs/heads/master | 2021-12-31T14:01:39.950538 | 2013-03-12T21:42:06 | 2013-03-12T21:42:06 | 8,738,864 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,157 | py | composition.py | import unittest
from pyrser.grammar import Grammar
class CompositionMath(Grammar):
grammar = """
operand ::= #num '+' #num
;
"""
# def __init__(self):
# super(CompositionMath, self).__init__(CompositionMath,
# CompositionMath.__doc__,
# ... |
cf7083acea797f0a8398a318e6a599e177500a6f | 0739bf047dc56199c20e48c79b017fc3c3c696e5 | /accounts/models.py | 43eadd064b7b5c03d78b9b126453e5d30580c360 | [] | no_license | abdelrhman-adel-ahmed/CMS | 44aa32238c69c6d5a899040e8b695099c7e6f969 | 9be48ed0d7e81fa02b9ba3b32ebd8d9d452fe7e9 | refs/heads/master | 2023-03-29T06:06:14.889847 | 2021-04-04T20:47:54 | 2021-04-04T20:47:54 | 325,320,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,143 | py | models.py | from django.db import models
from django.contrib.auth.models import User
class Customer(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE,null=True)
name=models.CharField(max_length=200,null=True)
phone=models.CharField(max_length=200,null=True)
email=models.EmailField(null=True)
... |
a5ffcc673fc04f57084cbbd73620c33c02c781e5 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/859.py | 5c4900a6e5f079d6b87f18d5efaa11e3c1353b5f | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,620 | py | 859.py | #benoni.boy
#Google Code Jam
#13 April 2013
import sys
from gmpy import *
sys.stdin = open('C:\GCJ\in.txt')
sys.stdout = open('C:\GCJ\out.txt', 'w')
def numOFS(s, e):
n = str(sqrt(s))
l = (len(n)//2) + 1
palstart = int(n[:l])
pal = int(str(palstart) + str(palstart)[:-1][::-1])
while ... |
bec1dd27956c840abaa28ebb56f1bba83107460d | 6d90614cb8d7dd65a678b409f89ea5e4f60ce1a9 | /lcode100-199/ex107/isAnagram.py | f33d8902c765f3a6dfc42be6ec3884ad0eb55507 | [] | no_license | rh01/gofiles | c19300334485203e415e443f5a5ca50621b9b48a | 328408860fcf6bffbbd2096b4c7182d8abb2ea66 | refs/heads/master | 2020-08-07T22:55:47.350509 | 2020-07-29T03:29:37 | 2020-07-29T03:29:37 | 213,612,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | isAnagram.py | from collections import Counter
class Solution(object):
def isAnagram(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return Counter(t) == Counter(s)
sol = Solution()
print(sol.isAnagram(s = "anagram", t = "nagaram"))
print(sol.isAnagram(s = "rat", t ... |
75b678dc7d1bb3b59414402a02fc198c599e6fdf | 125b56aea06471504a65669b3652b7abf6cb2344 | /src/main/python/robot/xml_engine/pyquery_engine.py | 5609a167867e082d2f9a29c895eac1041ffb563f | [
"Apache-2.0"
] | permissive | OpenCIAg/py-robot | 9ec9b362a9c6ac9098bff863bf339b5de1b2d021 | ff9f7f320a68e481d6fa18ed395625b26b934fd5 | refs/heads/master | 2023-02-20T06:49:22.562918 | 2021-07-27T11:34:47 | 2021-07-27T11:34:47 | 144,620,911 | 0 | 1 | Apache-2.0 | 2023-02-16T04:14:05 | 2018-08-13T18:52:01 | Python | UTF-8 | Python | false | false | 2,063 | py | pyquery_engine.py | from __future__ import annotations
import logging
from dataclasses import dataclass, field
from logging import Logger
from typing import Iterator, Iterable
from pyquery import PyQuery
from robot.api import XmlEngine, XmlNode
__logger__ = logging.getLogger(__name__)
@dataclass()
class PyQueryNodeAdapter(XmlNode):
... |
e595aff800e98397fd4d34aab941464a31117f1d | 1aa4421ccc709722dcd5d5d77a794966b41c753c | /src/pandas_profiling/report/presentation/flavours/html/image.py | 6ec0078ba77f9f50870eee79aa01efb090e5dda2 | [
"MIT"
] | permissive | sweersr/pandas-profiling-1 | d6e123c8b7695e2472c8b94910334d879f795cb3 | 4364c0f2689dc03635a13c0d61affeedd5464558 | refs/heads/master | 2020-12-21T16:27:42.955568 | 2020-01-30T13:46:10 | 2020-01-30T13:46:10 | 236,489,370 | 2 | 0 | MIT | 2020-01-27T12:49:07 | 2020-01-27T12:49:06 | null | UTF-8 | Python | false | false | 260 | py | image.py | from pandas_profiling.report.presentation.core.image import Image
from pandas_profiling.report.presentation.flavours.html import templates
class HTMLImage(Image):
def render(self):
return templates.template("diagram.html").render(**self.content)
|
4fa112b38e8783dc7f37f977713d9787bd9686e9 | e0d1d6be194f10b14c1693aceefb55c5b0ebb0da | /452.用最少数量的箭引爆气球.py | 7f556f3fc584a0d0d80ce1e798d26abac97daab6 | [] | no_license | kexinshine/leetcode | 532edff88db81251c13354a3fec50265e90732c2 | 396df391c698df086233ba7caf8e2277a86afd48 | refs/heads/master | 2023-05-02T23:18:28.807830 | 2021-05-06T06:37:03 | 2021-05-06T06:37:03 | 342,525,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | 452.用最少数量的箭引爆气球.py | #
# @lc app=leetcode.cn id=452 lang=python3
#
# [452] 用最少数量的箭引爆气球
#
# @lc code=start
class Solution:
def findMinArrowShots(self, points: List[List[int]]) -> int:
if not points:
return 0
points.sort(key=lambda x:x[0])
l,r=points[0][0],points[0][1]
ans=1
for ball i... |
6e08ec1a8aafa8bec852191240051c3498ff2b67 | 344ffde84c8a0c6dad9bc5f0011418ef926fa19e | /Basic_Programs/Analysis_pandas/Indexing.py | 278e225880f31c1f163571c9eb1071f5f74a2b91 | [] | no_license | Snehagit6/G-Pythonautomation_softwares-Sanfoundry_programs | d2f2f3e9dc2be8b562b230f5ca93e8a82a237447 | 12c164b9531c91f57b3c0289dbf2934cd76642d2 | refs/heads/master | 2021-07-08T10:06:50.987025 | 2021-03-15T16:33:25 | 2021-03-15T16:33:25 | 231,715,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,612 | py | Indexing.py | import pandas as pd
import numpy as np
import datetime
#Indexing the Dataframe of random numbers as per the row number.
def row_no_index():
df=pd.DataFrame(pd.np.random.random(100))
df.index=['row_'+str(i)for i in range(1,101)]
print(df.sample(frac=0.7))#Printing 70% of data
print(df.shape)
#Indexing t... |
40b758d12fa1c8008ef20e4eda0f2e8b8b71b61c | be2d532edeb7fdf67681e8594e138d974ac4d7ee | /codes/analysis_simulated/analysis_idtxl_bte_sim_basic.py | c1a68ec859d5dac645bfc236d9bbb4362f8e7b09 | [] | no_license | aleksejs-fomins/nest-mesoscopic-metric-test | e27caf76dd735781c3a7a6b7bf8d9470829fb44b | 685c07d38dee53ad1e63f8991c45fdb817ffa126 | refs/heads/master | 2020-03-23T07:31:41.528963 | 2019-07-17T16:55:21 | 2019-07-17T16:55:21 | 141,277,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,521 | py | analysis_idtxl_bte_sim_basic.py | # Export library path
import os, sys
thispath = os.path.dirname(os.path.abspath(__file__))
p1path = os.path.abspath(os.path.join(thispath, os.pardir))
p2path = os.path.abspath(os.path.join(p1path, os.pardir))
sys.path.append(os.path.join(p1path, 'lib/'))
# Locate results path
rezPath = os.path.join(os.path.join(p2path... |
37f65b7229946c0e4b9529b4e4193bda38edb11a | a90b05f1e579743ccbaf0e971dfa3055e39ca889 | /step_puzzle/core/puzzle_utils.py | 35fc2753b669f808cc84927742f011ce2a6ee297 | [
"MIT"
] | permissive | SwartBen/irn | 182115b46d7e90698c937eeff000a100ca3da40e | 18656e1510c1f8a422a1b66922ef80d35c85d455 | refs/heads/master | 2022-06-20T21:12:08.261671 | 2022-06-06T03:16:43 | 2022-06-06T03:16:43 | 470,201,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | puzzle_utils.py | import math
import torch
import torch.nn.functional as F
def tile_features(features, num_pieces):
_, _, h, w = features.size()
num_pieces_per_line = int(math.sqrt(num_pieces))
h_per_patch = h // num_pieces_per_line
w_per_patch = w // num_pieces_per_line
"""
+-----+-----+
| 1 |... |
60e0851184135f8465eaf0037a4c55da218d57c4 | d2771d2a9fd16aa0f348b4a7dcb04a8dc7ceaae4 | /13일차/Dictionary.py | 89fc06bfc2ffadceba8ee2e5934ae14f4d9d06b8 | [] | no_license | Yumina9/2019-LIKELION-WINTER-STUDY | 1e984b15de97e7d70bf327254ec28dd812b738d2 | 121d2845d648ea947444d9d3c5e371966538ed38 | refs/heads/master | 2020-04-13T12:00:15.570764 | 2019-01-24T11:52:30 | 2019-01-24T11:52:30 | 163,185,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | Dictionary.py | students = ['태연', '진우', '정현', '하늘', '성진']
for number name in enumerate(students):
print("{}번의 이름은 {}입니다.".format(number.name))
students_dict = ("{}번".format(number + 1): name for number, name in enumerate(students))
scores = [85, 92, 78, 90, 100]
for x, y in zip(students, scores):
print(x, y)
score_dic = {st... |
4dd8353baa707bd0dd881ead37f269fc2c0e4959 | e7bf1ff05319acc59bba5af5890041bd82c3e197 | /mne/datasets/testing/__init__.py | 7b60bd35b49407f0940a297a402c69d4cad3b92d | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mne-tools/mne-python | 7e8d7e945dfbbee6432a4955cf050fa823f2d34b | f44636f00666b8eb869417960926d01690ff4f42 | refs/heads/main | 2023-09-04T03:05:37.402100 | 2023-09-03T14:15:18 | 2023-09-03T14:15:18 | 1,301,584 | 2,437 | 1,418 | BSD-3-Clause | 2023-09-14T19:23:38 | 2011-01-28T03:31:13 | Python | UTF-8 | Python | false | false | 150 | py | __init__.py | """MNE testing dataset."""
from ._testing import (
data_path,
requires_testing_data,
get_version,
_pytest_param,
_pytest_mark,
)
|
eeee34432827f93f3cac8714b18a029c9adac8e2 | 36c7582ab48c863ab1ccd95737faf7b8b4090cbc | /.openapi-generator/post_gen_script.py | b0d7e565278859f70c1a780099e7d9bd7cdc8e95 | [
"MIT"
] | permissive | AntoineDao/honeybee-schema-dotnet | c4ba4b86e3ed7f1508f7d1cc8404b6114d031a8c | e1e79f3883826e940d902294ce51f91bb53e3ac1 | refs/heads/master | 2021-01-16T13:01:16.713066 | 2020-02-25T00:04:46 | 2020-02-25T00:05:26 | 243,131,096 | 0 | 0 | MIT | 2020-02-26T00:18:17 | 2020-02-26T00:18:16 | null | UTF-8 | Python | false | false | 3,033 | py | post_gen_script.py |
import os
import urllib.request, json
import shutil
def get_allof_types(obj, allofList):
if isinstance(obj, (str, float, int)):
return
if 'anyOf' in list(obj.keys()):
uitems =[]
for uitem in obj['anyOf']:
typeKeys = uitem.keys()
if '$ref' in typeKeys:
ref_type = uitem['$ref'].sp... |
3806adb0e1e3a079c0823a511adaa6720532808a | 470b3d063ec639200de58acd24c6b50466315ece | /competition_viewer/tile/scripts/download.py | b515f1c7b93b35288d8c46036ebdc267cf26cc16 | [
"MIT"
] | permissive | FlintHill/SUAS-Competition | 56da6189e1e3391acd873806ccb2181a729fac05 | 8931c8859878692134f5113d4c6c3e17561f0196 | refs/heads/master | 2020-04-03T21:28:08.110599 | 2020-01-27T13:42:53 | 2020-01-27T13:42:53 | 34,731,946 | 5 | 12 | null | 2020-01-27T13:46:10 | 2015-04-28T13:25:37 | Python | UTF-8 | Python | false | false | 6,112 | py | download.py | #!/usr/bin/python
# TODO: cleanup
# imports sorted in order of use
import os
import math
import requests
import sys
from time import sleep
"""
CREATED BY AND FOR FLINTHILL AUVSI SUAS TEAM ||| v0.3
[Educational Purposes]
NOTES:
Zoom levels range from 0-19 on main OSM server.
URL path looks like: htt... |
d81fc59150d2fd18a7af6448a3f02e04377cf524 | d806039aacec6aa3719f41989bf3322a319abdd8 | /BEGAN/network.py | 363b0ac9a3142ab977b772caac5095a99b9a68c5 | [
"MIT"
] | permissive | MingtaoGuo/DCGAN_WGAN_WGAN-GP_LSGAN_SNGAN_RSGAN_BEGAN_ACGAN_PGGAN_TensorFlow | 7cbce46b78f6e254c729df351bc127740a060e84 | af6a012a9e9ddff29195b12988f3e66091696ff0 | refs/heads/master | 2022-09-18T13:04:49.324624 | 2022-08-20T01:47:15 | 2022-08-20T01:47:15 | 139,560,429 | 173 | 39 | null | null | null | null | UTF-8 | Python | false | false | 2,254 | py | network.py | import tensorflow as tf
from ops import *
def Encoder(inputs, n=128, h=64):
with tf.variable_scope("Encoder"):
inputs = elu(conv("conv1", inputs, n, 3, 1))
inputs = elu(conv("conv2_1", inputs, n, 3, 1))
inputs = elu(conv("conv2_2", inputs, 2 * n, 3, 1))
inputs = Subsampling(... |
15cfd9e4d74a2e25f91f5a2348d53a39a392ffce | 6a45b44dca61d193a3b4913c043bbaa1ef794e3a | /Edabitchallenge1.py | 60b845b3be4af7822eac712e717a0ea035c327f2 | [] | no_license | PontusLiedgren/Parprogrammering | e81bb3adfc4e1b630365e21e5e991c48d864fdd0 | db26ae1aa309f0659fab6f2c9275e646faecbe19 | refs/heads/master | 2020-12-15T08:45:31.190869 | 2020-01-23T10:46:25 | 2020-01-23T10:46:25 | 235,050,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | Edabitchallenge1.py | def equalvalues(a, b, c):
if a == b and a == c:
return 3
elif a == b or a == c:
return 2
else:
return 0
print(equalvalues(2, 4, 2)) |
5442231ae4aa7682b47eb5cdc3177bb20f808071 | ee48415b372754b3fb82c490abdf25f5b92d2aa0 | /python/flaskpgms/app.py | 11778f880dddf095cd46c428c3a4e212cd4313de | [] | no_license | anushaanand9946/anu | 07b0a1fa5bce1beb12ae8f3239d1dd6a764d9e4a | 27edbed2ff4648087670ed9acfe3ad90af491e15 | refs/heads/master | 2020-04-05T02:59:11.954153 | 2018-11-14T04:47:56 | 2018-11-14T04:47:56 | 156,497,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | app.py | from flask import Flask,render_template, request
app=Flask(__name__)
@app.route('/')
def index():
return render_template('home.html')
@app.route('/home')
def home():
return 'haiii'
@app.route('/about')
def about():
return render_template('about.html')
@app.route('/contact')
def contact():
return render_... |
2762b7c7ddf2050a899a1e6ba66587a83af2442b | 61bd834392557e4089e57c5e7c2dd05478091c67 | /lab1/team7_lab1.py | 0d4a1448a8ba6767ffd083a9c03dae450f7f954d | [] | no_license | goodahn/cs311_ComputerOrganization | b3da6b00235a007cb74ab2f94a057b1a24a253ae | 7cd598d0082c0424346e93ac927034340dc28c51 | refs/heads/master | 2021-01-10T10:53:56.225720 | 2015-12-28T12:20:05 | 2015-12-28T12:20:05 | 46,477,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,943 | py | team7_lab1.py | import sys
import struct
data_size=0
text_size=0
data_index=0
text_index=0
data_list=[]
text_list=[]
all_list=[]
label_list={}
def _bin(n,l):
return ''.join(str(1&n>>i) for i in range(l)[::-1])
def get_size():
global data_index
global text_index
global data_size
global text_size
... |
e5275e701147f83010d14a1a22b00a6530ea7f9d | eff5cd0056e4fce118e655c18e9f951cda7fba13 | /Computação para físicos Disciplina/Ep4/ep4fiscomp.py | 0a019f4d5051ec71d94eb67f6f072eb0b0158a08 | [] | no_license | erikkaueusp/Python-scripts | e4db7e1c45349484dc410ce00d5f0cde533f0f42 | d2f9c891731c113177a9305e2d920714a2a0e76e | refs/heads/main | 2023-02-12T14:20:29.539784 | 2020-12-31T05:53:02 | 2020-12-31T05:53:02 | 325,723,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 643 | py | ep4fiscomp.py | from numpy import tan,sqrt,arange,diff,nan
from matplotlib.pyplot import *
m = 9.1094e-31
h = 1.05457168e-34
w = (1e-9)
def pot1(E):
return tan(sqrt((w**2*m*E*1.6022e-19)/(2*h**2)))
def pot2(E):
v = 40
return -sqrt(E/(v-E))
def pot3(E):
v = 40
return sqrt((v-E)/E)
dx = 0.001
E = arange... |
4949dc43c69c2d159154b2e307af0ce379ac5353 | f14ec4e2a41863a7311e4fcbd4778101c350ecc4 | /pythonscript/merge_gitlab_branch/merge_branch.py | e9560e737a9bb3d4a65d3ad0e28638a15b9fa037 | [] | no_license | x903/script | d032553fbf3845efddad61aabdd8059ac6b954d3 | 1535bf97feb85d4294574e5a3c567c7e14a1d5da | refs/heads/master | 2022-11-26T10:43:44.075667 | 2020-07-24T06:31:40 | 2020-07-24T06:31:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,248 | py | merge_branch.py | # -*- coding: utf-8 -*-
import sys,getopt
import gitlab
gl = gitlab.Gitlab('https://gitlabaddress', private_token='xxxxxx',api_version='3')
try:
options,args = getopt.getopt(sys.argv[1:],"hp:d:",["merge","newrelease","src=","dst=","repo="])
except getopt.GetoptError:
sys.exit()
# collect parameters and conv... |
7cf91fb20ba8cb8006edc66ced611cdd97583628 | b3ba79d711998f9efe4e28a82fa5a1a4c1136666 | /legends/apps/appearance/migrations/0002_auto_20210820_0637.py | 41b2d0c7d9e46e0f6e6906c2b8d65c6beecba63e | [] | no_license | megamott/RL2-legends | 28ac58a87c81a2e64ba47fea5874cdfef2619258 | ae78489eee910b3cd8a163b507a97a23280588a0 | refs/heads/master | 2023-07-15T11:23:12.236594 | 2021-08-26T09:08:44 | 2021-08-26T09:08:44 | 395,644,354 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,909 | py | 0002_auto_20210820_0637.py | # Generated by Django 3.2.6 on 2021-08-20 06:37
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('appearance', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='question',... |
31201c9babe26e724f2c436809e07aec50c02c98 | 508b95fefb50203d49f0b0a6d4636fa3728dd91e | /setup.py | 00064674100b3b36fc228175910449570c584c04 | [] | no_license | eezhal92/dorar-python | 2dbd4ac7ecd268849c01bc0590bd4a0e53fc18f7 | f311be25b77c52b1950da0fa8333539a9f481260 | refs/heads/master | 2021-01-24T21:26:51.336465 | 2015-09-09T15:14:59 | 2015-09-09T15:14:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | setup.py | from setuptools import setup
setup(name='dorar',
version='1.1',
description='Search Hadith Module ',
url='https://github.com/ihfazhillah/dorar-python.git',
author='IbnuAmin',
author_email='mihfazhillah@gmail.com',
license='GNU2',
packages=['dorar'],
scripts=['bin/dorar-c... |
3fc3cd55b7e103dead7142e175ad481b27b51f6c | f0f4eef5a57807960070a1989799def6deaf30ef | /bclearer_boson_1_2_source/b_code/configurations/getters/boson_1_2_2e_g_configuration_getter_objects_to_classes.py | 2da76e0c9eeec2b48081f126e10bbdbcffde7666 | [
"MIT"
] | permissive | boro-alpha/bclearer_boson_1_2 | 4f8dd72b79e0ccdd759271d79e3cbfa61a949ac6 | 571b2e1ca6dee93ccc5cb4e30abe2660f40c2ac0 | refs/heads/master | 2023-08-23T05:02:30.384138 | 2021-11-04T11:24:35 | 2021-11-04T11:24:35 | 424,218,650 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | boson_1_2_2e_g_configuration_getter_objects_to_classes.py | from bclearer_source.b_code.common_knowledge.convention_shift_operation_types import ConventionShiftOperationTypes
from bclearer_source.b_code.configurations.convention_shift_operation_configurations import ConventionShiftOperationConfigurations
def get_boson_1_2_2e_g1_configuration_objects_to_classes() \
-> ... |
cd005e5ca1df76c1fce50bc1839360b84bfe5938 | 732a222cbf84c0d04babe833d08bdc0cf3e174f5 | /todo/urls.py | 4febcce195728d7da9b5f7d907958cfef5f34c38 | [] | no_license | Jonwodi/TODO-DJANGO-PROJECT | 51efcc9367e67366c4201f76b8a1fee437b88083 | 348862f1c83246c2c5d4b572d2be013654963911 | refs/heads/main | 2023-09-05T18:19:56.126107 | 2021-11-20T15:39:24 | 2021-11-20T15:39:24 | 427,151,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | urls.py | from django.urls import path
from .views import delete_todo, list_todo, new_todo, update_todo
app_name = "todo"
urlpatterns = [
path("", list_todo, name="list-todo"),
path("new-todo", new_todo, name="new-todo"),
path("update-todo/<int:pk>", update_todo, name="update-todo"),
path("delete-todo/<int:pk>... |
e8237cde03ae2b0dd911555b921db6b84c393304 | f42e931e7026a1b9365f70366068e50459effb85 | /memonkey/views.py | d716a9d90abe890489467b2710c78cedbca1f881 | [] | no_license | andrey-k/blog | af91cac700c3985031d9c411a0be5b172f0b20fd | 40c039503f65edf3e7d766f58f38ebf82d13fbea | refs/heads/master | 2021-01-17T06:00:50.798710 | 2013-10-25T18:39:18 | 2013-10-25T18:39:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,010 | py | views.py | from datetime import datetime
from flask import render_template, flash, redirect
from flask import session, url_for, request, g, jsonify
from flask.ext.login import login_user, logout_user, current_user, login_required
from memonkey import app, db, lm, oid
from config import POSTS_PER_PAGE, MAX_SEARCH_RESULTS
from m... |
343b73dfc539198eb6410f7b3e6f83868c778473 | 725ca15c566adc4d78a02cbf76072132988be6d3 | /1.wiadomosci.py | 47dc223e345e869cd40c9d262bad4d139a004993 | [] | no_license | lukasz741/WIADOMOSCI_CZY_GOTOWE | f6c9e97318175cd250a6c2ef432df5ac58b6da82 | 0a31034a3892d02f1cbf67a8fba798bf2231203e | refs/heads/master | 2022-04-27T03:48:14.780345 | 2020-04-25T16:29:24 | 2020-04-25T16:29:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | 1.wiadomosci.py | x = open("1..txt", "r")
x.con = x.read().splitlines()
print(x.con)
print(x.con[0])
y = open("2..txt", "r")
y.con = y.read().splitlines()
z = open("3..txt", "r")
z.con = z.read().splitlines()
class user:
def __init__(self, name, surname, ready):
self.name = name
self.surname = surn... |
c58a442cb80ab3f542825ce177a00773df57ed70 | 2ad4a4a03d49d5c2d3d8ae8904b2bea935069daf | /testWordCounts.py | e3e25cc5f769d64c84bc3abce46b11a2f42d9999 | [] | no_license | rashikbhasin/NaturalLanguageProcessing | 4d93a7a107c8bab8019e864ab7d54facdda44c55 | 29a18d7ae432382eb88d96f5157f44a0021da1dd | refs/heads/master | 2020-04-18T04:10:03.464624 | 2019-03-27T17:41:15 | 2019-03-27T17:41:15 | 167,227,997 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,769 | py | testWordCounts.py | target1 = open('newProblemDataSetMarkedProcessed.txt', 'r')
target2 = open('newNotProblemDataSetMarkedProcessed.txt', 'r')
# target1 = open('newProblemDataSet.txt', 'r')
# target2 = open('newNoProblemDataSet.txt', 'r')
lines = target1.readlines()
target_problem1 = open('wordInProblemSet.txt', 'w')
i = 1
line_count = ... |
439e65d3350fc8e3d5eda4a7c5a5c8a1673b2499 | d2eab0ac4c3ce3bbb51ec963216dfa7c1ae03fa4 | /azure-mgmt-batchai/azure/mgmt/batchai/models/output_directory.py | 11310f296dfdcd132910058fa70cae86bebf1b7f | [
"MIT"
] | permissive | ajiangcn/azure-sdk-for-python | 93917a405eeec3b338dcc885bea5f588e436d943 | 6059e27f417e27107a9e070b4b85ad47da611b50 | refs/heads/master | 2021-07-07T07:05:14.369887 | 2017-10-04T17:38:05 | 2017-10-04T17:38:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,803 | py | output_directory.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
aaf746621812a2938afaa6e870bafeee4982751d | d05e8d2dc53e5226a47def22b74b404d91387c49 | /ourflow/global/settings/dev.py | 3e859b4b3fd18a9ab03320bccf92ddb1ecba1f39 | [] | no_license | SoinSoin/project-ourflow | 06fe934daed1a9ae592b11d85fcc0fa025bbb71c | 2fc453d36d6c6041db0e13634add199993c3b9e1 | refs/heads/master | 2022-04-26T19:30:31.687872 | 2019-10-31T21:52:28 | 2019-10-31T21:52:28 | 168,729,132 | 0 | 0 | null | 2022-04-22T22:36:30 | 2019-02-01T16:45:16 | Vue | UTF-8 | Python | false | false | 814 | py | dev.py | import os
from django.core.files.base import ContentFile
from django.core.files.storage import default_storage
from .base import *
ALLOWED_HOSTS = ['*']
CORS_ORIGIN_ALLOW_ALL = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ourflow_db',
... |
ffc7936145b7c873ec8d780d6ede353ca3f552ec | fe5f86faaec82f7f7706623d7c309a8d0820e387 | /estomagordo-python3/6a.py | ccc9afd848ff96e5c234c2a727c76d9515eaefce | [] | no_license | Dyr-El/advent_of_code_2017 | 01dac99cff9339d92360e89882aa5f1081e11c4f | 6f09b1c15cc1070a4b3cca951dcb50b33ee5361b | refs/heads/master | 2021-12-24T05:23:19.892898 | 2021-12-22T21:19:33 | 2021-12-22T21:19:33 | 112,791,062 | 1 | 0 | null | 2018-11-13T08:04:23 | 2017-12-01T22:00:31 | C++ | UTF-8 | Python | false | false | 763 | py | 6a.py | def largest_index(blocks):
i = 0
n = len(blocks)
largest = blocks[0]
for x in range(1, n):
if blocks[x] > largest:
largest = blocks[x]
i = x
return i
def redistribute(blocks):
n = len(blocks)
largest = largest_index(blocks)
amount = blocks[largest]
... |
76f3f09b54070954fe8529c33257b6c9081d8123 | 16773418a38a4fa8a0a3d5ee21e7a99ecf5e1104 | /Data_Process/file_inout.py | 1000d6b2290de194a34c5e5c4a74ed3a106f66fc | [] | no_license | ara-official/Warren_Buffett | 7fda37d9bdeaf597da3c481094631bcf26425899 | d731537e8b1f9ed69b1bd51d22d58dee6f4cf1b7 | refs/heads/master | 2021-07-21T15:32:45.213167 | 2021-01-31T14:30:47 | 2021-01-31T14:30:47 | 237,749,212 | 0 | 1 | null | 2021-01-31T14:30:48 | 2020-02-02T09:45:28 | Python | UTF-8 | Python | false | false | 628 | py | file_inout.py | import os
import sys
# print(sys.stdin.encoding)
dir = os.getcwd()
dir_split = dir.split('\\')
cur_dir_depth = 0 # TODO: (minsik.son) 이 값도 자동으로 넣도록 수정 필요함.
len = len(dir_split) - cur_dir_depth
root_dir = "\\".join(dir_split[0:len])
# print(dir_split)
# print(root_dir)
sys.path.append(root_dir)
def write_to_file(pat... |
839b6be7b061d4674a9602dc7f592069d3691510 | 74837368ece5c26474bce922d9a3f1c2d74e23f1 | /链表/leetcode160_相交链表.py | 07d7d7877031755417bf751b561f46deafd31cd8 | [] | no_license | houhailun/leetcode | 5a2e8a5a23b3a63f1a32a39b42bf195861292d70 | 1ca58b87e5edfa8db389f14e3a9105e92b4ae85f | refs/heads/master | 2021-06-11T08:17:45.506361 | 2021-03-30T02:22:24 | 2021-03-30T02:22:24 | 158,809,894 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,819 | py | leetcode160_相交链表.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
题目描述:编写一个程序,找到两个单链表相交的起始节点。
例如,下面的两个链表:
A: a1 → a2
↘
c1 → c2 → c3
↗
B: b1 → b2 → b3
在节点 c1 开始相交。
注意:
如果两个链表没有交点,返回 null.
在返回结果后,两个链表仍须保持原有的结构。
可假定整个链表结构中没有循环。
程序尽量满足 O(n) 时间复杂度,且仅用 O(1) 内存。
解题思路:... |
dd95a7d43bfb56fac54ac0531ec74e8ef387de37 | d96185ab8ce10ac212719d07be7d5112828296ea | /5/inod.py | 837780cbb84018f700c56ee5071cb00ad743fc98 | [] | no_license | ijazmaha/maha-ijaz | bebb2d3434b54b5c43ebc1f34a051eead48a9345 | c22f08bbb3b8f4316732203a35a8e1d6e0bcc403 | refs/heads/master | 2020-12-23T22:01:32.660031 | 2020-01-30T19:38:56 | 2020-01-30T19:38:56 | 237,289,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20 | py | inod.py | n = 9874
print (n-2) |