blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9dfd42487ccf8e73d4d4d17ab1e7e7ba183ef477 | 9a6323fd69286f2ddce8a755612fb235a4b85956 | /cruzdb/sequence.py | 30e04e8a8cfcd79bf5f6b0eedf6e1ed94650416c | [
"MIT"
] | permissive | lardenoije/cruzdb-1 | 44b544ede144e11462b33967c6ce63cf7a7cecb0 | 7858dc4da7c2574751ccace41b3a525c11e629dc | refs/heads/master | 2022-12-14T13:06:37.660233 | 2020-08-27T11:55:14 | 2020-08-27T11:55:14 | 289,082,044 | 0 | 0 | MIT | 2020-08-20T18:37:47 | 2020-08-20T18:37:45 | null | UTF-8 | Python | false | false | 782 | py | import urllib as U
__all__ = ('sequence', )
def _seq_from_xml(xml):
start = xml.find(">", xml.find("<DNA")) + 1
end = xml.rfind("</DNA>")
return xml[start:end].replace(' ', '').replace('\n', '').strip()
def sequence(db, chrom, start, end):
"""
return the sequence for a region using the UCSC DAS
... | [
"[email protected]"
] | |
549cb424af0757bf36fd12680c9129b25d719bc8 | 1a95cda55573a6836ac631bc6e16ec312e07759b | /server.py | 494512434222bc9a674e78746f4547874003cbfc | [] | no_license | olajowon/dormer-web | b021c01694f72b31b8fc498811ec54da99786daa | d7a06a7c2be5ca6d34bedff26fbf70cd9e969ae8 | refs/heads/master | 2023-03-13T10:43:04.280104 | 2021-03-11T08:39:23 | 2021-03-11T08:39:23 | 320,578,280 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,451 | py | # Created by zhouwang on 2020/11/13.
import os
import sys
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
VENV_DIR = os.path.join(PROJECT_DIR, 'venv')
def start():
print('#### start\n')
os.system(f'rm -rf {PROJECT_DIR}/static && \cp -rf {PROJECT_DIR}/ui/dist/static {PROJECT_DIR}/static')
os.sys... | [
"[email protected]"
] | |
e78a3b00445a74f43bada0cdbef0f2f5aeff4fcd | 9eb972f4623e6eb424238dd747ea0a480efd0e8a | /futura_ui/app/ui/dialogs/transfer_production.py | 012029c15e6f9aad783b6cb7d84ef193cf8d2005 | [
"BSD-3-Clause"
] | permissive | pjamesjoyce/futura | 727136dedeebed7fbf464612192f0472c31d1f6d | c0f129b4964f2b01a2853828b83d57ed53eabcb8 | refs/heads/master | 2023-04-13T02:09:03.476138 | 2023-03-16T10:32:50 | 2023-03-16T10:32:50 | 218,276,474 | 9 | 2 | BSD-3-Clause | 2020-01-15T10:05:07 | 2019-10-29T11:59:27 | Python | UTF-8 | Python | false | false | 1,163 | py | from PySide2 import QtWidgets, QtGui
from ..utils import load_ui_file
import os
class TransferProductionDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
super(TransferProductionDialog, self).__init__(parent)
ui_path = 'transfer_production.ui'
ui_path = os.path.join(os.path.dirn... | [
"[email protected]"
] | |
6d04867690361f9c47fb28ebc97f304c557ec557 | ff6248be9573caec94bea0fa2b1e4b6bf0aa682b | /output/StudentProblem/10.21.9.62/1/1569576134.py | 10eaa60b5f53e410b34cd127f6fbef1654f01b12 | [] | no_license | LennartElbe/codeEvo | 0e41b1a7705204e934ef71a5a28c047366c10f71 | e89b329bc9edd37d5d9986f07ca8a63d50686882 | refs/heads/master | 2020-12-21T17:28:25.150352 | 2020-03-26T10:22:35 | 2020-03-26T10:22:35 | 236,498,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,671 | py | ============================= test session starts ==============================
platform darwin -- Python 3.7.4, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /tmp
collected 0 items / 1 error
==================================== ERRORS ====================================
________________________ ERROR collecting te... | [
"[email protected]"
] | |
6f7c62cb236795bd7f112d1fae1ae534b8839097 | a7ea1fa36385301db3c8abdf2281916f09006a2a | /057.py | e1348e00e7c99c5286e46d67667aa931c9422298 | [] | no_license | sanand0/euler | a3995c155e32dd8415cf31a1558674f9f0f8e425 | 6ae583d94f968e27102fa5bb7216bb0645dcc42c | refs/heads/master | 2020-05-07T09:31:50.356639 | 2017-08-05T04:43:23 | 2017-08-05T04:43:23 | 1,225,954 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 887 | py | '''
It is possible to show that the square root of two can be expressed as an infinite continued fraction.
sqrt(2) = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...
By expanding this for the first four iterations, we get:
1 + 1/2 = 3/2 = 1.5
1 + 1/(2 + 1/2) = 7/5 = 1.4
1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.416... | [
"[email protected]"
] | |
5e7b99cc19ea8b6717e0e650adb3a97b3ef95fb0 | 6e932aa6ec9424ae0238c559112fdd0214c52be6 | /ffawp/ch03/9_excel_value_meets_condition_all_worksheets.py | 381e78707679567f29dfa8a3629e04d9d439b903 | [] | no_license | LingChenBill/python_first_introduce | d1c780dcd3653ef4cda39cc4a0c631a99071f088 | 32ff4a16fe10505fcb49e4762fc573f5f1c62167 | refs/heads/master | 2020-07-29T13:03:15.447728 | 2020-06-09T13:39:07 | 2020-06-09T13:39:07 | 209,813,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,202 | py | # Date:2020/5/25
# Author:Lingchen
# Mark: 要使用基础Python在所有工作表中筛选出销售额大于$2000.00的所有行
# python 9_excel_value_meets_condition_all_worksheets.py data/sales_2013.xlsx data/output/9_output.xlsx
import sys
from datetime import date
from xlrd import open_workbook, xldate_as_tuple
from xlwt import Workbook
input_file = sys... | [
"[email protected]"
] | |
807223eb8782e42786914cfe301694dc05950c8c | c47340ae6bcac6002961cc2c6d2fecb353c1e502 | /test/test_ctmvar_get_result_item.py | 468eb96cb02f551c4285294922b0852f7b500fd4 | [
"MIT"
] | permissive | rafaeldelrey/controlm_py | 6d9f56b8b6e72750f329d85b932ace6c41002cbd | ed1eb648d1d23e587321227217cbfcc5065535ab | refs/heads/main | 2023-04-23T09:01:32.024725 | 2021-05-19T00:25:53 | 2021-05-19T00:25:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 947 | py | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.115
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import con... | [
"[email protected]"
] | |
c0d47f8307c3798e6edc8b33f7c824987feb7e12 | c848015268e430b10f1bc39a2fd5a6f7a8cda44d | /bin/Compare_unique/Sum_unique.py | b751b593c4924b7a4001cba2afeabe8f2079e20b | [] | no_license | wangpanqiao/Transposition | 36b87d2f9032170112fce993f17454b6562bb108 | e102de63df2bcd5f7b41075a447eb937ee753832 | refs/heads/master | 2020-08-27T00:07:00.923134 | 2015-12-01T22:30:45 | 2015-12-01T22:30:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,987 | py | #!/opt/Python/2.7.3/bin/python
import sys
from collections import defaultdict
import numpy as np
import re
import os
import argparse
from Bio import SeqIO
def usage():
test="name"
message='''
python Sum_unique.py --input RIL275_RelocaTEi.CombinedGFF.characterized.unique_mPing.gff
'''
print message
de... | [
"[email protected]"
] | |
5c39feec3f3cde848840efa165bb4fa1ed38e075 | 4bc5f6cc69448d54a7d0fd3be19317613999ceb3 | /authentication-with-flask-login/app/forms.py | 05908ee49f2e2d0610662672ff5bbe608e021d63 | [] | no_license | ThiaguinhoLS/flask-repo | 9aee2b6ff7bf9d61001ee3e3cbea1478caf108cd | 81e68c85ee8a1560a33bbaf78cbcb581c351ebb9 | refs/heads/master | 2020-04-26T16:24:32.721289 | 2019-03-12T06:26:27 | 2019-03-12T06:26:27 | 173,677,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | # -*- coding: utf-8 -*-
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired, EqualTo
class RegisterForm(FlaskForm):
username = StringField("Username", validators=[DataRequired()])
password = PasswordField("Password", validator... | [
"[email protected]"
] | |
9f635f6fa32ef161386cd71ad13f0caeb9e69192 | 419d6346d722589ecff72a33f2431775f9bf3dfa | /sampleCode/sample8/cities.py | 8453e6fb5a1129f1be656645813d88e7dec5d11d | [] | no_license | wzmf038827/pythonFlask | dc414c37322ace036a1b9858ce5626a59dcbda4e | 216db3c846ecc7a49c7f3cc7d1b15d6d3be7905a | refs/heads/master | 2023-04-11T17:44:52.093854 | 2021-05-03T06:06:11 | 2021-05-03T06:06:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,123 | py | import os
import sqlite3
from flask_sqlalchemy import SQLAlchemy
from main import app
basePath = os.path.abspath(os.path.dirname(__file__))
cityPath = os.path.join(basePath, 'citys.db')
conn = sqlite3.connect(cityPath)
print('開啟資料庫成功')
c = conn.cursor()
cursor = c.execute("select * from city")
print(cursor.__class__... | [
"[email protected]"
] | |
a7c6313e7d96e4efb70302abea076553c2bc4427 | d9c1890cf137489fa24bf0419d565b1e1edbd2cd | /circus/web/server.py | 6d6a07d58bb2fade819c4a6daa5b3e13ab132590 | [
"MIT",
"Apache-2.0"
] | permissive | magopian/circus | 47f7b6fcab833eaec19af6e9822d769bc9dd5050 | e2eef7f008050c30e43d1a10d615dd920fb6583a | refs/heads/master | 2021-01-18T04:54:23.720743 | 2012-11-11T19:07:39 | 2012-11-11T19:07:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,207 | py | import socket
from bottle import ServerAdapter
class SocketIOServer(ServerAdapter):
def __init__(self, host='127.0.0.1', port=8080, **config):
super(SocketIOServer, self).__init__(host, port, **config)
self.fd = config.get('fd')
if self.fd is not None:
self.fd = int(self.fd)
... | [
"[email protected]"
] | |
4d952b651224199a592af47dc19fd9166eb94aa9 | 6e12c2e6d453ea1caf64c0eafaf3410b30f434e0 | /shop/migrations/0011_auto_20160607_1347.py | b6dc57869b17135e8c679bb3ac3d6d5cf83edca0 | [] | no_license | andreynovikov/django-shop | 43b66ec639037473cd72f7480f83811d911104fb | 8f843b0b15354903a335c324daa65714bfb2f8cc | refs/heads/master | 2023-04-28T01:26:16.938227 | 2023-04-22T15:33:29 | 2023-04-22T15:33:29 | 43,815,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('shop', '0010_manufacturer'),
]
operations = [
migrations.CreateModel(
name='Sup... | [
"[email protected]"
] | |
0c4bb10e987777fae9cc78ed90940998e95d1024 | 6805b5299355005536d7408a2092db5cdf7f78d3 | /utils/saver.py | 94ca9f01d939bba00e341c74d18af9c619879727 | [] | no_license | harisris/draw-mnist | 050609c9bcc3a1690836467179660af186d544a9 | 7cfaa76336714ec4c290d84243115b5184142768 | refs/heads/master | 2021-01-12T10:03:39.163704 | 2016-06-08T09:19:53 | 2016-06-08T09:19:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,863 | py | import cslab_environ
import fnmatch
import logger
import os
import yaml
import tensorflow as tf
kModelOptFilename = 'model_opt.yaml'
kDatasetOptFilename = 'dataset_opt.yaml'
kMaxToKeep = 2
class Saver():
def __init__(self, folder, model_opt=None, data_opt=None):
if not os.path.exists(folder):
... | [
"[email protected]"
] | |
aa00df2b260e6c6ab031c83ba1170fc89fa50eee | f6814281de06f6d6eff1cc9b40f9596274455ece | /segmentation/local_maxima.py | 7ba208efda2582ce2001beca2c44eabccf246bdb | [
"MIT"
] | permissive | file-campuran/scikit-image-clustering-scripts | 806ad366202f3054bf0f602e414c083428372177 | 2197f23b904463b358421bc8a8bd85a3cb4cc2f1 | refs/heads/master | 2022-10-07T23:17:18.814705 | 2020-06-02T18:00:37 | 2020-06-02T18:00:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | #!/usr/bin/env python
# http://stackoverflow.com/questions/9111711/get-coordinates-of-local-maxima-in-2d-array-above-certain-value
import numpy as np
from osgeo import gdal
import scipy.ndimage as ndimage
import scipy.ndimage.filters as filters
# initialize driver
driver = gdal.GetDriverByName('GTiff')
def write_imag... | [
"[email protected]"
] | |
6ba44a2283a1c3e70f0210af98521fbb9c634623 | 294c35259125e1c55cfdd5247cee651a07b3cc01 | /src/map/migrations/0001_initial.py | 52a0310446ae9821e95ec290c04c7762db920978 | [
"MIT"
] | permissive | andgein/sis-2016-winter-olymp | a82557d61b7748c6813e31779bcc74e92874a96c | 70962d861b3cf69e982949878ae4dccc2818b618 | refs/heads/master | 2021-08-30T15:00:10.691639 | 2017-12-18T11:05:27 | 2017-12-18T11:05:27 | 114,627,656 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,224 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-31 05:13
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import djchoices.choices
import relativefilepathfield.fields
class Migration(migrations.Migration... | [
"[email protected]"
] | |
02a32ea594f73011395598d554f22b7b5b9e2724 | d52a193fbcc4fda5dddef59c5bd691933c81fe0b | /isomaticAppWeb/preguntaDiez.py | 762c49090454dde7f39501730cea10e8dbf6c5c9 | [] | no_license | solprmat/solpromatcore | 69c299357bb6f307b2822d985692b06db6f4c73c | 56dabd4f0189831215578bec5a623e99aeea143f | refs/heads/master | 2022-12-10T16:56:46.629211 | 2019-11-09T20:58:08 | 2019-11-09T20:58:08 | 205,091,159 | 0 | 0 | null | 2022-12-08T06:05:07 | 2019-08-29T05:57:38 | Python | UTF-8 | Python | false | false | 412 | py | from django import forms
class PreguntanDiez(forms.Form):
RESPUESTA_PREGUNTA_DIEZ = (
('a', 'a. Ana'),
('b', 'b. Jana'),
)
respuesta = forms.TypedChoiceField(
# label='preubas',
choices=RESPUESTA_PREGUNTA_DIEZ,
widget=forms.RadioSelect(attrs={
'class':... | [
"[email protected]"
] | |
b5612e469ab15c7cfa726e1f6d7ef51c8a9253ec | fe4073028c22079c9908bba9d1f558256b3d3a73 | /app.py | d3eb02e6315a5462f6f5a86462442f07596f4069 | [] | no_license | romanannaev/BlogFlaskFinish | fb35c8fbe3a77753f0664641215cc44f4617b98f | 3aaecab0b1c3694aa584229963d7c521a301c33e | refs/heads/master | 2021-10-22T08:45:07.250060 | 2020-01-08T14:29:54 | 2020-01-08T14:29:54 | 231,746,001 | 0 | 0 | null | 2021-03-20T02:37:58 | 2020-01-04T10:37:40 | Python | UTF-8 | Python | false | false | 2,169 | py | import os
from flask import Flask, request
from flask_sqlalchemy import SQLAlchemy
#create admin
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
#flask security, the storage of users, roles
from flask_security import SQLAlchemyUserDatastore
from flask_security import Security
app = Flask(... | [
"[email protected]"
] | |
e34ddccd94638c82612a301dcb783977751ee558 | 685038d4be188fa72e9dba1d2213a47ee3aa00a2 | /ECOS2021/Demands/Inputs/Surveys/A/S4/Jul_S4_A.py | 39db06fef88624a9f7eead973c903d14f3b922fc | [] | no_license | CIE-UMSS/Tradeoff-between-Installed-Capacity-and-Unserved-Energy | e5599e4e4ac60b97f0c4c57c5de95e493b1b5ac4 | 459f31552e3ab57a2e52167ab82f8f48558e173c | refs/heads/master | 2023-06-01T18:09:29.839747 | 2021-06-19T15:56:26 | 2021-06-19T15:56:26 | 343,720,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,963 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 31 14:33:07 2020
@author: alejandrosoto
Script for 2 class of household in Raqaypampa.
"""
# -*- coding: utf-8 -*-
"""
@author: Alejandro Soto
"""
from core import User, np
User_list = []
#User classes definition
HI = User("high income",1)
Us... | [
"[email protected]"
] | |
e25e5edb0703725283c9e674fc6085ad431c3b52 | ed4587c16e0708f0b618d8703b0ea9e86f5c3237 | /Layers/HiddenLayer.py | c0b7f6809f033afd968f23563e71d82e0f8955df | [] | no_license | CaoDuyThanh/NN_Autoencoder | b85256e4c4a1a71072c876c45098606244966cf8 | 0a0fc8e23e39249c6562249cf538e3b5898037f5 | refs/heads/master | 2021-01-23T22:15:06.380045 | 2017-02-26T13:33:50 | 2017-02-26T13:33:50 | 83,121,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,858 | py | import theano
import numpy
import cPickle
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
class HiddenLayer:
def __init__(self,
rng, # Random seed
input, # Data input
numIn, #... | [
"[email protected]"
] | |
ea5aa679209b5f87452309f4ae5d2b6780c1cbc6 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5634697451274240_0/Python/elsw/revenge_pancakes.py | 5b7acca8e7d41f5d660ecf7e2208da6c469f5d79 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | #/usr/bin/env python
# Google Code Jam Qualification Round 2016
# B. Revenge of the Pancakes
# https://code.google.com/codejam/contest/6254486/dashboard#s=p1
def happy(stack):
s = stack + '+'
t = s[0]
c = 0
for p in s[1:]:
if p != t:
c += 1
t = p
return c
with open(... | [
"[email protected]"
] | |
9c53ab1aae60600743db9747d0c63fc33815b1d3 | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/0435-Non-overlapping-Intervals/0435.py | 7ead2f6d87451d06255ac7a691c7621aab8a49fb | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 533 | py | class Solution:
def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int:
intervals.sort(key=lambda x: x[0])
result, pre = 0, None
for cur in intervals:
if prev and prev[1] > cur[0]:
result += 1
if cur[1] < prev[1]:
p... | [
"[email protected]"
] | |
4a1a2aa093ea9f5082e68fb215190fec44f67e96 | b88ddf1bbc0e203b403584428078d73593715454 | /builder/igloo_director.py | ea3e87cb018003a80ebf063c557b4af64e4ccf29 | [] | no_license | keys4words/designPatterns | ef28289a92d68652f3d34a9a609aebe986e785bb | 0d6ebd5dc1f8c3be725f7405bb785436eec37a89 | refs/heads/main | 2023-04-15T01:15:27.231107 | 2021-04-20T13:31:25 | 2021-04-20T13:31:25 | 348,728,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | from house_builder import HouseBuilder
class IglooDirector:
"One of the Directors, that can build a complex representation."
@staticmethod
def construct():
return HouseBuilder().set_building_type("Igloo").set_wall_material("Ice").set_number_doors(1).get_result() | [
"[email protected]"
] | |
924e843bf762ca9d9e88f6d17f4e35920d84013f | 4bb6a8cbd7ac887ec4abc6abc97f0cb17415e82d | /Chapter 5 Strings/numbers2text.py | 7d27d3705f77296072ca8408e9a44d5c200e6e9c | [] | no_license | jbhennes/CSCI-220-Programming-1 | cdc9cab47b4a79dccabf014224a175674e9a7155 | ac9e85582eeb51a205981674ffdebe8a5b93a205 | refs/heads/master | 2021-01-01T03:54:50.723923 | 2016-05-02T16:06:55 | 2016-05-02T16:06:55 | 57,902,553 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | # numbers2text.py
# A program to convert a sequence of ASCII numbers into
# a string of text.
import string # include string library for the split function.
def main():
print "This program converts a sequence of ASCII numbers into"
print "the string of text that it represents."
print
... | [
"[email protected]"
] | |
832e473b8c911f7063df943d58fecbe31724ce10 | 2868a3f3bca36328b4fcff5cce92f8adeb25b033 | /+200ns/Ni_default/step1_dc/set.py | 23f82640e2dddefec72eb6201e99726773cd9099 | [] | no_license | linfranksong/TM-enzyme_input | 1c2a5e12e69c48febd5b5900aa00fe2339d42298 | 6e46a5b2c451efb93761707b77917a98ca0bfedc | refs/heads/master | 2022-03-19T19:49:09.373397 | 2019-12-04T00:11:59 | 2019-12-04T00:11:59 | 205,220,795 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,114 | py | import os
dir = os.path.dirname(os.path.realpath(__file__)) + '/'
for a in [150,200,250,300,350,400,450,500,550,600]:
#for a in [150]:
#for a in [200,250,300,350,400,450,500,550,600]:
os.system("rm -r %s_dc"%(a))
os.system("cp -r temp/ %s_dc"%(a))
adir=dir+ "%s_dc/"%(a)
os.chdir(adir)
os.system("sed -i 's/MM... | [
"[email protected]"
] | |
807bd4413ac24f6180b70539c7ef6c6621b7e9db | 372185cd159c37d436a2f2518d47b641c5ea6fa4 | /142. 环形链表 II.py | 83c889995bd0403eefdbd90103e6fe0fd1b3b7b1 | [] | no_license | lidongze6/leetcode- | 12022d1a5ecdb669d57274f1db152882f3053839 | 6135067193dbafc89e46c8588702d367489733bf | refs/heads/master | 2021-07-16T09:07:14.256430 | 2021-04-09T11:54:52 | 2021-04-09T11:54:52 | 245,404,304 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 758 | py | class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def detectCycle(self, head: ListNode) -> ListNode:
if head == None or head.next == None:
return None
fast = slow = head
temp = False # 记录是否有环
while fast.next and fa... | [
"[email protected]"
] | |
32fe88969c29acd42125c481d6f2bd756033c283 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02685/s529348276.py | 65a166ca77210af61f1ce19dd156965d2e9ccf58 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | mod=998244353
fact=[1]
for i in range(1,2*10**5+1): #mod上での階乗を求める
fact.append((fact[-1]*i)%mod)
revfact=[1]
for i in range(1,2*10**5+1): #mod上での階乗の逆元をフェルマーの小定理を用いて求める
revfact.append(pow(fact[i],mod-2,mod))
n,m,k=map(int,input().split())
ans=0
for i in range(k,-1,-1): #各m(N-K<=m<=N)について場合の数を求める
group=n-i
tmp=fact[n-... | [
"[email protected]"
] | |
156869ad9e5674ab69c9b1b1d37b2d2d4946460c | 7ae374f11cc2e9673fb2c39d00e942253418b41a | /connect_H351/telnet_H351.py | 199d5322ff7cbbf4f64dcf01e540e2edbee3d854 | [] | no_license | zeewii/H351 | 44c05acf0f814558f1fa8d8e2a9c942fee707985 | 80231ff0434a15835d6b484cbc498b2f963d048c | refs/heads/master | 2021-01-10T00:57:18.501664 | 2015-09-28T10:39:24 | 2015-09-28T10:39:24 | 43,277,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,360 | py | #coding=utf-8
#描述:本模块为通过使用pexpect模块登录telnet输入命令,并取出输入结果
#作者:曾祥卫
import datetime
import pexpect
#输入:user-登录名,ip-登录ip,password1-登录密码1,password2-登录密码2,command-输入命令
#输出:输入命令返回的结果
def telnet_command(user,ip,password1,password2,command):
try:
#远程主机登录后出现的字符串
finish = ":/#"
# 为telnet命令生成一个spawn类... | [
"[email protected]"
] | |
5131a9c888902430b3d4a3d54233d26783ca9679 | bf99b1b14e9ca1ad40645a7423f23ef32f4a62e6 | /AtCoder/abc/065d.py | 9fc11d2c49550f58cf2f400ec67dd7e78aefe5b5 | [] | no_license | y-oksaku/Competitive-Programming | 3f9c1953956d1d1dfbf46d5a87b56550ff3ab3db | a3ff52f538329bed034d3008e051f30442aaadae | refs/heads/master | 2021-06-11T16:14:12.635947 | 2021-05-04T08:18:35 | 2021-05-04T08:18:35 | 188,639,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,003 | py | import heapq
N = int(input())
cities = [0 for _ in range(N)]
for i in range(N):
x, y = map(int, input().split())
cities[i] = (i, x, y)
edges = [[] for _ in range(N)]
cities.sort(key=lambda A : A[1])
for i in range(N - 1):
a, xFrom, yFrom = cities[i]
b, xTo, yTo = cities[i + 1]
cost = min(abs(xFr... | [
"[email protected]"
] | |
1e1e14496a4ff4181136795e1206bfc147a0a3b7 | 75dcb56e318688499bdab789262839e7f58bd4f6 | /_algorithms_challenges/leetcode/LeetcodePythonProject/leetcode_0751_0800/LeetCode759_EmployeeFreeTime.py | ff1eb9feb5d31dc20ea349c46e94b43ceaedee09 | [] | no_license | syurskyi/Algorithms_and_Data_Structure | 9a1f358577e51e89c862d0f93f373b7f20ddd261 | 929dde1723fb2f54870c8a9badc80fc23e8400d3 | refs/heads/master | 2023-02-22T17:55:55.453535 | 2022-12-23T03:15:00 | 2022-12-23T03:15:00 | 226,243,987 | 4 | 1 | null | 2023-02-07T21:01:45 | 2019-12-06T04:14:10 | Jupyter Notebook | UTF-8 | Python | false | false | 1,595 | py | '''
Created on Mar 30, 2018
@author: tongq
'''
# Definition for an interval.
class Interval(object):
def __init__(self, s=0, e=0):
self.start = s
self.end = e
class Solution(object):
def employeeFreeTime(self, schedule):
"""
:type schedule: List[List[Interval]]
:rtype: ... | [
"[email protected]"
] | |
4e96486fda291297b6b7b7b5830180b891f7de07 | 54df8336b50e8f2d7dbe353f0bc51a2b3489095f | /Django/Django_Old/disa-py/member/admin.py | f571a992fa1e04afacdcd4fa42521d6044b42e0d | [] | no_license | SurendraKumarAratikatla/MyLenovolapCodes1 | 42d5bb7a14bfdf8d773ee60719380ee28ff4947a | 12c56200fcfd3e5229bfeec209fd03b5fc35b823 | refs/heads/master | 2023-06-17T15:44:18.312398 | 2021-07-19T10:28:11 | 2021-07-19T10:28:11 | 387,358,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,415 | py | from django.contrib import admin
# Register your models here.
from models import *
from django.contrib.admin import ModelAdmin
from django.db.models.fields import Field
from django.contrib.admin import SimpleListFilter
'''#from assign.disa-py.disa.admin_site import custom_admin_site
class country(SimpleListFilter):
... | [
"[email protected]"
] | |
1d2db470220c93818fef669f95833c53bfc67818 | 0dc9968c34f74f6ff15435104806956169d6c82a | /algorithm/compare_tripet.py | 519515ce23471f85179b0b6a1b0551eacbbf7458 | [] | no_license | tasnuvaleeya/hackerRank | 5ac0e5b089e8da83980b37b1dea45def20fe02e0 | 7259324ea0692ce36c494d9b8913eef8e2211aa9 | refs/heads/master | 2021-04-09T17:37:41.769210 | 2018-04-12T13:55:56 | 2018-04-12T13:55:56 | 125,638,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | import sys
def solve(a0, a1, a2, b0, b1, b2):
# Complete this function
a = (1 if a0 > b0 else 0) + (1 if a1 > b1 else 0) + (1 if a2 > b2 else 0)
b = (1 if b0 > a0 else 0) + (1 if b1 > a1 else 0) + (1 if b2 > a2 else 0)
return (a, b)
a0, a1, a2 = input().strip().split(' ')
a0, a1, a2 = [int(a0), int(a1... | [
"[email protected]"
] | |
b2b27bb05f6ee9fa684ab184aab98b2328e8fb80 | 16dcbf88ae9514109151fe5ff447b2b653ddf48b | /2016/012-polynom/polynom 2.py | 2847370b97cc567bdecda9cfbb8aa6c5054e1f08 | [] | no_license | ChristerNilsson/Lab | efa55ef5e79dff84b232dfcf94473eacdb263175 | b1f730f45ec6e901bd14c1e4196aa5e0f591ecd2 | refs/heads/master | 2023-07-06T04:35:09.458936 | 2023-06-24T21:40:54 | 2023-06-24T21:40:54 | 48,474,249 | 8 | 8 | null | 2022-12-10T07:03:31 | 2015-12-23T06:51:11 | JavaScript | UTF-8 | Python | false | false | 4,381 | py | # -*- coding: utf-8 -*-
from sympy import S
# Polynom 2: Lista 0,1,2,3,... Value, Add, Mul, Diff, Integrate, Prettyprint
# Objektorienterat
class Polynom(object):
def __init__(self, polynom):
self.polynom = polynom
def __call__(self, x):
return sum([factor * x ** exponent for exponent,facto... | [
"[email protected]"
] | |
456d1b7dcc9770fbbd73c74764f549079b035733 | 4fd56b22ba00072817904c45f6b18844034f58f0 | /projectapi/urls.py | 4bc4445e2366ca58c269085b94fa45c39e920dd6 | [
"MIT"
] | permissive | kelvinrono/projectApi | 0bf7a2766a5279ca4b27e8b3d55e352f7661f083 | 873ea90bff9ec1004d1f936d4fdcec47f95759c3 | refs/heads/master | 2023-06-19T16:04:26.886938 | 2021-07-20T20:47:40 | 2021-07-20T20:47:40 | 386,591,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | from django.contrib import admin
from django.urls import path,include
from django.contrib.auth import views
from django.conf import settings
from django.conf.urls.static import static
from django_registration.backends.one_step.views import RegistrationView
urlpatterns = [
path('admin/', admin.site.urls),
path(... | [
"[email protected]"
] | |
7d24cd93a7fba526abe473e1a5d4a570cd1114e6 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2741/60760/298464.py | 353a99580a2dc99629300bfe0b7b2f83c5ddb862 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | def func(arr: list):
length=len(arr)
l=length
while l>0:
for j in range(length+1-l):
temp=arr[j:j+l]
temp2=sorted(set(temp))
if temp==temp2:
return l
l=l-1
return 0
b = input()
arr = list(map(int, b[1:len(b)-1].split(',')))
p... | [
"[email protected]"
] | |
2308b0c04994fcc9e120f82195135253102e7f8a | eaa284e89ce848e7500d08cc16b40b6c465e6b5c | /cthaeh/app.py | 7efe62c7464f73d3379b74d3b80e4182bd7ca3a7 | [
"MIT"
] | permissive | pipermerriam/cthaeh | bfac951546977eeb078df9bffb5a07536f6772ee | a3f63b0522d940af37f485ccbeed07666adb465b | refs/heads/master | 2023-08-28T08:49:23.966610 | 2020-04-28T18:17:02 | 2020-04-28T18:17:02 | 259,418,354 | 0 | 0 | MIT | 2020-04-27T18:30:54 | 2020-04-27T18:30:53 | null | UTF-8 | Python | false | false | 2,077 | py | import logging
import pathlib
from typing import Optional
from async_service import Service
from eth_typing import BlockNumber
from sqlalchemy import orm
import trio
from web3 import Web3
from cthaeh.exfiltration import Exfiltrator
from cthaeh.ir import Block as BlockIR
from cthaeh.loader import BlockLoader
from ctha... | [
"[email protected]"
] | |
e511daa839d5f5ec938a1828c6f4e1d08361e541 | 3f7c27ccd0ab1fcbd2583cf4b764b81bd27dd718 | /apps/members/migrations/0003_auto__add_field_member_address__add_field_member_city__add_field_membe.py | bfad4ac11b208f53dc018a2f15b4d2636362d119 | [] | no_license | adamtlord/foreverland | 001ca1a91a3cc468405efb80fe7981e75b82021c | 8206ddeeb8cfbd2752ef6fa9839424718cb96e07 | refs/heads/master | 2020-04-16T00:50:51.582008 | 2016-09-21T03:27:39 | 2016-09-21T03:27:39 | 11,668,672 | 0 | 0 | null | 2016-09-04T03:46:51 | 2013-07-25T19:05:55 | Python | UTF-8 | Python | false | false | 7,747 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Member.address'
db.add_column(u'members_member', 'address',
self.gf('d... | [
"[email protected]"
] | |
8a69b3abdbe989e9632031a056e21efcc892c649 | c15a28ae62eb94dbf3ed13e2065195e572a9988e | /Cook book/src/9/preserving_function_metadata_when_writing_decorators/example.py | e5e1850554e8f722b7368d301f04da5a8473d8a1 | [] | no_license | xuyuchends1/python | 10798c92840a1a59d50f5dc5738b2881e65f7865 | 545d950a3d2fee799902658e8133e3692939496b | refs/heads/master | 2021-01-25T07:07:04.812140 | 2020-02-28T09:25:15 | 2020-02-28T09:25:15 | 93,647,064 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | import time
from functools import wraps
def timethis(func):
'''
Decorator that reports the execution time.
'''
@wraps(func)
def wrapper(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
end = time.time()
print(func.__name__, end - start)
... | [
"[email protected]"
] | |
b1b37aea147f4eae935359ca21d61807d97cf417 | bbb8d941d0aa439ca435e0f00ddbd7330ad2db79 | /cpp/cc1.py | ee3d587fa2a2f8a3948cee50ae517e7285bcf118 | [] | no_license | dimritium/Code | 7ca940124074d7f7bca28559e0fe2f3cba24f846 | e6678b3dabe21fcd05e362bb8115f7812ad9abb8 | refs/heads/master | 2021-07-25T06:35:22.755474 | 2017-11-04T15:07:50 | 2017-11-04T15:07:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | t = int(input())
for i in range(t):
s = str(input())
dic = {}
for i in range(len(s)):
try:
dic[s[i]].append(i)
except:
dic[s[i]] = [i]
for k,v in dic.items():
flag = 0
if len(dic[k])>1:
if dic[k][-1]!=len(s)-1:
dic[... | [
"[email protected]"
] | |
19449a8c3d7391986351f441cf5c2b743a3dbcb2 | 2c143ba64032f65c7f7bf1cbd567a1dcf13d5bb1 | /腾讯/回溯算法/022括号生成.py | c5dd0dd441e7531fdd68cfbbe845ec6452796fcd | [] | no_license | tx991020/MyLeetcode | 5b6121d32260fb30b12cc8146e44e6c6da03ad89 | cfe4f087dfeb258caebbc29fc366570ac170a68c | refs/heads/master | 2020-04-09T21:43:41.403553 | 2019-03-27T18:54:35 | 2019-03-27T18:54:35 | 160,611,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,960 | py | '''
给出 n 代表生成括号的对数,请你写出一个函数,使其能够生成所有可能的并且有效的括号组合。
例如,给出 n = 3,生成结果为:
[
"((()))",
"(()())",
"(())()",
"()(())",
"()()()"
]
'''
'''
class Solution:
def generateParenthesis(self, n):
"""
:type n: int
:rtype: List[str]
"""
self.res = []
self.singleStr('', 0,... | [
"[email protected]"
] | |
bf5cc25038b36bbd8db9b85a2521712b8946591a | 2775947a01c2b10671737eae47725435957890a5 | /to-be-implemented/vstruct/win32.py | 908eb8ab7618a154c12ecf06dbb1a4dddd3235df | [] | no_license | albertz/pydbattach | 7b4bd4b7b22ec3c0aa82b45ba29674d3c852a9a4 | bbcc187627fc80ae4bd6fc98eefe41316f722a91 | refs/heads/master | 2022-10-25T12:34:05.045449 | 2022-10-11T14:53:18 | 2022-10-11T14:53:18 | 1,798,590 | 79 | 10 | null | 2022-02-09T12:43:01 | 2011-05-25T11:52:27 | Python | UTF-8 | Python | false | false | 7,453 | py |
from vstruct.primitives import *
from vstruct import VStruct,VArray
DWORD = v_uint32
class NT_TIB(VStruct):
_fields_ = [
("ExceptionList", v_ptr), # ExceptionRegistration structures.
("StackBase", v_ptr),
("StackLimit", v_ptr),
("SubSystemTib", v_ptr),
("FiberData", v_ptr)... | [
"[email protected]"
] | |
4d4d51aa814dfd29d50290261d6d9ce681a302e8 | d2c4151eff768af64946ababc2e41c13d8973cd3 | /ARC105/a.py | f9f21d8dd457a05c96bd9eb45c5f8bcd344e63e9 | [] | no_license | Intel-out-side/AtCoder | 2de19b71981247135432aed2d6d9c2a16c3ab7f0 | 0c419d2df15fff02032432cb1b1323612484e16e | refs/heads/master | 2022-06-23T04:21:12.886072 | 2022-06-13T14:39:07 | 2022-06-13T14:39:07 | 235,240,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | import math
N = int(input())
for a in range(1, 100):
tmp = N - 3**a
if tmp < 5:
print(-1)
exit()
for b in range(1, 100):
if 5**b == tmp:
print(a, b)
exit()
print(-1)
| [
"[email protected]"
] | |
bb5260b71015d345a88ae42ed0488418d428fac1 | 1f3bed0bb480a7d163dab73f1d315741ecbc1072 | /vtkplotter_examples/other/trimesh/section.py | 5dbcbdb40fe1f58a43833bc7fec62a29fa4cd2b8 | [
"MIT"
] | permissive | ismarou/vtkplotter-examples | 1ce78197182da7496b016b27f1d5eb524c49cac6 | 1eefcc026be169ab7a77a5bce6dec8044c33b554 | refs/heads/master | 2021-03-11T18:43:22.313457 | 2020-03-03T22:11:25 | 2020-03-03T22:11:25 | 246,551,341 | 4 | 0 | null | 2020-03-11T11:18:48 | 2020-03-11T11:18:47 | null | UTF-8 | Python | false | false | 1,721 | py | import trimesh
import numpy as np
from vtkplotter import show, Plane, Text2D, printc, download
# load the mesh from filename, file objects are also supported
f = download('https://github.com/mikedh/trimesh/raw/master/models/featuretype.STL')
mesh = trimesh.load_mesh(f)
# get a single cross section of the mesh
txt = T... | [
"[email protected]"
] | |
3dc9519fbdd363764163d3eefaebd7907a2214a1 | ac0957824d2730170603b6af26e38177965208a6 | /build/beginner_tutorials/catkin_generated/pkg.develspace.context.pc.py | fc1d02a638249646cd9aab97cb2ef6c8c924b854 | [] | no_license | JelenaKiblik/jekibl-rtech | 6c9c0ee78e4a2bf539ecac9f050110e96551171f | a3b4ef8bdfaba64a1209d695db78b6b7d7074c19 | refs/heads/master | 2020-08-01T06:29:20.727647 | 2019-11-17T10:38:14 | 2019-11-17T10:38:14 | 210,897,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/ubuntu/jekibl-rtech/devel/include".split(';') if "/home/ubuntu/jekibl-rtech/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(... | [
"[email protected]"
] | |
9b4cee01a7a4aad6bd4aa41ff11599feddafe8b0 | 14b5679d88afa782dc5d6b35878ab043089a060a | /students/LvTao/20200515/测试鼠标是否移动.py | 317ea2ada7e5968f4d2f40aad82bbbc2832c59da | [] | no_license | mutiangua/EIS2020 | c541ef32623f67f9277945cd39cff3c02f06e4dd | 92aa2711b763a2c93be238825c445bf2db8da391 | refs/heads/master | 2022-11-18T05:21:47.567342 | 2020-07-11T10:11:21 | 2020-07-11T10:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | import time
import pyautogui
def pos():
pos_mouse=pyautogui.position()
time.sleep(1)
return pos_mouse
while True:
if pos()==pyautogui.position():
continue
else:
x,y=pyautogui.position()
print('当前位置X{},Y{}'.format(x,y))
| [
"[email protected]"
] | |
74c590dee70d866754a3bfddb67a69646b5796c8 | 7837961d07a64aa1f73d88ed1012ec5e322ab370 | /src/generative_playground/molecules/lean_settings.py | 5af24245d63c36b4de49a57e16e9310343c74414 | [
"MIT"
] | permissive | markharley/generative_playground | 1281f13cc28c43ede9695e3ffa98713e613023d4 | 56e826e5ca453ee19b0d4298ed27b4db5efd6fd9 | refs/heads/master | 2020-05-18T09:50:27.820273 | 2019-05-05T12:03:26 | 2019-05-05T12:03:26 | 184,337,386 | 0 | 0 | null | 2019-04-30T22:01:43 | 2019-04-30T22:01:42 | null | UTF-8 | Python | false | false | 386 | py | import inspect
import os
molecules_root_location = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + '/'
def get_data_location(molecules=True):
if molecules:
return {'source_data': molecules_root_location + 'data/250k_rndm_zinc_drugs_clean.smi'}
else:
return {'source... | [
"[email protected]"
] | |
98cc0764581e92078db33632b9a8330ad97806de | 51d7e8c09793b50d45731bd5ab9b531b525cf6db | /tests/garage/torch/algos/test_maml_ppo.py | ea4ac63fd8c01d020ad7379470f45d65de0217bd | [
"MIT"
] | permissive | fangqyi/garage | 454247849a6a3f547557b3fac3787ba9eeb0391f | ddafba385ef005f46f913ab352f9638760e5b412 | refs/heads/master | 2023-02-25T00:43:18.903328 | 2021-01-26T01:52:15 | 2021-01-26T01:52:15 | 267,667,220 | 0 | 0 | MIT | 2020-05-28T18:35:08 | 2020-05-28T18:35:07 | null | UTF-8 | Python | false | false | 2,582 | py | """This script is a test that fails when MAML-TRPO performance is too low."""
import pytest
try:
# pylint: disable=unused-import
import mujoco_py # noqa: F401
except ImportError:
pytest.skip('To use mujoco-based features, please install garage[mujoco].',
allow_module_level=True)
exc... | [
"[email protected]"
] | |
fac3f04df019414ae685c3823333bcb2f171d65d | 52381a4fc02e90ce1fcfffd8d9876d9e8f44c248 | /core/jobs/batch_jobs/email_deletion_jobs.py | 895c4067d3191f9ccbef1490e639ea0c12d09bab | [
"Apache-2.0"
] | permissive | ankita240796/oppia | 18aa1609a0f237ce76142b2a0d3169e830e5bcdd | ba4f072e494fd59df53fecc37e67cea7f9727234 | refs/heads/develop | 2022-07-11T01:11:53.136252 | 2022-06-30T08:55:49 | 2022-06-30T08:55:49 | 160,626,761 | 0 | 0 | Apache-2.0 | 2020-04-28T16:12:26 | 2018-12-06T06:02:18 | Python | UTF-8 | Python | false | false | 5,406 | py | # coding: utf-8
#
# Copyright 2021 The Oppia Authors. All Rights Reserved.
#
# 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 requi... | [
"[email protected]"
] | |
c5382963180478fd862fc67e67e37e67fa689e13 | f829d2c4347ce85ae6dd769f0aab2491d8ee4751 | /old/.history/a_20201125194051.py | f79c3e45da0a2e2a0076008652c3fd3694e249f9 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"MulanPSL-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | pscly/bisai1 | 0ef18d4aa12541322947a5be250ef7f260c93276 | 257c02c8f23e373834a6275683470f3f081b7373 | refs/heads/18ti | 2023-01-21T22:02:15.582281 | 2020-11-29T09:30:33 | 2020-11-29T09:30:33 | 316,918,262 | 0 | 0 | NOASSERTION | 2020-11-29T12:33:33 | 2020-11-29T09:39:21 | Python | UTF-8 | Python | false | false | 969 | py | # for n in range(400,500):
# i = n // 100
# j = n // 10 % 10
# k = n % 10
# if n == i ** 3 + j ** 3 + k ** 3:
# print(n)
# 第一道题(16)
# input("请输入(第一次):")
# s1 = input("请输入(第二次):")
# l1 = s1.split(' ')
# l2 = []
# for i in l1:
# if i.isdigit():
# l2.append(int(i))
# for i in l2:
# ... | [
"[email protected]"
] | |
0a64700b1408521e4cb652493afa4c3773da70d3 | fde90006ac56f38863ebbff75fe0da7296d8d4b6 | /src/cfehome/old_settings.py | c58c730fb22a082126c92754a918c204c7235049 | [] | no_license | carter3689/django-intro | c1c32d742548e27732580d32321648f054d1338d | 155042398d9f2505e44dfa9cfe0a2f7ad3f8131d | refs/heads/master | 2021-01-01T04:32:49.347962 | 2017-07-14T04:57:02 | 2017-07-14T04:57:02 | 97,194,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,099 | py | """
Django settings for cfehome project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | [
"[email protected]"
] | |
8f779ae7bd790997e2a3fce3a42a64b70bbd7709 | 3047f66549c5928cf07bc14bd3ff276ce8458f22 | /config.py | bf1021d3b9f955d335b7c9d6608e18fcdcae53d8 | [] | no_license | 2429581027/spe2018 | b47faf01b5954552cbfe4caed32923663c716396 | 3649104935fc8b519450d6d12c78110a40f5aaec | refs/heads/master | 2022-12-06T17:12:08.324913 | 2020-08-09T16:34:07 | 2020-08-09T16:34:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,514 | py | '''
file: config.py
date: 2018_09_19
author: Junjie Cao
'''
import argparse
###################################
## shared parameters
parser = argparse.ArgumentParser(description = 'spe 2019, reconstruction from incompleted points')
#parser.add_argument('--data_root', type = str, default = '/data/sp... | [
"[email protected]"
] | |
5836ad6384982599fa5386c942f276b1fcbd7022 | 05fc3134da52ab0f1d95d9c4304bde68fc2a56cc | /tasks.py | a5661e372b313f07d146231967b867407d64dc2f | [
"AGPL-3.0-only"
] | permissive | lino-framework/extjs6 | b046d43bac3676afd2bbad825a8c478c2007471f | 6c8cf927e265bf23ad15d07da0b01c087c7bff07 | refs/heads/master | 2023-07-21T15:39:04.616082 | 2023-07-10T20:35:39 | 2023-07-10T20:35:39 | 46,885,420 | 6 | 1 | BSD-2-Clause | 2018-02-13T05:52:43 | 2015-11-25T20:40:26 | CSS | UTF-8 | Python | false | false | 448 | py | from atelier.invlib import setup_from_tasks
ns = setup_from_tasks(
globals(), "lino_extjs6",
languages="en de fr et".split(),
# tolerate_sphinx_warnings=True,
blogref_url = 'https://luc.lino-framework.org',
revision_control_system='git',
# locale_dir='lino_extjs/extjs/locale',
cleanable_file... | [
"[email protected]"
] | |
677352f08e920cb21713ec2f072334eb23f02ebb | a56e5570ab57e4d3c44c9c6ba44bdacac9fa1ad8 | /insertion_sort.py | 027c54743f008f5ce2dac82c48a2eeee27837080 | [] | no_license | teknofage/CS-2.1-Sorting_Algorithms | a7db54c29af5c939022d4dd6453a0529256a3bc1 | e42b64c4d606d76102b5930ae8e74822a75999ae | refs/heads/main | 2023-01-20T16:52:00.816333 | 2020-12-05T07:50:55 | 2020-12-05T07:50:55 | 308,201,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | def insertionSort(alist):
for i in range(1,len(alist)):
#element to be compared
current = alist[i]
#comparing the current element with the sorted portion and swapping
while i>0 and alist[i-1]>current:
alist[i] = alist[i-1]
i = i-1
alist[i] = cur... | [
"[email protected]"
] | |
61d67338da326c0b82ae9ef359f504ccba54da59 | ed298f7b16e0a1fcc4d5ddc9da324247d200bc8a | /cleanup.py | 03ca72d1bca9728c96256d120fb9e0c22c7a7d14 | [] | no_license | stella-gao/deepfunc | ed1a67f0a0e682a2e0d1fde05a13fe190ec6f07e | a587512519c234c7ab70eb3fd504a98cd935b4ab | refs/heads/master | 2021-01-21T00:11:48.502524 | 2016-04-28T17:18:44 | 2016-04-28T17:18:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,207 | py | #!/usr/bin/env python
'''
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python gen_next_level_data.py
'''
import numpy
from keras.models import Sequential
from keras.layers.core import (
Dense, Dropout, Activation, Flatten)
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layer... | [
"[email protected]"
] | |
f4277637101ca2452185a124b44a2047eef1c208 | b1931901a2599e170f4c0dbbecc1678ecd976904 | /Tools/Scripts/webkitpy/port/simulator_process.py | c1147b2bbf734a964fff63af7b4931702f8a1399 | [] | no_license | walmis/WPEWebKit-upstream | b75872f73073a2d58da0a9a51fc9aab891fb897d | 4b3a7b8cdd8afc12162fc2e0dcf474685e3fcf58 | refs/heads/master | 2023-03-10T11:19:26.173072 | 2017-03-22T09:28:59 | 2017-03-22T09:28:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,495 | py | # Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | [
"[email protected]@268f45cc-cd09-0410-ab3c-d52691b4dbfc"
] | [email protected]@268f45cc-cd09-0410-ab3c-d52691b4dbfc |
ab3168a7ed6a211db35ec3e6069861560ba39898 | 1986f044d6476fab476a9b5eb9a95cc30d6a8eac | /Chapter07/pygal_1.py | c30537be5d2fb85031674c73d8f2dbb96a6b3e07 | [
"MIT"
] | permissive | PacktPublishing/Mastering-Python-Networking | 711f47ecff9ca2fec51f948badff22cd8c73ada4 | 52a2827919db1773f66700f3946390f200bd6dab | refs/heads/master | 2023-02-08T01:39:44.670413 | 2023-01-30T09:03:30 | 2023-01-30T09:03:30 | 82,666,812 | 138 | 127 | MIT | 2020-11-05T11:34:15 | 2017-02-21T10:25:34 | Python | UTF-8 | Python | false | false | 865 | py | #!/usr/bin/env python3
import pygal
x_time = []
out_octets = []
out_packets = []
in_octets = []
in_packets = []
with open('results.txt', 'r') as f:
for line in f.readlines():
# eval(line) reads in each line as dictionary instead of string
line = eval(line)
x_time.append(line['Time'])
... | [
"[email protected]"
] | |
d616c9ac31f6b34ba0c1d64c0a527e44a5450332 | d41d18d3ea6edd2ec478b500386375a8693f1392 | /plotly/validators/layout/scene/zaxis/tickfont/_color.py | c9c85093d3ba20c31f8f2d30cc4ebd575af30377 | [
"MIT"
] | permissive | miladrux/plotly.py | 38921dd6618650d03be9891d6078e771ffccc99a | dbb79e43e2cc6c5762251537d24bad1dab930fff | refs/heads/master | 2020-03-27T01:46:57.497871 | 2018-08-20T22:37:38 | 2018-08-20T22:37:38 | 145,742,203 | 1 | 0 | MIT | 2018-08-22T17:37:07 | 2018-08-22T17:37:07 | null | UTF-8 | Python | false | false | 449 | py | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='color',
parent_name='layout.scene.zaxis.tickfont',
**kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_n... | [
"[email protected]"
] | |
287a191c2572037ada7b9ea37bd0ecbd1f5e4bc0 | 856e9a8afcb81ae66dd998b0d2cc3556c9f315ea | /tests/plugins/test_git_filters.py | 2a4efe5e20573ce2e090ef58b7c78ce98a865449 | [
"MIT"
] | permissive | dexy/dexy | 1d5c999830de4663c05a09f4cd00b1628dfc8d46 | 323c1806e51f75435e11d2265703e68f46c8aef3 | refs/heads/develop | 2023-06-10T08:02:45.076551 | 2021-02-28T22:40:41 | 2021-02-28T22:40:41 | 1,506,989 | 141 | 34 | MIT | 2020-06-15T17:44:50 | 2011-03-21T14:48:28 | Python | UTF-8 | Python | false | false | 3,046 | py | from dexy.exceptions import UserFeedback
from dexy.filters.git import repo_from_path
from dexy.filters.git import repo_from_url
from dexy.filters.git import generate_commit_info
from tests.utils import assert_in_output
from tests.utils import runfilter
from tests.utils import tempdir
from nose.exc import SkipTest
impor... | [
"[email protected]"
] | |
6cc1dc4c8e6b81d2106b35562acc5a9448a76b64 | fd7a9faee9e2a6dbf89e54e1a7f228fcaf6911e1 | /tests/test_cnocr.py | 68b2776100394422842303886c7a0172e6ee7cb5 | [
"NCSA",
"Zlib",
"Intel",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"BSD-2-Clause-Views",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | wting861006/cnocr | f685c607e7ba84a8ead5a6a72301768c832a6320 | 9cb1cd57c2795007850bd25616880b15e4a3029d | refs/heads/master | 2023-09-04T18:36:30.822721 | 2021-11-05T12:03:23 | 2021-11-05T12:03:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,410 | py | # coding: utf-8
# Copyright (C) 2021, [Breezedeus](https://github.com/breezedeus).
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this f... | [
"[email protected]"
] | |
24caadb1da40e28f0a1b19027c888aef7f29a004 | 8983b23a25fcc3739fc977850d242ebcc64434ce | /jqurity/urls.py | a1b034bb4034894993d2bac31814d1ce65d4a60f | [] | no_license | jakiiii/django-blog | 595d834c44c4b45817091da812b90b6fa7a34aab | 260aa75b89cd9875a2e0ab1e0f9588dffd8f5281 | refs/heads/master | 2020-03-29T19:53:57.752279 | 2018-09-25T15:39:21 | 2018-09-25T15:42:39 | 150,286,125 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,130 | py | """jqurity URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | [
"[email protected]"
] | |
384339a14d72cafb57e028d6b4112d06e5c27362 | 5774101105b47d78adb7a57eefdfa21502bbd70c | /project-follow/MadKing-master/assets/serializers.py | d39be9254ac56c2e85c54ce840290990ba81359f | [] | no_license | zhlthunder/python-study | 34d928f0ebbdcd5543ae0f41baaea955c92f5c56 | 0f25dd5105ba46791842d66babbe4c3a64819ee5 | refs/heads/master | 2023-01-12T18:39:47.184978 | 2018-10-07T23:48:04 | 2018-10-07T23:48:04 | 90,516,611 | 0 | 1 | null | 2022-12-26T19:46:22 | 2017-05-07T07:39:48 | HTML | UTF-8 | Python | false | false | 736 | py | #_*_coding:utf-8_*_
__author__ = 'jieli'
from assets.myauth import UserProfile
from assets import models
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = UserProfile
# fields = ('url', 'name', 'email')
fields = ('url',... | [
"[email protected]"
] | |
9b2cdeb86d06087f1f5fa0e0cfb88b8fab1f3579 | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /desktop/core/ext-py3/boto-2.49.0/bin/cwutil | 280d53f33edf02cafec34709b3684b22dfcc950c | [
"CC-BY-3.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"ZPL-2.0",
"Unlicense",
"LGPL-3.0-only",
"CC0-1.0",
"LicenseRef-scancode-other-permissive",
"CNRI-Python",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-or-later",
"Python-2.0",
"GPL-3.0... | permissive | cloudera/hue | b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908 | dccb9467675c67b9c3399fc76c5de6d31bfb8255 | refs/heads/master | 2023-08-31T06:49:25.724501 | 2023-08-28T20:45:00 | 2023-08-28T20:45:00 | 732,593 | 5,655 | 2,244 | Apache-2.0 | 2023-09-14T03:05:41 | 2010-06-21T19:46:51 | JavaScript | UTF-8 | Python | false | false | 5,046 | #!/usr/bin/env python
# Author: Chris Moyer <[email protected]>
# Description: CloudWatch Utility
# For listing stats, creating alarms, and managing
# other CloudWatch aspects
import boto
cw = boto.connect_cloudwatch()
from datetime import datetime, timedelta
def _parse_time(time_string):
"""Internal function ... | [
"[email protected]"
] | ||
82cdd53d1dcf9e33c62000824cbb3912abc74ad3 | 5f22ddbd3eeb99709e43e7b9a7958c9987c7efa4 | /interview_bits/level_2/02_binary_search/02_search_step_simulation/01_implement-power-function.py | 7f76f3870d716a1ce3475e367399e4163af05c04 | [] | no_license | salvador-dali/algorithms_general | 04950bd823fc354adc58a4f23b7d2f3d39664798 | aeee3356e2488c6fab08741b1ac26e8bd5e4ac0d | refs/heads/master | 2020-12-14T06:24:10.466601 | 2016-07-17T06:00:17 | 2016-07-17T06:00:17 | 47,397,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | # https://www.interviewbit.com/problems/implement-power-function/
def power(a, b, m):
if a == 0:
return 0
res, mul = 1, a % m
while b:
if b % 2:
res = (res * mul) % m
mul = (mul * mul) % m
b /= 2
return res | [
"[email protected]"
] | |
a48345655e91b63f5ae905da3ad7b8a15ef14273 | edcc0afdff7a7d01fa05664006d495627e9568e0 | /tests/snapshot/test_destroy.py | 420d09cd7da71f55fe79d6edcc08b8eaaf999984 | [] | no_license | b-a-t/zettarepl | 871538cc83e9e0ec3cf0c7f4a66bba21559127e4 | 6596fb85f31919edf8eadeee47552d14f3d62db3 | refs/heads/master | 2020-04-01T23:22:27.097027 | 2018-10-16T18:45:10 | 2018-10-16T18:45:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | # -*- coding=utf-8 -*-
from unittest.mock import call, Mock
from zettarepl.snapshot.destroy import destroy_snapshots
from zettarepl.snapshot.snapshot import Snapshot
def test__destroy_snapshots__works():
shell = Mock()
destroy_snapshots(shell, [Snapshot("data", "snap-1"), Snapshot("data/work", "snap-1"), Sn... | [
"[email protected]"
] | |
c922049e1d08e7a7dd1929f419415ed617b2dccc | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/171/41957/submittedfiles/testes.py | 16dd14c2d0278fb3b37bde0222232be8c114fd08 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | # -*- coding: utf-8 -*-
import math
#COMECE AQUI ABAIXO
a=float(input('digite a base:'))
b=float(input('digite o expoente:'))
cont=0
i=0
c=a**b
while i<cont:
c=a**b
cont=cont+1
print('%d'%c) | [
"[email protected]"
] | |
8203f8ceb30d5186a154e4b31d9a972deba8201b | 8b4d37632e0435fe5f78bf1631dd74766e8db411 | /xrandroll/xrandr.py | 96ceed2ae8f3e366d30c4851a91de8b1c339fe25 | [
"MIT"
] | permissive | RakhithJK/xrandroll | ca876c35fda3235b81362bce9ff6779759d810a5 | 7d294ea15a639d9b15a55c0bfc13161307425554 | refs/heads/master | 2022-04-07T03:13:53.816999 | 2020-02-07T12:55:02 | 2020-02-07T12:55:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,071 | py | """Read/Write system display state using xrandr."""
import subprocess
from .monitor import Monitor, _split_by_lines_matching
def is_replica_of(a, b):
"""Return True if monitor a is a replica of b.
Replica means same resolution and position.
"""
return (
a.pos_x == b.pos_x
and a.pos_... | [
"[email protected]"
] | |
3d1cde7505953c42c17da27c37c33aaa338acc32 | 8441f156e53afcc6c2b5190de2439c68eb40f218 | /python/nistoar/testing/__init__.py | d92c9b8c26da11199ab8542e66d9baff95a31408 | [] | no_license | usnistgov/oar-metadata | 99436a84d32d623d77310e75eee834c683ea1d5b | 2190bfc79d97f81d52dd24df0d4e9dc844065b67 | refs/heads/integration | 2023-07-08T16:06:23.258608 | 2023-04-22T21:00:09 | 2023-04-22T21:00:09 | 82,972,531 | 4 | 7 | null | 2023-06-30T18:27:38 | 2017-02-23T21:20:34 | Python | UTF-8 | Python | false | false | 5,200 | py | """
test infrastructure and utilities usable throughout the nistoar library
"""
# this code was copied from the testing infrastructure for ejsonschema
import os, shutil
__all__ = [
'ensure_tmpdir', 'tmpdir', 'rmtmpdir', 'Tempfiles', 'artifactdir'
]
tmpname = "_test"
def ensure_tmpdir(basedir=None, dirname=Non... | [
"[email protected]"
] | |
00588c59ef606ca06a81ac2cc3da8e2270175594 | 52e8dce655b89a260d049d34e74bc0cd3caf6f07 | /torchreid/__init__.py | 3403b86662515fb3072ca4ac7f8f659b96c4a42f | [
"MIT"
] | permissive | digitalbrain79/deep-person-reid | b527d0e8bd9a4a72209728c105fe5cd1773041dc | 0e7026be11dab7cb6991c43ea0b36765445507f9 | refs/heads/master | 2020-05-20T02:50:24.406708 | 2019-05-06T21:28:34 | 2019-05-06T21:28:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | from __future__ import absolute_import
from __future__ import print_function
__version__ = '0.7.4'
__author__ = 'Kaiyang Zhou'
__description__ = 'Deep learning person re-identification in PyTorch'
from torchreid import (
engine,
models,
losses,
metrics,
data,
optim,
utils
)
| [
"[email protected]"
] | |
dd72fcfd037b92916bb36a734e3754cf57ff6822 | dfaa71f8064d3d0773941cf14ab86ff57ff67284 | /part45/blog/models.py | d5edd654805cf32352512470306c70d8c055de71 | [
"Apache-2.0"
] | permissive | yllew36/WellyGI | e94c5000ff3a7f2fd7316d22ad166fbf7916ea23 | 7d53fac4c81bb994f61b22761e5ac7e48994ade4 | refs/heads/master | 2020-09-05T15:49:37.386078 | 2019-11-15T08:16:59 | 2019-11-15T08:16:59 | 220,148,061 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | from django.db import models
from django.utils.text import slugify
# Create your models here.
class ArtikelModel(models.Model):
judul = models.CharField(max_length=255)
isi = models.TextField()
penulis = models.CharField(max_length=255)
publish = models.DateTimeField(auto_now_add = True)
update = models.Da... | [
"[email protected]"
] | |
d5710045f064d84d667dfa28c760ba605ec4e832 | f1ee4b96f37419504576dc8b0d5b708bd5b9ba29 | /builder/main.py | 7a06353e59a01b076b8af1324a542b80ce572c60 | [] | no_license | OS-Q/P254 | 6d850efdd9da8a76d3cc2a4340c62cd8039dacdc | e3b542ec8020d280ab41ea5f2496b260e710f6d1 | refs/heads/master | 2023-04-19T11:03:23.733720 | 2021-05-04T03:48:12 | 2021-05-04T03:48:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,291 | py | # Copyright 2014-present PlatformIO <[email protected]>
#
# 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 applicabl... | [
"[email protected]"
] | |
b1877b2bf819138238459ec197dd6bdf01e9b712 | 3d2a74a859b0ea2a2f12315fd781154eae8449c5 | /LeetCode/min_size_suba_sum.py | 0b8ec9e1f641060914e8bb23000cbca0b64a88c5 | [] | no_license | jacobfelknor/practice_interview_questions | 1e929b0fdb4f816202f000de96b9f66fb119802b | 942f0ec730d7f0af650ddcee1abc5d17827c953c | refs/heads/master | 2021-11-22T07:27:25.986891 | 2021-11-09T02:12:13 | 2021-11-09T02:12:13 | 227,508,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | """
Given an array of n positive integers and a positive integer s,
find the minimal length of a contiguous subarray of which the sum ≥ s.
If there isn't one, return 0 instead.
>>> min_sub_array_length([2,3,1,2,4,3], 7)
2
"""
from typing import List
def min_sub_array_length(nums: List[int], nsum: int) -> int:
... | [
"[email protected]"
] | |
7a5222fd8eda27337c2d12c3e550a83aa9fa6281 | 231f8a898b20e475a5cabff439600de211d825c0 | /deploy_tools/fabfile.py | 33f3f66d5a1f450f1ea86a8eed1c19c182d68253 | [
"MIT"
] | permissive | thewchan/superlists | f7370b341ce7c37b8cae506eb5bafdd2fb31b07a | af41636b2cdafb45c638e36076b9cdefc5586aad | refs/heads/master | 2023-05-26T11:01:24.310480 | 2021-06-11T21:12:20 | 2021-06-11T21:12:20 | 361,209,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | true | false | 1,841 | py | """Fabric deployment configuration and script."""
import random
from fabric.contrib.files import append, exists
from fabric.api import cd, env, local, run
REPO_URL = "https://github.com/thewchan/superlists.git"
def deploy() -> None:
"""Deploy site to server."""
site_folder = f"/home/{env.user}/sites/{env.hos... | [
"[email protected]"
] | |
20437c1a84eb98ac587f50388c9768487f5ca702 | b26448cd43ac991c6277b588a1dcb6da53afe10a | /users/forms.py | 54880d817fdc01332a72a06f7e769d744f2d5c8f | [] | no_license | Xednom/e-wallet | 76da2658c34391c5d38e9d73ebce8f4ea80be87e | 97e83849296fa9678b6fdcb0737dfe09ee268a3f | refs/heads/master | 2023-01-29T04:27:51.833449 | 2019-10-16T07:34:25 | 2019-10-16T07:34:25 | 239,905,317 | 1 | 0 | null | 2023-01-04T14:20:08 | 2020-02-12T01:55:27 | Python | UTF-8 | Python | false | false | 763 | py | from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django_registration.forms import RegistrationForm
from .models import CustomUser
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm.Meta):
model = CustomUser
fields = (
... | [
"[email protected]"
] | |
485a56d5d4b5bbc4ce35a0d79cf74af9937dee85 | 64f365bf14a3c700ac3dab4a43a2bccd7ad0f222 | /setup.py | ea34a7eb8bee6edea5c9c57b41d1aaf016932e65 | [
"MIT"
] | permissive | russmain/leafmap | a4e8d081a5a3c973d2eb87616340dc44fd277fbd | 277edabfba56bfe133f507173e6005b5a7504234 | refs/heads/master | 2023-07-15T23:11:16.445456 | 2021-09-02T03:04:59 | 2021-09-02T03:04:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,729 | py | #!/usr/bin/env python
"""The setup script."""
import io
from os import path as op
from setuptools import setup, find_packages
with open("README.md") as readme_file:
readme = readme_file.read()
here = op.abspath(op.dirname(__file__))
# get the dependencies and installs
with io.open(op.join(here, "requirements.t... | [
"[email protected]"
] | |
1a480f0e4af30873cf5daa67189f7085fb570119 | ee561aa019a80f621007f82bdb21fe6ed8b6278f | /devel/ros_control-melodic-devel/hardware_interface/catkin_generated/pkg.develspace.context.pc.py | 0b881c3ecc6378010075a3d5b58fcdccc75ddd34 | [] | no_license | allanwhledu/agv_edu_prj | 4fb5fbf14cf0a14edd57ee9bd87903dc25d4d4f2 | 643a8a96ca7027529332f25208350de78c07e33d | refs/heads/master | 2020-09-23T23:32:54.430035 | 2019-12-04T07:47:55 | 2019-12-04T07:47:55 | 225,613,426 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/sjtuwhl/ROBOTLAB_WS/src/ros_control-melodic-devel/hardware_interface/include".split(';') if "/home/sjtuwhl/ROBOTLAB_WS/src/ros_control-melodic-devel/hardware_interface/include" != "" else []
PROJ... | [
"[email protected]"
] | |
2843225ad98b83b0dfefd872c82ee2088e5571c4 | 0b16b44e4fc8c98c9ea3f9d4b8b470f4f62f918d | /Core/migrations/0005_auto_20201105_0936.py | bedc07c9a234fd96f3fc7bd257cbcec57776181d | [] | no_license | AthifSaheer/DipakNiroula-Django-Ecom | 342eece90211fe80c41ba72bf69a50e63c5ea901 | 94ead608919c5bb076387e26f396e6c38319433e | refs/heads/main | 2023-02-05T06:52:24.204206 | 2020-12-24T13:19:13 | 2020-12-24T13:19:13 | 324,160,212 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | # Generated by Django 2.2.14 on 2020-11-05 04:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Core', '0004_auto_20201104_1147'),
]
operations = [
migrations.AlterField(
model_name='order',
name='payment_method... | [
"[email protected]"
] | |
0cb6d6ce63e06611b90c62a58cf84c65f89759e2 | 3c2b5fd20c7372fccb97fa76deb0980a173b5991 | /PythonFullStack/000Basic/day06/02-文件的读写.py | 0c155ffb3e9c6c9d76f6d864f0c9700496908cc1 | [] | no_license | softwarefaith/PythonFullStack | 560cdc2c0c38831e8304751b8b2bf680cb2f23e5 | 292cc0a5eee3ed8eb8a8d5e14673226533d2651e | refs/heads/master | 2021-05-15T09:57:37.812869 | 2019-02-21T10:37:41 | 2019-02-21T10:37:41 | 108,229,662 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,715 | py | #文件的访问模式:
#1.r:只读,文件不存在会崩溃
#2.w:只写
#3.a:追加写入
#4.rb:以二进制方式读取文件数据:常用
#5.wb:以二进制方式写入文件数据:常用
#6:ab:以二进制方式增加文件数据:常用
#爬视频,图片数据,文本数据,音频数据
# r+ w+ a+ 支持读写
#rb+ wb+ ab+ 支持二进制方式读写操作
#打开文件使用open函数
#------------r模式(只读)-----------
# 如果没有此文件会崩溃
# file = open("1.txt","r",encoding="utf-8")
# #读取文件中所有的数据
# content = file.read()
# ... | [
"[email protected]"
] | |
123a0cd3e2885c33639ca783c268bbee0e3fa695 | bc63598033c6ca4ac7f257897aec0b23eaff60d1 | /test/mitmproxy/test_proxy_config.py | e2c39846c7e7b8d19edbed878fb14cf9b84d42ad | [
"MIT"
] | permissive | Scalr/mitmproxy | 4aee723aef2f34fa1209364b5b03cedff7d3f85e | a6c608e08595e95279713e51e2a346344bd290c0 | refs/heads/master | 2020-06-27T08:52:29.441895 | 2016-11-23T00:27:23 | 2016-11-23T00:27:23 | 74,527,489 | 0 | 2 | MIT | 2018-05-03T00:00:18 | 2016-11-23T01:10:39 | Python | UTF-8 | Python | false | false | 726 | py | from mitmproxy.test import tutils
from mitmproxy.proxy import config
def test_parse_server_spec():
tutils.raises(
"Invalid server specification", config.parse_server_spec, ""
)
assert config.parse_server_spec("http://foo.com:88") == (
"http", ("foo.com", 88)
)
assert config.parse_s... | [
"[email protected]"
] | |
18c980d503bf6b4c69c1adfc9b18247782543587 | ac6e4102dfb49a4e49de0e2766feb6e80ab0b5c2 | /h1/models/storage_project_disk_update.py | db3461e12902a70bd45008c134567f0cb69ccd06 | [
"MIT"
] | permissive | hyperonecom/h1-client-python | df01f05ad295121e3dd391a3274c41e2f5b88e53 | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | refs/heads/master | 2023-04-05T01:51:31.637002 | 2021-03-29T00:05:41 | 2021-03-29T00:05:41 | 319,309,525 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,246 | py | # coding: utf-8
"""
HyperOne
HyperOne API # noqa: E501
The version of the OpenAPI document: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from h1.configuration import Configuration
class StorageProjectDiskUpdate(object):
"""NOTE: Th... | [
"[email protected]"
] | |
e3f94648f1b2d25797273b156ae51df153c72c27 | b90975e4d7acf7c9ad26ef5fc3e6247c95e2c540 | /installation_test.py | 73686a13ee12869e973416d273dd0707ec2ee9bb | [] | no_license | lfernandez55/tensorflow_pluralsight | 720de593a010d392d35b9da7263972148ec5076b | fc519c2154b90b40900df81fcdfd72f84d4eac22 | refs/heads/master | 2020-06-13T00:13:08.906189 | 2019-06-30T04:50:32 | 2019-06-30T04:50:32 | 194,470,020 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | import tensorflow as tf
sess = tf.Session()
#Verify we can print a string
hello = tf.constant("hello world from tensorflow")
print(sess.run(hello))
#Perform some simple math
a = tf.constant(20)
b = tf.constant(22)
print('a + b = {0}'.format(sess.run(a+b)))
| [
"[email protected]"
] | |
4be2e8189f05febeb17633e6c20fdd4ab01b805f | 268a6b7a1138dce434c6b7a54eb36cb4ae799ddd | /topo/custom/tests/test_delegate_forward.py | e01c1c60f6a5ea1c9407d803a176f66799f06906 | [
"BSD-2-Clause"
] | permissive | rubiruchi/fdeval | 2b0592853a684a8c5b87aeb363e4ccff61f47c0c | f6463c1c7549b8ac7fc39854e87c88d3cac858a0 | refs/heads/master | 2022-11-08T17:56:34.188225 | 2020-06-23T16:46:13 | 2020-06-23T16:46:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,656 | py | from topo.custom.topo import Topo
from . import testutil as testutil
import math
from core.engine import Engine
class TestEngine(Engine):
def on_EVSwitchStats(self, switch, ev):
#
es = self.ctx.topo.get_switch_by_label('ES')
if switch.label == 'DS':
if math.isclos... | [
"[email protected]"
] | |
593d31b488df95765e3a64530d9157de067998a2 | c8a38e65e71de888fc5b22fbd027bbaa0f3f6ef1 | /Python/142.py | 48db84b49b40e5429e83236336ce49f31599f810 | [] | no_license | skywhat/leetcode | e451a10cdab0026d884b8ed2b03e305b92a3ff0f | 6aaf58b1e1170a994affd6330d90b89aaaf582d9 | refs/heads/master | 2023-03-30T15:54:27.062372 | 2023-03-30T06:51:20 | 2023-03-30T06:51:20 | 90,644,891 | 82 | 27 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def detectCycle(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
slow = fast = head
while f... | [
"[email protected]"
] | |
417a9c86d6cf0e60446d13fbaa43104cd89c1a44 | b0f4b12ec6b14659b252f19776eb297366c9f330 | /代码/day3-5/A.FileDemo.py | 1bfc45d54864ee1dccb3618fe339ea82646998b0 | [] | no_license | vothin/code | a77259db4a3c4630bed293f979a49b676a1bd7c4 | d2b7819fd3687e0a011988fefab3e6fd70bb014a | refs/heads/master | 2020-08-31T15:48:28.155535 | 2020-01-09T08:21:57 | 2020-01-09T08:21:57 | 218,725,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,389 | py | '''
open
r 以只读方式打开文件。文件的指针将会放在文件的开头。这是默认模式。
rb 以二进制格式打开一个文件用于只读。文件指针将会放在文件的开头。这是默认模式。
r+ 打开一个文件用于读写。文件指针将会放在文件的开头。
rb+ 以二进制格式打开一个文件用于读写。文件指针将会放在文件的开头。
w 打开一个文件只用于写入。如果该文件已存在则打开文件,并从开头开始编辑,即原有内容会被删除。如果该文件不存在,创建新文件。
wb 以二进制格式打开一个文件只用于写入。如果该文件已存在则打开文件,并从开头开始编辑,即原有内容会被删除。如果该文件不存在,创建新文件。
w+ 打开一个文件用于读写。如果该文件已存在则打开文件,并从开头开始... | [
"[email protected]"
] | |
716cc2c81ec577e777a6a3cfc47ba680a6cadfc7 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_plectrums.py | 0d3dda010f944bbbef6409f78aeac191753a0607 | [
"MIT"
] | permissive | 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 | UTF-8 | Python | false | false | 252 | py |
from xai.brain.wordbase.nouns._plectrum import _PLECTRUM
#calss header
class _PLECTRUMS(_PLECTRUM, ):
def __init__(self,):
_PLECTRUM.__init__(self)
self.name = "PLECTRUMS"
self.specie = 'nouns'
self.basic = "plectrum"
self.jsondata = {}
| [
"[email protected]"
] | |
7815604a4051af01935361e7b7859ccd85e3e71b | ea393959886a5cd13da4539d634f2ca0bbcd06a2 | /283.py | b2b4f2cad4536764cd733094eaf98757b705c7b1 | [] | no_license | zhangchizju2012/LeetCode | f605f35b82f16282559af71e4e61ec2629a90ebc | 0c4c38849309124121b03cc0b4bf39071b5d1c8c | refs/heads/master | 2020-04-05T12:12:14.810639 | 2018-08-09T10:24:52 | 2018-08-09T10:24:52 | 81,021,830 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 14 00:24:22 2017
@author: zhangchi
"""
class Solution(object):
def moveZeroes(self, nums):
"""
:type nums: List[int]
:rtype: void Do not return anything, modify nums in-place instead.
"""
indexList = []
... | [
"[email protected]"
] | |
900bbc907bb10a759b672147517f8448c7ef5e21 | ef54d37f8a3303013ca7469871a320d303957ed7 | /robo4.2/fusion/tests/wpst_crm/feature_tests/C7000/Supershaw_TAA_FA_DA/validate.py | d1b1f709416576fdb725e7dd9fe4c24c42439338 | [] | no_license | richa92/Jenkin_Regression_Testing | d18badfcf16bda682dfe7bcbbd66f54a9a27a58d | 24a74926170cbdfafa47e972644e2fe5b627d8ff | refs/heads/master | 2020-07-12T10:01:59.099137 | 2019-08-27T12:14:53 | 2019-08-27T12:14:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py |
'''
This module contains the code to get the IP's of the
ethernet networks. Using the IP's it can login to the
server and execute the diskspd commands to start the traffic.
Diskspd results or ouput will be redirected to the log file
'''
import paramiko
import os
import time
import re
import threading
import Queue
... | [
"[email protected]"
] | |
7d0fa9b4b4f4b3082220c3ee9b07b146fdbbd204 | 9cbd088a0f7288acee3c1d736ef85e516b86d8fe | /twitter_tools.py | f3b7643e42816d3d937696a696eca0c0ddfeb875 | [] | no_license | fjccoin/twitbots | 91ba75a8123c9c21cf20d3e235075f5e7b0ebd5d | 513a6df705034aeb61b0d7ea2fccfe6c722160d9 | refs/heads/master | 2020-04-08T02:42:31.602419 | 2015-11-12T08:38:01 | 2015-11-12T08:38:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,719 | py | import nltk
from collections import OrderedDict, defaultdict
import re
import requests
from bs4 import BeautifulSoup
from urlparse import urlparse
SLEEP_COMMAND = ' go to sleep'
WAKE_COMMAND = ' wake up'
QUIET_COMMAND = ' no reply'
LOUD_COMMAND = ' reply on'
ADMIN_ID = 21455761
def filter_tweet(tweet, userid, botnam... | [
"[email protected]"
] | |
16f5f3e683d884969d7b2a96646d43ae6d346d91 | 91b2fb1fb6df216f2e365c3366bab66a567fc70d | /Week06/每日一题/857. 雇佣 K 名工人的最低成本.py | a439d49b3ad77a70ab1c5a3a7846aa901ac77d1d | [] | no_license | hrz123/algorithm010 | d17aee642f03f607a7984beb099eec18f2de1c8e | 817911d4282d2e226518b3533dff28282a91b3d4 | refs/heads/master | 2022-12-20T14:09:26.365781 | 2020-10-11T04:15:57 | 2020-10-11T04:15:57 | 270,178,423 | 1 | 0 | null | 2020-06-07T03:21:09 | 2020-06-07T03:21:09 | null | UTF-8 | Python | false | false | 5,322 | py | # 857. 雇佣 K 名工人的最低成本.py
import heapq
from typing import List
class Solution:
def mincostToHireWorkers(self, quality: List[int], wage: List[int],
K: int) -> float:
v = list(zip(quality, wage))
v.sort(key=lambda t: t[1] / t[0])
priority_queue = []
ans =... | [
"[email protected]"
] | |
1e722c8b3d71456db9c90dd4ee5c9bde1a02f8c7 | 7dfb5942ae4721b7084bde958d632dd90096328a | /function_generator/error_models.py | b75cd3ae00e6daae1112f1a68f604e5b2ace591f | [
"Apache-2.0"
] | permissive | blackwer/function_generator | f392ae0041f56d235a959ce3e54c1f865baf3cca | 91025e67a2c64009f0384ee35466bb04f0819fce | refs/heads/master | 2021-11-26T03:20:49.104389 | 2021-11-10T14:23:34 | 2021-11-10T14:23:34 | 219,051,758 | 9 | 2 | Apache-2.0 | 2021-11-09T13:34:12 | 2019-11-01T19:42:48 | C++ | UTF-8 | Python | false | false | 291 | py | import numpy as np
def standard_error_model(coefs, f):
return np.abs(coefs[-2:]).max()/max(1, np.abs(coefs[0]))
def relative_error_model(coefs, f):
return np.abs(coefs[-2:]).max()/np.abs(coefs[0])
def new_error_model(coefs, f):
return np.abs(coefs[-2:]).max()/np.abs(f).min()
| [
"[email protected]"
] | |
52a4d27d2d45abfa176ad4c8edd1e8e1b6e7298c | 1b126876948b3d05f89e058d4642405f192fb858 | /src/strava_api/Client.py | ff70413ffc370f22346a23c172543126be8f72e8 | [
"MIT"
] | permissive | yknot/strava_api | 6ecc972132156432cdc4e19ffe23fd5045fa765a | b31080b8718a6c26399cfc7c36b77f36a2bed1d3 | refs/heads/master | 2023-05-25T04:51:02.822053 | 2020-07-18T04:44:35 | 2020-07-18T04:44:35 | 279,205,963 | 0 | 0 | MIT | 2023-05-23T00:04:21 | 2020-07-13T04:01:33 | Python | UTF-8 | Python | false | false | 1,091 | py | """Main module."""
import requests
from .Athlete import Athlete
class Client:
"""Class to manage your Strava API Client"""
def __init__(
self, client_id: str, client_secret: str, auth_token: str, refresh_token: str
) -> None:
"""initialize client with application attributes"""
sel... | [
"[email protected]"
] | |
9e01ee06ccb0d0c3f6fcbb90b6af174e4d295b4a | 96086ae5e7bfa1e40159f919269a90c83e472326 | /opengever/usermigration/plone_tasks.py | 121756f0302306a726785ba83d2b3607d1afb842 | [] | no_license | lukasgraf/opengever.core | 6fc313717fbec3692354e56c2c3293789076a389 | a15c4ff8e0d5494906d7de46a43e3427c8d2d49f | refs/heads/master | 2020-12-01T11:38:46.721555 | 2018-06-18T10:13:09 | 2018-06-18T10:13:09 | 57,871,187 | 0 | 0 | null | 2016-05-02T06:59:58 | 2016-05-02T06:59:58 | null | UTF-8 | Python | false | false | 6,253 | py | """
Migrate user IDs in Plone tasks (issuers, responsibles, responses)
"""
from opengever.ogds.base.utils import ogds_service
from opengever.task.adapters import IResponseContainer
from opengever.task.task import ITask
from opengever.usermigration.exceptions import UserMigrationException
from plone import api
import l... | [
"[email protected]"
] | |
d89d76b57a914617374ae2be28918b6019c91b82 | 2cb07ae51d1de3e8bdff12e5628e7d142a98d970 | /Aula3/Problem15_12_4.py | 3454f557c9f57d8e47ebee3ce6450c7593be0a3e | [] | no_license | juanfdg/JuanFreireCES22 | e7c40a11584a86e1f81520d9da0bbdd58ea48e02 | 4d80b32163ea6d3f4c5f35375969a748022be438 | refs/heads/master | 2021-04-27T00:50:48.754467 | 2018-07-03T03:29:36 | 2018-07-03T03:29:36 | 122,661,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | class Point():
def __init__(self, x, y):
self.x = x
self.y = y
# Method wont work when other_point.x - self.x = 0
def get_line_to(self, other_point):
slope = (other_point.y-self.y)/(other_point.x-self.x)
linear_coef = self.y - slope*self.x
return (slope, linear_coef... | [
"--global"
] | --global |
8d6cca91d5489b3dabcf10d8c98523f7f3c593f8 | 9924e0dc6e0e8c8665508a218636f391451a153f | /Extras/use_flacco.py | 2e8dfe4b9cb62fa2b2d599de9da641448cd1f9e8 | [] | no_license | ai-se/ExploratoryLandscapeAnalysis | b531d374221397ed91f43eeff00217aa85797881 | c338fe93bb11881d25b6000853ca7ac0be69e212 | refs/heads/master | 2020-07-13T12:52:04.601453 | 2016-09-23T21:21:08 | 2016-09-23T21:21:08 | 66,961,225 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,730 | py | from __future__ import division
import pyRserve
from os import listdir
import pandas as pd
from random import shuffle
def df_to_list_str(df):
columns = df.columns.tolist()
list = []
for column in columns:
list.extend(df[column].tolist())
result_str = ""
for i, l in enumerate(list):
... | [
"[email protected]"
] | |
26c2f5e55d19a42e4299bc3c03c1aa8d472539d8 | 38a42a205eaa5a0a46989c95f0b01f7e04b96a9e | /uoft/CSC148H1F Intro to Comp Sci/@week3_stacks/@@Exercise3/stack_ex.py | 25de6d1577c709a79973a271d6b1427ee3ffe857 | [
"MIT"
] | permissive | Reginald-Lee/biji-ben | d24cd1189ca3e9ed7b30e5b20a40137e8d6d4039 | 37009dfdbef9a15c2851bcca2a4e029267e6a02d | refs/heads/master | 2023-05-06T23:06:49.819088 | 2020-06-10T12:07:47 | 2020-06-10T12:07:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,692 | py | # Exercise 3: More Stack Exercises
#
# CSC148 Fall 2014, University of Toronto
# Instructor: David Liu
# ---------------------------------------------
# STUDENT INFORMATION
#
# List your information below, in format
# <full name>, <utorid>
# <Rui Qiu>, <999292509>
# -------------------------------------------... | [
"[email protected]"
] | |
a8d4ea1ab28833bfd43a58cd9b108e03ae0b7c42 | 9d90b664ebbd11a57ee6156c528081551b98055b | /wsgi/local_data/brython_programs/tuple1.py | fb6bc882e1ee285aa89bedf32f13c2ec02f31f08 | [] | no_license | 2014cdag21/c21 | d4f85f91ba446feb6669a39903dda38c21e8b868 | faf4b354f7d1d4abec79c683d7d02055c6bab489 | refs/heads/master | 2020-06-03T17:54:16.144118 | 2014-06-20T09:29:02 | 2014-06-20T09:29:02 | 19,724,479 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | d = (11,12,13,'asdf',14,15.0)
# Note - tuples are immutable types
# Common operations:
# length of a typle
print(len(d))
# indexation (in Python it starts from zero)
print(d[0], d[1])
# slicing
print(d[0:2]) # equals to (11, 12)
print(d[2:-1]) # equals to (13, 'asdf', 14)
print(d[:2]) # same as d[0:2], equals to (11, ... | [
"[email protected]"
] | |
0e8f422dbaf4ff83f83fc49dc9410897d3314dcd | 7e9daf6a2a3ebfb969e793f92afc0dc5f1c2fc35 | /cat_mouse.py | 940150c58ad59356e7f9220c3b08a3bfc16612a7 | [] | no_license | NARESHSWAMI199/5-Star-On-Hacker-Rank-Python | e43ce5cb3429d2a683c37e6f4ba6440d073d47c2 | 51f245d1d0966de21ddf861b22fe3379e7c8a0a7 | refs/heads/main | 2023-02-25T03:05:25.330205 | 2021-01-19T13:49:27 | 2021-01-19T13:49:27 | 325,296,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | quries_size = int(input())
maxmum = 0
for i in range(quries_size):
query = list(map(int,input().split()))
if query[0] > query[2]:
dist_of_a = query[0] - query[2]
else :
dist_of_a = query[2]- query[0]
if query[1] > query[2]:
dist_of_b = query[1] - query[2]
else :
... | [
"[email protected]"
] | |
d4952e4625b9ebd20f0d0deb21cdd0ca66b480cf | faa0ce2a95da958be3bfb171cdff29eeb43c3eb6 | /py-exercises/JulieTestModule/characters/shadow.py | f71a4d7d759a9855c1f3ccbf67630318ea88332d | [] | no_license | julianapeace/digitalcrafts-exercises | 98fe4e20420c47cf9d92d16c45ac60dc35a49a6a | 98e6680138d55c5d093164a47da53e1ddb6d064c | refs/heads/master | 2021-08-30T04:17:09.997205 | 2017-12-16T00:22:22 | 2017-12-16T00:22:22 | 103,176,043 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | from characters.base import Character
class Shadow(Character):
def __init__(self, name = 'Shadow', health = 1, power = 5, armor = 0, evade = 0, coincount = 4):
super().__init__(name, health, power, armor, evade, coincount)
| [
"[email protected]"
] | |
f66c598f24bf258557c6b380eb6f1b14b1fa4d9a | 67a7c314fc99d9cd7a677fcb6bc2b6dfa20a9cff | /spambayes-1.0.4/utilities/dump_cdb.py | 49728d0958b67c26cdc52128cfdcf1d6f116874e | [
"LicenseRef-scancode-unknown-license-reference",
"Python-2.0"
] | permissive | Xodarap/Eipi | 7ebbb9fd861fdb411c1e273ea5d2a088aa579930 | d30997a737912e38316c198531f7cb9c5693c313 | refs/heads/master | 2016-09-11T06:28:01.333832 | 2011-05-03T15:35:20 | 2011-05-03T15:35:20 | 1,367,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | #! /usr/bin/env python
RC_DIR = "~/.spambayes"
DB_FILE = RC_DIR + "/wordprobs.cdb"
import sys
import os
DB_FILE = os.path.expanduser(DB_FILE)
from spambayes.cdb import Cdb
def main():
if len(sys.argv) == 2:
db_file = sys.argv[1]
else:
db_file = os.path.expanduser(DB_FILE... | [
"eipi@mybox.(none)"
] | eipi@mybox.(none) |
14698f5e208340300976981461b72d99053e4499 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/django_django/django-master/django/views/static.py | 479c59cac6c4165e1254d9a1815a56860e62d1b5 | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 5,108 | py | """
Views and functions for serving static files. These are only to be used
during development, and SHOULD NOT be used in a production setting.
"""
import mimetypes
import os
import posixpath
import re
import stat
from urllib.parse import unquote
from django.http import (
FileResponse, Http404, HttpResponse, HttpR... | [
"[email protected]"
] | |
40ccd51ea1d674209bf46cbea751869f208c6df8 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/coins_20200608093830.py | 2b449f4937abf589c1a075934356f3463068e9c8 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py |
def change(amount,coins):
count = 0
for i in range(len(coins)):
times = coins[i] / amount
print(times)
change(5,[1,2,5])
| [
"[email protected]"
] | |
7dd7acbd17cee8b4c05c6f118abbd654aca5e2d0 | 797f21680bf51656db629691cc667a4ddae7a513 | /final_exams/heroes_of_code_and_logic_VII.py | 758594704481bd5724bca88a701dcec11bcbc266 | [] | no_license | yordan-marinov/fundamentals_python | 48f5ab77814fddc6d3cb5a8d4b5e14f1eebf1298 | e1e9544d02be99640623317fadee810b503e7d9f | refs/heads/master | 2023-01-24T04:59:48.140176 | 2020-12-14T14:21:49 | 2020-12-14T14:21:49 | 309,784,119 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,679 | py | def get_heroes_data() -> dict:
number_heroes = int(input())
heroes_data = {}
for _ in range(number_heroes):
data = input().split()
hero_name = data[0]
hit_points = int(data[1])
mana_points = int(data[2])
heroes_data[hero_name] = {
"hp": hit_points,
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.