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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
09b0f76543aa6ff87e861ec5910a2965f2e8ba1c | d051f250e2997d4714a59f8a62459d5b5212711a | /rigault.py | 5bdbcefb527f49ff43bc43c7b610f2762c6c2b7c | [] | no_license | AlexGKim/NearbySupernovaFactory | 7a45f59285d91f687c46b703b39ec6df3256cca1 | 5c7db9be397d85a26aaf9196f9e75d2f3aab8998 | refs/heads/master | 2021-01-23T21:43:55.620413 | 2018-10-22T15:27:04 | 2018-10-22T15:27:04 | 56,637,164 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,883 | py | rigault.py | #!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib import rc
import pickle
import cPickle
f = open('forAlex_tmp16sept2016_localhost_parameters.dat', 'r')
for i in xrange(1):
f.readline()
data = [x.split() for x in f.readlines()]
... |
3a1304a4e3ce1e3662bf274259b7b4b58df2803b | ce69ee9d777c4c9ce8f296a1af4c9b3e5e9d8146 | /10-Advanced Python Modules/05-Regular Expressions.py | c1544c1f0ae47490a1928cecb196ce2ba63a065f | [] | no_license | Jitender214/Python_basic_examples | 5285c01054a41e531e95f6488bbb7759de18f8cf | c26d2dea3522d4e5d2e1440614e21658d644df21 | refs/heads/master | 2020-04-04T14:05:15.756000 | 2018-11-03T13:43:30 | 2018-11-03T13:43:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,804 | py | 05-Regular Expressions.py | import re
patterns = ['term1','term2']
text = 'this is a string with term1, but not the other term'
for pattern in patterns:
print('Searcing for "%s" in: \n "%s"' %(pattern,text))
if re.search(pattern , text):
print("\n ")
print("Match was found")
else:
print("\n ")
print(... |
4eb7ef574d60ccc0de8bc168d3ff2a44fbc8698d | 339f5d49b8cb02e9e83dc616f7e07f04cc956b82 | /Particle_Simulation/test/test_MetropolisMonteCarlo.py | 431b4c24aaa3f580e84efbf3d1fc383a489182c3 | [] | no_license | Mnlohani/Particle_Simulation | 99d3743b5cf6eccffd9b4ff301d2e040bdff39c2 | 2246c0b3d8d53f7204e3d93b17309d41fc16ed46 | refs/heads/master | 2021-05-06T02:08:53.871058 | 2018-02-21T17:14:38 | 2018-02-21T17:14:38 | 114,499,814 | 0 | 0 | null | 2018-01-16T01:18:57 | 2017-12-17T00:45:41 | Python | UTF-8 | Python | false | false | 8,889 | py | test_MetropolisMonteCarlo.py | import numpy as np
import numpy.testing as npt
import unittest
from Particle_Simulation.Particle import Particle
from Particle_Simulation.System import System
from Particle_Simulation.Parameters import Parameters
from Particle_Simulation.MetropolisMonteCarlo import MetropolisMonteCarlo
class test_MetropolisMonteCarl... |
0589323d133a4f0c496d668f4dff99c6ea1d4f0f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02793/s624958955.py | 5379faff4672486fee8f9610ad4ed23e3ebf358d | [] | 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 | 262 | py | s624958955.py | from fractions import gcd
from functools import reduce
n = int(input())
a_list = [int(x) for x in input().split()]
temp = 1
for a in a_list:
temp *= a // gcd(a, temp)
ans = 0
for a in a_list:
ans += temp // a
mod = 10 ** 9 + 7
ans %= mod
print(ans) |
1769d82a86b5e7d0a2962ce28d658546e5ade317 | d21a353a08f35a387b747cc28ce6227e47eb59ec | /tests/test_main.py | 58ac31fe633cb632a00914656c8b0ae9413e2351 | [
"MIT"
] | permissive | wasilak/influx-prompt | 36e020833dab85d2a42833410a5c9585515b769b | a3c254dd98e01b0a0fbcecd03b4ff4d5506c7300 | refs/heads/master | 2020-03-31T04:50:04.857715 | 2018-10-07T14:51:41 | 2018-10-07T14:51:41 | 151,921,549 | 0 | 0 | MIT | 2018-10-07T08:39:24 | 2018-10-07T08:39:24 | null | UTF-8 | Python | false | false | 670 | py | test_main.py | import mock
from influx_prompt.main import cli
class MockCLI(object):
def __init__(self, application=None, eventloop=None):
pass
def run(self):
raise EOFError
class MockClient(object):
def __init__(self, args=None):
pass
def ping(self):
pass
@mock.patch('influx_pr... |
5d154424c1f02465dcf4b9d4a2d84dfe6f8c49ca | dfc24c696e1110c1119ccced995f48c3b46ee90e | /scripts/elt_scripts/cli.py | f825ffc16249094a12a29df3c2f2159b930fcff5 | [] | no_license | ARCCN/elt | 3edca76eed0b0fd81f64cc78f348a90acd4ce164 | 3bf4e6cc0c7abbe442d6513ed294e956143c3bea | refs/heads/master | 2021-01-02T08:13:47.555561 | 2015-01-20T14:09:22 | 2015-01-20T14:09:22 | 18,219,864 | 1 | 0 | null | 2014-04-23T08:51:28 | 2014-03-28T17:07:01 | Python | UTF-8 | Python | false | false | 4,613 | py | cli.py | #!/usr/bin/python
import sys
sys.path.append("server/")
from server.ext.debugger.elt.database import db_cli
from subprocess import Popen
import code
import os
from threading import Timer
db = []
log = []
pox = []
mn = []
timer = None
debug_sample = [
"ext.debugger.elt.of_01_debug",
"--fake_debugger=0.1",
... |
5558356de716c2be3db77b45d53c2885395cf193 | 7ceba2f4b7ff487379d2a46d4261040934efd09f | /src/delete_vm.py | 0f73394076c3460e539c5832130a873032a01016 | [] | no_license | ihwang/roger_skyline_1 | c4745682265af2a9bef9e64467614d5dff0e9c93 | 17382f2bc5fcb1b1e3b8f35b0524dcd8b1500044 | refs/heads/master | 2023-04-11T05:36:59.090403 | 2021-04-22T14:24:08 | 2021-04-22T14:24:08 | 357,182,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | delete_vm.py | from os import system
def delete_vm(config):
system("vboxmanage unregistervm " + config["VMNAME"] + " --delete") |
60756ce101dab322d2e455849a13f16f2aaf8dd7 | f4167cc3872845285fcbb134827754c22bd1f379 | /entity/inventory.py | c1fef4ecba6749043ef29c1043d8b5ac49ae46dd | [] | no_license | simran-ahuja/coffee_machine | cd8775fa4557656e94f9ca38998c50a47a93879a | b359fa703d439552dd42b840219dc67f9fe3578d | refs/heads/master | 2022-11-30T09:05:05.245360 | 2020-08-15T13:39:08 | 2020-08-15T13:39:08 | 287,391,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,736 | py | inventory.py | from threading import RLock
from .errors import (InventoryFetchException,
InventoryLowException, InventoryRefillException)
class Inventory(object):
"""
Inventory entity is used to manage stock in the system.
Actions like refilling & fetching from inventory are Critical
Section Pr... |
9f469b6a0f1dcbf79626518d3939e4e0ba98c504 | 3356aabd4417e06bbb3ac9c29e2b655d962167d9 | /DutchFolkTunes/__init__.py | 3432058250e62971c30813b4809f775ea93a2fba | [] | no_license | YakaAhSon/LSTMDutchFolkTunes | 8f784516865f62f77e2d989ee16fcbd0846145dd | b93631abd90c171e8f54f7d7a7e7545f4383b47e | refs/heads/master | 2020-04-22T06:35:03.517134 | 2019-02-11T20:30:12 | 2019-02-11T20:30:12 | 170,196,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | __init__.py | tune_strings = [open("DutchFolkTunes/allnlb%d000.abc"%i,"r").read() for i in range(1,20)]
tune_strings = [i.split("\n\n") for i in tune_strings]
tunes = []
for i in tune_strings:
tunes = tunes+i
tune_strings = tunes
tune_strings = filter(lambda x: len(x)>20, tune_strings)
del tunes |
f90b95aa69a6b6b2a6b7f740f97aae6b4a201c44 | c6ec292a52ea54499a35a7ec7bc042a9fd56b1aa | /Python/304.py | 765d1b647e5049753d02e1041d6eb60df079edf8 | [] | no_license | arnabs542/Leetcode-38 | ad585353d569d863613e90edb82ea80097e9ca6c | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | refs/heads/master | 2023-02-01T01:18:45.851097 | 2020-12-19T03:46:26 | 2020-12-19T03:46:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | 304.py | class NumMatrix:
def __init__(self, matrix: List[List[int]]):
self.sums = [[0] for _ in range(len(matrix))]
for i in range(len(matrix)):
curSum = 0
for num in matrix[i]:
curSum += num
self.sums[i].append(curSum)
def s... |
3655d4266633be450f13d39bd184e1b3ae0b42f1 | 911da5af2247446428d52b135863640e3bbaeaeb | /J1 2002.py | ca007bdb0410b889f44768699dda13add22669cd | [] | no_license | Dmin7-13/Grade-11 | f32abb7c18b4595c0ecd52841890f0ed2273c17c | 5979d930ceeb432a642121fda65fe0a9f0059117 | refs/heads/master | 2020-04-14T11:01:29.798693 | 2019-02-18T21:38:09 | 2019-02-18T21:38:09 | 163,802,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,889 | py | J1 2002.py |
def print_one():
print(" ")
print(" *")
print(" *")
print(" *")
print(" ")
print(" *")
print(" *")
print(" *")
print(" ")
print(" *")
return ""
def print_two():
print(" * * ... |
e9ee02909e262f0e2a01fc05e6aebbc96e341def | df2cbe914f463ad050d7ed26194424afbe3a0a52 | /addons/website_sale/tests/test_website_sale_image.py | b50f7ae6f7a30d2a028bccfd4186b63b150b87d2 | [
"Apache-2.0"
] | permissive | SHIVJITH/Odoo_Machine_Test | 019ed339e995be980606a2d87a63312ddc18e706 | 310497a9872db7844b521e6dab5f7a9f61d365a4 | refs/heads/main | 2023-07-16T16:23:14.300656 | 2021-08-29T11:48:36 | 2021-08-29T11:48:36 | 401,010,175 | 0 | 0 | Apache-2.0 | 2021-08-29T10:13:58 | 2021-08-29T10:13:58 | null | UTF-8 | Python | false | false | 14,197 | py | test_website_sale_image.py | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import io
from PIL import Image
import odoo.tests
@odoo.tests.common.tagged('post_install', '-at_install')
class TestWebsiteSaleImage(odoo.tests.HttpCase):
# registry_test_mode = False # uncomment to save the product to ... |
3213a9a748d83bf5eee572c94d0104384b3c641d | 8d78a6e7f1b6107f92b3f315e22964bf6f7c19f1 | /API/api_keys.py | b5f3b0e3b123f923782801bad3ef56efb033fb81 | [] | no_license | miiinaa223/Homework | 037122c1f0c492a67bea0fc6a7eb0905f4b82cf1 | a4fe78bf4cb40cbb842c81fad9996b4841e65016 | refs/heads/master | 2020-05-04T04:02:40.702560 | 2019-06-04T01:32:44 | 2019-06-04T01:32:44 | 178,957,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 70 | py | api_keys.py | # OpenWeatherMap API Key
api_key = "69d9986f9a8c45c9f8fc0133502b5ab0"
|
a606b591255b8617e575c5b5066fd6c59fcc2786 | 50a622d895450766716fc687fd12c07116fe3074 | /bin/zsh_autocompletion/_add_EWs_to_beagle_output.py | eee6c7528d0b22e82a7e00146e765065d9a0f953 | [] | no_license | jacopo-chevallard/home | e3663cb3ee49994326951718903a99cdd1b94e53 | 09b07e9ac0ae1b3b7119ef9cf8025fc6484b96e4 | refs/heads/master | 2022-11-21T04:21:15.220933 | 2022-11-16T11:35:35 | 2022-11-16T11:35:35 | 70,907,824 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | _add_EWs_to_beagle_output.py | #compdef add_EWs_to_beagle_output.py
#
# this is zsh completion function file.
# generated by genzshcomp(ver: 0.5.2)
#
typeset -A opt_args
local context state line
_arguments -s -S \
"-h[show this help message and exit]:" \
"--help[show this help message and exit]:" \
"--beagle-file[Name of the Beagle file cont... |
aea8600f4cda496b192ca83a427358c58fa59954 | 1e9353881a2c07dfea5a6936d17ba5018627618e | /tests/test_looseserver/server/conftest.py | f755b7293e76836d365f00c03ffc5df432464fc7 | [
"MIT"
] | permissive | KillAChicken/loose-server | 1811dad6483713ff746ef589b876d3f1ee5fc331 | 082402f1fec94faea20343142b0c306dc5f86026 | refs/heads/master | 2020-05-04T23:12:35.650071 | 2019-06-08T09:29:47 | 2019-06-08T09:41:05 | 179,536,212 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | conftest.py | """Configuration of pytest."""
import pytest
from looseserver.server.core import Manager
@pytest.fixture
def core_manager(base_endpoint):
"""Core manager."""
return Manager(base=base_endpoint)
|
4c1ba21e7b1094f534b5605d5b9ea3ccdd704dd1 | ab7bb67ea2b0651214ef45d16d64cc0473f0cc66 | /lib/mail.py | 046fdf4abb2eb0043a654309af1078678531e8f7 | [] | no_license | joaompinto/debfactory | 380dd1f9e53316933a14877c43195213e482c356 | edee817b74a83f52ac90ed24c5c60a32860943c3 | refs/heads/master | 2021-06-19T10:35:01.710907 | 2017-04-19T15:56:43 | 2017-04-19T15:56:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,479 | py | mail.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
(C) Copyright 2009-2010, GetDeb Team - https://launchpad.net/~getdeb
--------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... |
c41e4c6a9c6f8da73fa96de7fd3109c9e801500d | 80162f6e0d1520bb49098dc34e455dc1ff31c66b | /get-quote.py | af644ce3f7fdcbe5f0ef731583f43e1b38e4529c | [] | no_license | kubila/python-random-quote | 2bbbbbd007a7b0032005dec19231aa562828a8c9 | b199705a9fdfa5678ecb7ccf84386d101b6b21d9 | refs/heads/master | 2022-11-09T23:05:42.606265 | 2020-06-20T20:56:13 | 2020-06-20T20:56:13 | 272,794,131 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | get-quote.py | import random
def primary():
f = open("quotes.txt", 'a')
#quotes = f.readlines()
lazyCat = "lazy cat jums over the jox in a second"
lazyDog = "lazy dog jumps over the cat in two seconds"
ragnarQuote = "Man is the master of his own fate, not the gods. Gods are man's creation, to give answers that ... |
d86170c4c69504407c30559176f14ad20973d06d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2226/60835/261920.py | dc4267e31ef7fc04470d6085aef0ffb0bf9d72dd | [] | 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 | 374 | py | 261920.py | left = int(input())
right = int(input())
result = []
for x in range(left,right+1):
n = x
judge = True
while n > 0:
tem = n % 10
if tem == 0:
judge = False
break
elif x % tem != 0:
judge = False
break
else:
n = n // 1... |
8a92b285da05117bfbdcb078e38fc97b463bac86 | ab67d66ecaa6ccc7e0f7400bb308e5a7a3b4849d | /tushareData.py | a70946908b572c74f562b01a3453931d04083ed5 | [] | no_license | wangrh001/quant | a32eb7bf5bed718105e07af26ae5eb156001a4ba | d5637fa38441f267c21a69f433933b7f8c924dc7 | refs/heads/master | 2022-11-28T16:19:13.201741 | 2020-07-20T02:32:12 | 2020-07-20T02:32:12 | 280,989,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,795 | py | tushareData.py | # import tushare as ts
# from sqlalchemy import create_engine
# import pymysql
# # ts.set_token('d49e3859a3841cce97588cf8681d6f06628788080cc8f7a73af8fcaf')
# # pro = ts.pro_api()
# # df = pro.index_basic(market='SW')
# # print(df)
# # engine = create_engine('mysql+pymysql://root:Wshuguang1@localhost/findata?charset=utf... |
1b4393e6b19edab1230196fb4baec2aeb094b8eb | d0ac0cfecf2fd7c4b00af6a51789327ad3c6754d | /flatcoke/settings/production.py | 6d24a2a48a3303cd3f4278f906f4f9dc5a66a6b3 | [
"MIT"
] | permissive | flatcoke/django-rest-structure | c36c48787ac030ffe6749ccf08d7de4b91bfc5d5 | e3378a1a04f4c9b9a87c492dd085eaeb0b3fd592 | refs/heads/master | 2022-12-09T19:44:56.612017 | 2022-06-18T11:56:32 | 2022-06-18T11:56:32 | 164,554,773 | 7 | 1 | MIT | 2022-12-08T01:21:27 | 2019-01-08T03:48:49 | Python | UTF-8 | Python | false | false | 213 | py | production.py | try:
from flatcoke.settings.base import *
except ImportError:
pass
DEBUG = False
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
)
|
d68901fedbdf4395b582ce7d833dc4db82159825 | d6bdd5de83d5df25df2452f895a7791110bd0bfe | /08/07/convertDegToRad.py | 250f314272188385a111ead524193caa360d498f | [] | no_license | muhammed-ayman/CSCI-101-course-labs-solutions | cede9ab775ef7d56fd5196bd92d01b3f08dec1b3 | 45c86708ec2127154171aec703b7cfa42ce3519f | refs/heads/main | 2023-07-10T19:06:52.250688 | 2021-08-22T19:52:57 | 2021-08-22T19:52:57 | 387,194,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 82 | py | convertDegToRad.py | import math
def convertDegToRad(angle):
angle *= math.pi/180
return angle
|
b2bf81a8d58e9163f0f4f0a4cc38473b26af8160 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03351/s824449936.py | c0835211e3fcb486f333105b6ce5bc5611d7adbc | [] | 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 | 153 | py | s824449936.py | a,b,c,d = [int(x) for x in input().split()]
res = "No"
if abs(c - a) <= d:
res = "Yes"
if abs(a - b) <= d and abs(b - c) <= d:
res = "Yes"
print(res) |
887ac27e47022648d78bd14201cef575a6dce067 | 7fe479a1fb52ee8882877ef9e1e7953a490eca23 | /src/ex13.py | c07dd86165aa15c57edab48fdc2adf2796a708bf | [
"MIT"
] | permissive | SpyrosDellas/learn-python-the-hard-way | ae0aaf51d350ee1db507b5b96f274d81cc66c2e9 | bdbed7658f2650b12f7a1388adf27ad436353f61 | refs/heads/main | 2023-02-11T07:38:24.889360 | 2021-01-06T11:36:51 | 2021-01-06T11:36:51 | 327,292,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | ex13.py | from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
name = raw_input("What's your name? ")
age = int(raw_input("What's your age? "))
|
03547de32ab311a9fc1c6ac9368b2b26b014981b | 8a1a15a46b143598a5aa148923d28b388e25c98d | /challenge9.py | 671d1ee811687acb17140645bfd6f2873ff8bff4 | [] | no_license | mattmartinez/RS_API_Challenge | dddb7e618c9b035529983e03468984f21b849373 | 5fa59518cc98813832aa1d3aa5abb3945ff84a49 | refs/heads/master | 2021-01-10T22:08:35.483328 | 2013-03-29T22:29:45 | 2013-03-29T22:29:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,298 | py | challenge9.py | #!/usr/bin/env python
import os
import sys
import time
import pyrax
import pyrax.exceptions as exc
from time import sleep
def main():
credz = os.path.expanduser("~/.rackspace_cloud_credentials")
try:
pyrax.set_credential_file(credz)
except exceptions.AuthenticationFailed:
print "\n\nAuth failed, possibly wro... |
0b4da39640d70bf6bed83f66b552f97fed3d74c7 | af7e80cfe1a8b2f02bac8b5a8e7ab863d662827b | /SQL_Scripts/csv_to_table.py | a48ea491ff740cf290ae2a88fbacc7e39f3238d2 | [] | no_license | ankiyang/Scripts.Fundamental.Little | 39d19eab13439209353e95df7a28573c80e95797 | 5f03652cad65aa93b2dbb528d5ddbfd889461c25 | refs/heads/master | 2023-01-09T20:14:40.033510 | 2020-11-15T04:20:42 | 2020-11-15T04:20:42 | 60,675,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,831 | py | csv_to_table.py | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Usage:
1. export db table to csv file:
>python csv_to_table.py -e [table_name] -p [file path folder]
2. import csv to db-new-table(table structure has been changed):
>python csv_to_table.py -w [new table_name] -c [csv file path]
if one tries to us... |
ec54eea2a25affbf11714ea207261b1260bbee84 | 610a3f96f414e662a100d9cbf58cfff1bad798f2 | /tuplas.py | 76188de61392e958a68bde840d53bdc54c089f80 | [
"MIT"
] | permissive | amarelopiupiu/python-resumos | 59241646e40d4c3be450914b43fab3674922ec2a | 800a496474f065c45363b4bac65aa437902b25ab | refs/heads/main | 2023-05-25T08:12:44.007091 | 2021-06-09T20:52:32 | 2021-06-09T20:52:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,590 | py | tuplas.py | """
1- Tudo que serve para dicionário serve para lista, com exceção das listas serem imutáveis, é necessário adicionar vírgula para números únicos, usa-se parênteses e não copiamos uma tupla usando o copy():
Esses dois exemplos são duas tuplas:
tupla = (1, 2, 3, 4, 5)
tupla = 1, 2, 3, 4, 5
2- Tupla com 1 valor - tupl... |
9fb1d66c46dfc93b246fd81d2b8095b5b5bbe718 | eb2b13d90d54e6e1e7f348b34e23f19bdbca9e90 | /12_class.py | c86c663747893aa884c2484c1fc692b301d810d5 | [] | no_license | diassor/platzi_pyhton_2019 | 6df0d4d9a996ee454aac05f88e1d5c5aff7e8f76 | fdf74d41f6077069cdad8f8df291315d86783b40 | refs/heads/master | 2020-04-20T10:37:02.171540 | 2019-03-10T04:07:47 | 2019-03-10T04:07:47 | 168,794,052 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | 12_class.py | # -*- coding: utf-8 -*-
# vamos a personalizar nuestra scrip del proyecto de main
# los cambios realizados se ejecutaron en 12_subclass_main.py
# desde alli todos los cambios de nuevos clientes y validacion de
# clientes ya registrados quedaron en el script
# en Platzi Ventas el archivo main.py quedo con la informac... |
e057bda25b33a7f25156d496ddf7aa29c3c7caf3 | 6782a4d4c4406982a66d98466d448b5b8ea2d366 | /tensorflow/compiler/mlir/quantization/tensorflow/python/representative_dataset.py | f7aceee1484d7f21224427847ada64eccd1b1b91 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MaiKuraki/tensorflow | 7afc33f4bc505c794f51dd6cbbfc44a3233ea986 | 46c4751f554e5e7f249cbe6642f5f874ad7614a4 | refs/heads/master | 2022-07-31T20:48:39.704555 | 2022-06-29T18:01:02 | 2022-06-29T18:06:10 | 183,984,120 | 0 | 0 | Apache-2.0 | 2019-04-29T02:11:07 | 2019-04-29T02:11:07 | null | UTF-8 | Python | false | false | 1,261 | py | representative_dataset.py | # Copyright 2022 The TensorFlow 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 required by applica... |
4c10608e532696d6640c24c433e43495c0ee9e0a | 070875bcdd7b39aded3621ea03b43a3fa017de21 | /Stacking.py | fe318e6bb872e1398452fe7a4209cdc35b1cef7c | [] | no_license | xynmxy/Machine-Health-Prognosis-of-Battery | 3d3d8f3960f8273158a43ac48be65d0305382e82 | db9e150cfcbe448ba20841f13bce33ba3a017530 | refs/heads/master | 2022-09-05T01:23:02.770080 | 2020-05-31T10:57:35 | 2020-05-31T10:57:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,757 | py | Stacking.py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 23:15:51 2020
@author: mouna
"""
import pandas as pd
data = pd.read_csv("BatteryModelling.csv")
dataset = pd.read_csv('BatteryModelling.csv')
datasetdf = pd.DataFrame(dataset)
Mean = datasetdf.groupby(['cycle_count'])['voltage','current','soc', 'temperatu... |
11962ecbb09c80fd751e37b44bf387cb074867d5 | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/processor.py | cccf96a174a1b538fca6dc1a8db9f16fa1f47611 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 9,887 | py | processor.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
913e0163e8fc5532e110da6655b99118ce09a3ea | eee3644e404ba48fa9bb25e7caf5c09fdd7c9889 | /parseit.py | 665aef4d7f5efd259eae1e8ee2a6d03c0ea5abb2 | [] | no_license | code4tots/parseit | cb3ecb663454c51dfe86842abe62506ce99b7050 | 4ee3b8aebc9c360d091875151993f2871cabc053 | refs/heads/master | 2021-01-22T23:53:30.058939 | 2014-07-29T23:46:29 | 2014-07-29T23:46:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,110 | py | parseit.py | import re
class Token(object):
def __init__(self,type_,string,token,start,end):
self.type_ = type_ # type of token (int, float, keyword, etc.)
self.token = token # string containing this token
self.string = string # entire string bei... |
2019393c3935ea25c692ebf6c24dcc51a17ad58a | a3c662a5eda4e269a8c81c99e229879b946a76f6 | /.venv/lib/python3.7/site-packages/pylint/test/functional/recursion_error_crash.py | 208bc2e7ae45b150156b264d7f8398151e634781 | [
"MIT"
] | permissive | ahmadreza-smdi/ms-shop | 0c29da82c58b243507575672bbc94fb6e8068aeb | 65ba3f3061e2ac5c63115b08dadfe7d67f645fb6 | refs/heads/master | 2023-04-27T19:51:34.858182 | 2019-11-24T20:57:59 | 2019-11-24T20:57:59 | 223,616,552 | 6 | 2 | MIT | 2023-04-21T20:51:21 | 2019-11-23T16:09:03 | Python | UTF-8 | Python | false | false | 204 | py | recursion_error_crash.py | """Test that a recursion error does not happen
https://github.com/PyCQA/pylint/issues/2463
"""
import os
ABC = os.path.realpath('abc')
DEF = os.path.realpath(ABC + 'def')
GHI = os.path.join(DEF, 'ghi')
|
8a9be3716847c4b6a42b43009ceeb86c34b95977 | 8f6cc0e8bd15067f1d9161a4b178383e62377bc7 | /a3c_making_baselines_for/old_code/vae_small_domain/vae_data_generator.py | fbce939b213f517868d7fe8bc5feca550cf66d6e | [] | no_license | humorbeing/python_github | 9c4dfc61a3cefbb266fefff335f6b28d05797e5e | e4b4b49bee7e7e3843c6874717779ce8d619bd02 | refs/heads/master | 2023-01-22T21:51:20.193131 | 2020-01-26T21:47:23 | 2020-01-26T21:47:23 | 163,707,778 | 0 | 0 | null | 2022-12-27T15:37:48 | 2019-01-01T01:58:18 | Python | UTF-8 | Python | false | false | 1,660 | py | vae_data_generator.py | '''
description of this code:
run random policy on game_name
record and store them in certain path.
'''
import random
from this_utility import *
import os
import gym
import numpy as np
MAX_FRAMES = 10000 # max length of game
MAX_TRIALS = 1000 # just use this to extract one trial.
is_render = False
file_path = VAE_... |
a8cd4317a571be4ee30d061a44c17669acc32952 | 2ff8ee359cd884ba89c10861395c709ee56d68e8 | /facial_age_classifier/EfficientNet_ver/data_preprocess/train_val_split.py | 48ec4b6b380b295c767dd4eec6ad09921c533359 | [] | no_license | HyoKyungPark/Pytorch_dev | b425e17023bd160a00ff359162e012d68218fd59 | c50b9536787ffc04f44b1a1c1077214e28d2e5bc | refs/heads/master | 2023-09-04T15:46:39.255725 | 2021-06-04T08:03:27 | 2021-06-04T08:03:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | train_val_split.py | import os
import shutil
import random
import os.path
src_dir = '../data/class_15_data/train/70'
target_dir = '../data/class_15_data/val/70/'
src_files = (os.listdir(src_dir))
def valid_path(dir_path, filename):
full_path = os.path.join(dir_path, filename)
return os.path.isfile(full_path)
files = [os.p... |
737dc95c1e385d43b2016a0a1d4d1b46f6293db2 | 4a4cc797f9a46a2c09075abfc2033c480eaa5486 | /mini-programs/week_2/programs/ice_cream.py | 32e4a19f44c9c100d8dd3aefb8e91fff1bce808d | [] | no_license | h1mik/python_programs | efa806eb9803c3e50aee845d5e0be9560d65f2be | 33e169ef33f70bc94cd535ecf44e852ae58c7a64 | refs/heads/main | 2023-02-04T14:45:04.855119 | 2020-12-26T09:25:22 | 2020-12-26T09:25:22 | 309,483,948 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | ice_cream.py | n = int(input())
if n == 1 or n == 4:
print("NO")
elif (n % 3 == 0) or (n % 5 == 0) or (n % 5 % 3 == 0) \
or ((n % 5) + 5) % 3 == 0 or (n % 11 == 0):
print("YES")
else:
print("NO")
|
fc1e15b252b6e3b9b1d71ce254d66d4c728d621e | e861f5fb5f8a8b766bf5633f69990bafe7552d96 | /lever/run_lever_data_refresh_for_tableau.py | 6734c70d1fd5def87427683b6171713688445fc3 | [] | no_license | Lothilius/random_tools | 59d849629cbdd7cb9f469dc2b5fb4c1f2271ff2d | cb085723d474648d63cfcd28790d385bf06bb870 | refs/heads/master | 2020-07-03T21:44:07.508955 | 2019-08-13T03:50:06 | 2019-08-13T03:50:06 | 202,058,255 | 0 | 0 | null | 2019-08-13T03:50:07 | 2019-08-13T03:38:23 | Python | UTF-8 | Python | false | false | 20,243 | py | run_lever_data_refresh_for_tableau.py | # coding: utf-8
__author__ = 'Lothilius'
import sys
import pandas as pd
from bv_authenticate.Authentication import Authentication as auth
from send_email.OutlookConnection import OutlookConnection as outlook
from tableau_data_publisher.data_assembler_hyper import HyperAssembler
from tableau_data_publisher.Tableau impo... |
4322623a3e442814a931e11eb655c87f568a3e1f | f85f0bca05f5e274f729d4704615b801da1bc024 | /BookShop/core/urls.py | 16cf6e48d6ebfc67f547048c8e8e5705893204f0 | [] | no_license | Alexxxtentancion/django-library-service | 2ae2ad2b7c3970bf3bbcb6816b914b111c975e23 | 14560848e41e5b90bb20aca735b2ecb330302f2f | refs/heads/master | 2020-04-13T09:04:09.928867 | 2018-12-27T20:53:50 | 2018-12-27T20:53:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | urls.py | from django.urls import path
from . import views
app_name = 'core'
urlpatterns = [
path('', views.BooksView.as_view(), name='list'),
path('<int:pk>/like', views.BookLikeToggle.as_view(), name='like-toggle'),
path('api/<int:pk>/like', views.BookLikeAPIToggle.as_view(), name='like-api-toggle'),
path('a... |
64399cfd79160622001e611d87b8fe1467075dd4 | 22bf910b64283b3c15cc4d80542e83fa89e9f09d | /monero_glue/messages/TransactionType.py | c3eb7698d68881b1f711cd02cf5cfd6a1c17f12b | [
"MIT"
] | permissive | ph4r05/monero-agent | 24ed1aa17d6616b2ae6bcdb7b9997f982f8b7b5d | 0bac0e6f33142b2bb885565bfd1ef8ac04559280 | refs/heads/master | 2022-10-18T06:30:43.550133 | 2021-07-01T16:27:56 | 2021-07-01T16:27:56 | 126,215,119 | 24 | 5 | MIT | 2022-09-23T22:53:44 | 2018-03-21T17:18:21 | Python | UTF-8 | Python | false | false | 2,363 | py | TransactionType.py | # Automatically generated by pb2py
# fmt: off
from .. import protobuf as p
from .TxInputType import TxInputType
from .TxOutputBinType import TxOutputBinType
from .TxOutputType import TxOutputType
if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal ... |
2c227bca083c0856e0fe6fb53a12ca9edab04c71 | fc1e3f326c2c4b65fa996b0d16c6582b693b9db1 | /client.py | 228c25c1dcbbeaf488a3be72150e021b8716a46b | [] | no_license | ArtemZaitsev1994/kivymess | 4a55f0aabc9b4bf1a969cf42fbf2c2a0c13b5888 | bbfddb6b02634c86a819fd9e25100681ad3fd4b1 | refs/heads/master | 2021-06-26T09:13:48.601000 | 2019-08-31T17:28:54 | 2019-08-31T17:28:54 | 205,001,204 | 0 | 0 | null | 2021-02-26T02:36:07 | 2019-08-28T18:48:29 | Python | UTF-8 | Python | false | false | 3,455 | py | client.py | import aiohttp
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.window import Window
from kivy.uix.textinput import TextInput
from kivy.lang import Builder
from ... |
64f193baa79a9886cb9206a42a43cf97041b77fd | 893e5ed67d93b6544805815c02e2fd2a7cb09ad1 | /tests/test_deployment.py | 7107d5ffc53973dca78016d3e08b10164af646b5 | [
"BSD-3-Clause"
] | permissive | matrixise/pyactiviti | 8753aca1d1868e6c1855418db39d813f420b1686 | 806f9f2ba5d658ff9e614a9d9010388fbc4190f6 | refs/heads/master | 2023-01-12T07:13:21.550034 | 2022-12-27T11:10:50 | 2022-12-27T11:10:50 | 41,948,553 | 4 | 4 | BSD-3-Clause | 2022-12-27T11:11:34 | 2015-09-05T04:09:45 | Python | UTF-8 | Python | false | false | 2,695 | py | test_deployment.py | # -*- coding: utf-8 -*-
import json
import contextlib
import StringIO
from requests.status_codes import codes
import requests_mock
from .common import ActivitiTestCase
from pyactiviti import exceptions
class DeploymentTestCase(ActivitiTestCase):
@requests_mock.mock()
def test_deployments(self, mock):
... |
1b6ce4fa75a6af62793026d86026646f6af64233 | 2028ab35d9b95684cbab7a81498c14680f37edab | /app/server.py | 6f951a9a2f90d2b185014690a12d433c42ae5a9b | [
"MIT"
] | permissive | ReutersMedia/video-clipper | 1ef028300da1e20c17d541b6d945e9847c9e76bf | 08cb8e07b11f769278c0724c0ae497fdc6982e68 | refs/heads/master | 2020-04-17T01:19:06.041435 | 2019-01-18T18:06:44 | 2019-01-18T18:08:19 | 166,087,088 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,775 | py | server.py | import logging
import os
import subprocess
import re
import urllib.parse
import sys
import datetime
import random
import requests
from flask import Flask, Response
from flask_api import status
app = Flask(__name__)
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.INFO)
FFMPEG_KEYFRAME_CMD = "/usr/bin/ff... |
ecdc59616e14f9c4d09eb41447be32da80e70654 | 04b7fd8e4c853f7f8605e47ef2b79d0874e5f241 | /antidas/forms.py | 2ccc70545b3ee08a2d4cdaca9c207ab6f92572af | [] | no_license | Pioner174/antida | 449fdefa9c124974e15fe70540255fe474060d2f | bc282ce8a7f06738a35bc8d90f0e97f99561a153 | refs/heads/master | 2022-12-12T02:28:56.293925 | 2020-01-12T15:59:02 | 2020-01-12T15:59:02 | 228,387,871 | 0 | 0 | null | 2022-12-08T03:21:34 | 2019-12-16T12:58:03 | Python | UTF-8 | Python | false | false | 1,217 | py | forms.py | from django import forms
from django.utils.translation import gettext_lazy as _
import short_url
import time
from django.db.models import F
from .models import TableLink
def create_sort_url():
time_now = time.time()
short_link = short_url.encode_url(int(time_now), min_length=8)
if short_link not in Table... |
42ad5e82e14e3b4b9559849e4936bcd8b8f8f249 | 2b7ca03abd7aa3287ee791b89f3942f97881ed8d | /dict.py | cea1580c7033e900303a8dc94ce56ba34bf40aef | [] | no_license | gregr/python-misc | 3d34c571bfe8f997b90e5053fcb59ec41a0c94de | 2395f231fea307e8954fb2934762c5336d614a22 | refs/heads/master | 2021-01-10T10:54:56.105847 | 2016-02-25T21:51:49 | 2016-02-25T21:52:30 | 43,486,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,872 | py | dict.py | from __future__ import absolute_import
from collections import defaultdict
from operator import add, sub
countdict = lambda orig={}: defaultdict(int, orig)
setdict = lambda orig={}: defaultdict(set, orig)
class SetOps(object):
def __init__(self, merge, diff, is_empty):
self._merge = merge
self._... |
fa1845b0158491d89f2fc4649eee4025bf0b8286 | efc4df632ff4f4c219c19ce91b4b1f9839deeb68 | /setup.py | bbd66704c488f05b17c5349f6e610f573eb5e0c8 | [
"Apache-2.0"
] | permissive | joeyism/py-dfault | a8d28c4f0ec148394feabafabcb0b855e4462ade | 4494f78884fcf37267617444e9757860dff6e659 | refs/heads/master | 2021-05-06T12:42:04.010913 | 2017-12-05T03:24:03 | 2017-12-05T03:24:03 | 113,124,842 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | setup.py | from setuptools import setup
version = "1.0.5"
with open("README.rst", "rb") as f:
long_descr = f.read().decode("utf-8")
setup(
name = "dfault",
packages = ["dfault"],
version = version,
description = "A simple lightweight class that allows the user to fallback on default values",
long_desc... |
8ca559a9de6e5b7d011ce51421087d13280f4a0e | 71ad22b74c4f331b5dd64a12669887cb03f0dd60 | /OfficeController.py | 93c367ecb1e7e93d2280928f548f3b0655f16423 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | rajindermavi/us-congress-pizza-flag-tracker | 80fb536f6f10aea7b63efe969bd6fbdad9c9aeb3 | 10827f3d6f2ef0cc434a475fc9782fc840cb81ab | refs/heads/main | 2023-08-28T04:23:14.587258 | 2021-10-28T13:51:25 | 2021-10-28T13:51:25 | 380,560,107 | 1 | 0 | null | 2021-06-26T17:28:09 | 2021-06-26T17:28:08 | null | UTF-8 | Python | false | false | 192 | py | OfficeController.py | import OfficeActions
def get_all_states():
return {"states": OfficeActions.get_states()}
def get_offices_by_state(state):
return {state: OfficeActions.get_offices_by_state(state)}
|
d90f7aad2659c33deb1ccc570b973d38d1a56747 | ed6aa555642714e1c329d79574b29e8b492dadb5 | /apps/article/FilmSpider/FilmSpider/utils/__init__.py | fc3eec0522233dbd36b16af1acf01043cd605b9f | [] | no_license | orangelewis/CLOnline | 0dc96bcf661883b818b761fa017540a4eb045e1a | 3d5d6b0f582f7d30e580bb66416a5bca6692c9dc | refs/heads/master | 2020-03-16T08:32:19.217726 | 2019-03-17T19:12:56 | 2019-03-17T19:12:56 | 132,597,837 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 75 | py | __init__.py | # -*- coding: utf-8 -*-
__author__ = 'CL'
__date__ = '2018/3/31 下午5:04' |
411a61dd1975b927008dd8b2be78d51255457879 | 7bf5983cef85c03c9fb9762862a83f601fba2029 | /tests/RoomDirectionsLookupTest.py | 6ec35b3b4dced6d8e20ffb4eec70d27456acee65 | [] | no_license | zoox101/SoonerGuide | 4476d424a9017e2962adfe7d72f48ad08ec693d8 | d17e90d4add035fbff3e28376d3ca2bc6e589ba1 | refs/heads/master | 2021-09-02T06:19:53.188334 | 2017-12-31T02:47:30 | 2017-12-31T02:47:30 | 105,075,429 | 2 | 2 | null | 2017-10-09T01:50:10 | 2017-09-27T22:22:51 | Python | UTF-8 | Python | false | false | 2,099 | py | RoomDirectionsLookupTest.py | import unittest
from src.room_directions import union_room_directions
from src.alexa_synonyms import union_room_synonyms
from src.Lambda import on_intent, ROOM_NAME_SLOT_KEY
def createIntentForLookingUpRoom(user_provided_room_name):
return {'intent': {'name': 'WhereIsMyRoom', 'slots': {ROOM_NAME_SLOT_KEY: {'value... |
d2f293e36122d953e42e4e110d1563045a4d2fa1 | a56ffb37c928c5498b096460c65246562580762c | /UpdateTable.py | a10d4f0ec0963a4596c33cbdc15c368f8b9695c0 | [] | no_license | djjohns/pysqlite3 | 6f1a8b75ceb14bb36c40601bf1e8a15c9948c8be | 6c57307519d4c45ce1728067e391e9deb1e498bd | refs/heads/master | 2020-12-03T07:14:16.233073 | 2016-09-19T03:55:47 | 2016-09-19T03:55:47 | 66,493,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 851 | py | UpdateTable.py | #!/usr/bin/python
#UpdateTable.py Written by David J Johns II
#https://github.com/djjohns
#Python script to change data in a database table's field
#from one thing to another for all entries in a DBTable.
import sqlite3
#------------------------------------------------------------------------------#
#connect to specif... |
1cd44793c3cc1f79ff969f040c87c1210414ff16 | ffc1cc3bb7b68335b115122fdc7924fc4e31d528 | /hun116.py | dd4c9778a5a187ff5ee4d82b2f218abf654f266c | [] | no_license | Rihanashariff/swathi24 | dba1dd3c3d2ff583ae431b432e0ef262bfeb3ac3 | 2b0d21f2febdd2a563e8f0affeebd5ca7a5821b8 | refs/heads/master | 2020-07-02T05:28:32.199982 | 2019-06-29T08:22:10 | 2019-06-29T08:22:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 251 | py | hun116.py | #
a,b = input().split()
s= ''
k=1
if len(a)>len(b):
m = len(a)
else:
m = len(b)
for i in range(0,m):
try:
s =s+ a[i]+b[i]
except IndexError:
if len(a)>len(b):
s += a[i]+str(k)
else:
s += str(k)+b[i]
k += 1
print(s)
|
2508f848c76a86a73953fd22975bd4a8521fb444 | 8051a2ca41b34a42cfd14409b9b7faf58bd90fc8 | /demos/client/setup.py | 0a717dbc317b933812ceb04a3a15d0400038fe8c | [] | no_license | dgquintas/libmpplas | 450ab7667521ab5b9241ddd6986b4693be5440da | d2bd9b752e0131186dcac9b261c9bc28289acb42 | refs/heads/master | 2021-01-15T18:14:17.584013 | 2010-01-12T22:46:22 | 2010-01-12T22:46:22 | 3,952,498 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | setup.py | # encoding: utf-8
from distutils.core import setup
setup(name='MPPlab',
version='0.0.1',
description='bla',
author='David García Quintas',
py_modules=['MPPlab'])
|
b38e991d7fa37442091bb696e5ff37663f5965c5 | e84f63e7c8a105c6da6e98802762646d4c34d139 | /pages/urls.py | 58d0ecae4131bfe203b70cee615d6029449c6335 | [] | no_license | ganeshkuikel/barber_project | dfed8591d94730427fd483500f2da4b73382c170 | 589ea1aaa1f0a653f35ca155095ba1e71d74fff9 | refs/heads/master | 2020-07-05T19:03:28.894825 | 2019-08-17T04:26:09 | 2019-08-17T04:26:09 | 202,739,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | urls.py | from django.urls import path
from . import views
urlpatterns=[path('',views.index,name='index'),
path('about',views.about,name='about'),
path('appointment',views.appointment,name='appointment'),
path('services',views.services,name='services'),
path('barbers',views.b... |
12c8e790b38fe32db06bf64b764b04efb3c5147d | eeb8077293fbca23e3caee87dd9f1eb01f7ffe12 | /pic.py | 54d28b2121381b8f3debf9d72d49874ea669402a | [] | no_license | yuxiaoyuan0406/Tsinghua-homework | 938473e0bf46ed09cd03095465db510a3474719f | 8e4ea9d270bd57196a3471cb2e225f08a5682ea3 | refs/heads/master | 2020-03-23T09:18:39.261384 | 2018-10-16T04:27:14 | 2018-10-16T04:27:14 | 141,379,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | pic.py | from PIL import Image
filename = input('input file:')
im = Image.open(filename)#.convert('L') # 打开图片,并处理成灰度图
x, y = im.size
im.resize((x//2, y//2))
im.save('new-' + filename, 'jpeg')
|
53a723f0e6c4fd1d77415e9d7dca7e0e53555f9a | 01d360be0804364f476d5fe6db8098ac209f3ab1 | /libs/acquirer.py | 110661ef145bf624838b8852ed747c59870b082f | [] | no_license | Annihilater/jinzhongbao | 8cedf76330880bb8abe83b24cf665a3f38791b65 | 824e0a4ccb5e4f0b98a50704541e2165e644c6e6 | refs/heads/master | 2022-12-17T05:48:32.696849 | 2019-03-13T09:58:14 | 2019-03-13T09:58:14 | 167,774,589 | 0 | 0 | null | 2022-12-08T01:34:48 | 2019-01-27T05:41:28 | Python | UTF-8 | Python | false | false | 1,507 | py | acquirer.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2019/3/5 13:47
# @Author: PythonVampire
# @email : vampire@ivamp.cn
# @File : get_jg_num.py
import os
from config import ACQUIRER_PATH, FOLDER_PATH
from data_base.database import db
from libs.gen_time import gen_current_time
from libs.switch_ac_type import swit... |
7d8cdbceb6c050e582cd19cfd33b06b99751fa2e | c28e02e70cc3f63e95ef6a4c3836a5951bc42c34 | /Assignment 2/Q1/ans1e.py | aa844db6feda1a7ba6ca86d13f3a2c578bcdf3c9 | [] | no_license | TapanBhardwaj/Machine-Learning | 5c07206acaf3d6409b2b890dbb21e0faed2a4665 | 689ad55906c62bf5142e2ea147b979680038c6ee | refs/heads/master | 2021-04-27T12:00:36.456370 | 2018-03-03T13:59:36 | 2018-03-03T13:59:36 | 122,572,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,555 | py | ans1e.py | ################################################################################
# #
# Code for question 1(e) #
# ... |
c613e9005208885388fe680838b210ed62bba4d3 | 4c499782655f8e929a5dd6b39d6c5d378fcfd7bd | /2dArray.py | 454ba1a7d7a5b49511c9bf5df09e60b84819e02b | [] | no_license | IanCBrown/practice_questions | 53a3fd66bee807f6e30e6d57632966f146c704c9 | 838b94c26cd3c26b76c3908277944a3b5f9bc7c7 | refs/heads/master | 2021-08-06T07:14:57.237709 | 2020-04-16T05:03:33 | 2020-04-16T05:03:33 | 149,521,025 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | 2dArray.py |
def main():
test = [[1,2,3],[4,5,6,],[7,8,9]]
if __name__ == "__main__":
main() |
ae20870a5555ae826ce7fa99edc0a33fa2af8391 | 79b677ddf8f56b5767245213d9f755c0053d3eec | /Python/enigma/__init__.py | e715af89646739a7c8396c30277b1a26ab354da3 | [
"MIT"
] | permissive | drecomx/tpm-examples | 2357f1a426b28759238cac7fdcad47b95bcf7edd | 995ecd12fc83db65eb6dc8079fd76f78220ffd5d | refs/heads/master | 2023-05-11T05:01:22.217396 | 2019-05-08T20:47:38 | 2019-05-08T20:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,956 | py | __init__.py | #!/usr/bin/env python
#
# Copyright (C) 2019 Dream Property GmbH, Germany
# https://dreambox.de/
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, incl... |
4450289683ae55d576d3963bac59dc1bae4bc376 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /iam_write_f/group-policy_attach.py | 85c771f198cf6857556a8fe7e86c4a2e524d1ec6 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 972 | py | group-policy_attach.py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... |
0cf15633687b79ab1477faeea75c3d553ab88ea5 | 5ecc6e59cf59c5e35d2820717d85b1218a3a9b86 | /month_5/2105. [모의 SW 역량테스트] 디저트 카페.py | 2b249a862bab87b58bf648872748e06f7a4ade1c | [] | no_license | sanggwon/Algorithm | 330ab528760707995541557814963755b42d9f86 | c12b99012c7e7bda7314f4a51b61a0eac6790fd5 | refs/heads/master | 2020-04-14T17:03:31.600780 | 2019-05-10T08:52:39 | 2019-05-10T08:52:39 | 163,968,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,685 | py | 2105. [모의 SW 역량테스트] 디저트 카페.py | import sys
sys.stdin = open('input.txt','r')
T = int(input())+1
for tc in range(1,T):
N = int(input())
arr = [list(map(int,input().split())) for _ in range(N)]
max_num = 0
for start_i in range(N-2):
# 맨 아래면 제외
for start_j in range(1,N-1):
# 왼쪽 면, 오른쪽 면 제외
next_i... |
d32786635aa6bc99a1077897b9d86893e1f902f4 | 7bbd42440c1e770873c6e44db8f6181f9124564b | /morphological_transformation_opencv.py | 058c5f8151be17456b5a5a220101734ea4f051f0 | [] | no_license | Aakash310/OpenCv-python | 877f9377c5c8934b650cfaaee75413ea168af861 | 63ec7ffb1c9ee0e02b2b0b208bdaebce0ad6015f | refs/heads/main | 2023-01-22T16:10:42.495941 | 2020-12-09T15:41:45 | 2020-12-09T15:41:45 | 301,620,600 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 886 | py | morphological_transformation_opencv.py | import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread("RBG_Balls",cv2.IMREAD_GRAYSCALE)
_, mask = cv2.threshold(img , 200 , 255 , cv2.THRESH_BINARY_INV)
kernal = np.ones((2,2),np.uint8)
dilation = cv2.dilate(mask , kernal , iterations=2)
erosion = cv2.erode( mask , kernal , iter... |
41325748e3ca6202aae4938dfbf99917338dcb96 | b051b2b650196a42f4e0db1bfb8fc900099a5526 | /chapters/02/02.py | 96698617106e6ff9a354a3736895f6c3a5c3210d | [] | no_license | MatthewKosloski/starting-out-with-python | 8f00096c2877e20949b634e5b7f6f66a61bfb5ad | c67fe7ba2375265bcc0b589f9a638d4e2b6d1d9c | refs/heads/master | 2021-05-10T11:25:53.372419 | 2018-04-21T08:45:30 | 2018-04-21T08:45:30 | 118,411,420 | 12 | 4 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | 02.py | # Program 2-2
print("Kate Austen")
print("123 Full Circle Drive")
print("Asheville, NC 28899") |
64af4d75da048cc9f3e69656e23ef466dd0ecec4 | 157352299236089b4c016ed814880b4e2cca9fa0 | /src/pychess/element/piecer.py | 29f0c7a7a123a0687f8af5852f7f6eddf8d6eaf8 | [
"MIT"
] | permissive | alok1974/pychess | f24b1c91e5e79344741f9a2b75651b1dc7661a23 | 5543fee708e217e8bfc14b5499c5cc196026b0bb | refs/heads/master | 2023-02-25T03:51:09.897437 | 2021-01-26T10:20:32 | 2021-01-26T10:20:32 | 290,102,143 | 2 | 0 | MIT | 2021-01-26T10:20:33 | 2020-08-25T03:24:08 | Python | UTF-8 | Python | false | false | 7,547 | py | piecer.py | import collections
from .. import constant as c
class Piece:
piece_attr = collections.namedtuple(
'piece_attr',
[
'worth',
'nb_pieces',
'move_paths',
'first_row_white',
'first_row_black',
]
)
piece_data = {
c.Pi... |
cee8b76a663e11556d9c4206ddd57ce9e85e2533 | d690307f2ed9d8bb9ede200be49537c50528e276 | /openfilesample02.py | 662f54c01b77d94033afd2074676783c40f1a61c | [] | no_license | janaque/pycharm_projects | bc985a5f994a01a685ad526d1feccee9a8f22ad0 | bea03ce30184d46a5753985a55d9cea634f9cd10 | refs/heads/master | 2020-03-28T05:13:14.140616 | 2018-09-07T07:20:40 | 2018-09-07T07:20:40 | 147,763,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | openfilesample02.py |
print(" ")
empFile = open("samplefile", "r")
print(empFile.readlines())
empFile.close()
print("==============================")
print("==============================")
empFile = open("samplefile", "r")
print(empFile.read())
empFile.close()
|
7353602db5d31baeb71ecef01e0bfa992b412acb | 2417cdceb80e884ebc997c00a4203202e1e4bfe6 | /src/57.insert-interval/57.insert-interval.py | cda408859c260c686702df0a464538c9b2bc7b5b | [
"MIT"
] | permissive | AnestLarry/LeetCodeAnswer | 20a7aa78d1aaaa9b20a7149a72725889d0447017 | f15d1f8435cf7b6c7746b42139225e5102a2e401 | refs/heads/master | 2023-06-23T07:20:44.839587 | 2023-06-15T14:47:46 | 2023-06-15T14:47:46 | 191,561,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,954 | py | 57.insert-interval.py | #
# @lc app=leetcode id=57 lang=python3
#
# [57] Insert Interval
#
# Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
# You may assume that the intervals were initially sorted according to their start times.
# Example 1:
# Input: intervals = [[1,3],[6,9]], newI... |
a34715d3d994e7cc3718b558a7e0c481b0d140bc | 1a0c93b28908cb6a22605ab237266c2570c1678c | /personal/FB/opt_sir.py | 876d31e52135f0ddefd7a139527e03bc0fee77b6 | [
"Apache-2.0"
] | permissive | riccardoscheda/Bologna-Against-COVID | eee4c0ea03aaee5fcbbabcfa68c414fbf609c3d7 | d7a77ee870b229e10ba1d50c7d18e6ba11577607 | refs/heads/master | 2023-02-03T13:13:29.460856 | 2020-12-23T09:04:43 | 2020-12-23T09:04:43 | 315,989,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,486 | py | opt_sir.py | #!/usr/bin/env python
# coding: utf-8
import numpy as np
from bayes_opt import BayesianOptimization
from scipy.integrate import odeint
class SIR():
""" SIR simulator class """
def __init__(self, S_0, I_0, R_0, N, t, gamma=1/17):
""" Initialization function
:param S_0: integer representing th... |
c22675c4335dfa880e12f0d3a364a42a5c42ecd6 | a898ac4431f2ada207a88b25399e63c81f54f65c | /preprocess/SpellRunner.py | b9532948ef4185119afd93e6f4f0df83e8bc2a5a | [] | no_license | Jiamin-WANG/Anomaly-Detection-on-IT-Logs | 49f1b28f176ed551fb81f20f3be1ff82964c892d | 17b3f75fd1af59df4cbb2c1a987a48a3b1978780 | refs/heads/master | 2020-09-17T03:56:41.916506 | 2018-11-05T02:27:48 | 2018-11-05T02:27:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | SpellRunner.py | import Spell
import sys
import numpy as np
sys.path.append('../')
input_dir = '/Users/necronet/Documents/repos/cse741/data'
log_format = '<Time> <Machine> <Daemon> <Content>'
log_file = 'logfilemarch-10K.csv'
taus = np.arange(0.1,0.9,0.2)
for tau in taus:
tau = np.around(tau,2)
output_dir = 'Spell_result-{... |
3602bcf4a89483b626b76be3a55808f3ec443996 | a805d3b96c3c7da822175b2baf7dea63ef9fa25b | /unused code/numpy_trials.py | caad6a5733221d7acb320273d83a9409b662aaa6 | [
"MIT"
] | permissive | patthomasrick/DTLIwANNy1 | 575b7922f81ada5674d215c623f6747d3c5ba922 | 19d41a67d7ed6fc54a2bc79b3944bec2522b70fb | refs/heads/master | 2021-01-22T07:52:02.364609 | 2017-09-04T03:56:58 | 2017-09-04T03:56:58 | 102,316,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | numpy_trials.py | #!/usr/bin/python
# pylint: disable=no-member
# pylint: disable=unused-variable
# pylint: disable=old-style-class
import numpy as np
a = np.array([
[0,0,0,1,0,0,0],
[0,0,1,0,1,0,0],
[0,1,0,0,0,1,0],
[1,0,0,0,0,0,1]])
section = a[:, 1]
rev_section = section[::-1]
... |
882af1588400ec9b2cd9b73b093b97a1257af406 | 4d930d520979b941161d7bd74d31db275a667f62 | /taros19_experiments/scripts/plotTrajectories.py | cf682a86810904eb5b6953b338fe8d44167c0c13 | [] | no_license | LCAS/iliad_experimental | ff8824dad4cceb2f250020f1ef71d9c97d45a78e | 6eb6c7db3b3909a22627b401807a32cb2c19c9d3 | refs/heads/master | 2020-08-02T10:53:37.336881 | 2020-06-18T14:59:13 | 2020-06-18T14:59:13 | 211,324,733 | 0 | 0 | null | 2020-06-18T14:59:14 | 2019-09-27T13:24:29 | Python | UTF-8 | Python | false | false | 3,603 | py | plotTrajectories.py | #!/usr/bin/env python
'''
NCFM tiny bags trajectory plotter.
Reads (tiny) bags made from NCFM experiments and plots human and robot trajectories.
/robot5/move_base/current_goal_odom
/robot5/online_qtc_creator/qtc_array
/robot5/people_tracker/positions
/robot5/robot_pose_odom
Task descriptions
1.1 Human crosses le... |
5fc40e28527be82ae1540467badd7847a0a7a0dc | f9fdc758f2cdc046b65eb13049e586765c848b97 | /django_project/book/urls.py | 9975eb3ec874ef3d43360e7fbf5e6151b74b9df5 | [] | no_license | Srltas/3-1-OpenSource_Project | 82744941d1db627d313a3dc2a313c282d4b6e8d5 | fc1b9b4a4d6af06677fd9d84ae7175cc8b7fa4d9 | refs/heads/master | 2022-11-14T00:35:22.959672 | 2020-06-28T15:27:53 | 2020-06-28T15:27:53 | 267,248,081 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | urls.py |
from django.urls import path
from . import views
app_name = 'book'
urlpatterns = [
path('<int:book_id>/', views.bookDetail, name='detail'),
] |
d6adce28bb8b872e7632ba6aa5d840d411b9f1c6 | a40b750f5b381e3849402fd53ffa7db26a6757ca | /chat/consumers.py | 9acfe1e266cf043e38b37867347437340bdc2f47 | [] | no_license | DontTouchMyMind/my_chat | eb788afb34d46ac88d06ff8b8b6adcd7ef356091 | a8b0acb8dc927daeae66c65232ed8e2af58a265d | refs/heads/main | 2023-01-14T00:18:42.148788 | 2020-11-17T07:48:37 | 2020-11-17T07:48:37 | 313,243,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,105 | py | consumers.py | import json
from channels.generic.websocket import WebsocketConsumer, AsyncWebsocketConsumer, \
JsonWebsocketConsumer, AsyncJsonWebsocketConsumer
from channels.consumer import SyncConsumer, AsyncConsumer
from channels.exceptions import StopConsumer
from asgiref.sync import async_to_sync
from channels.db import dat... |
a07ff5bc59ffda8e0dda6b12638d05fcd1f6ea48 | adbd744c7f9b60a87a99a7143e2a9979a3a1ef9b | /main.py | c8aa815f14755087bd0a54842684ac772ecee3c6 | [] | no_license | unodeej/OneDayRPG | 337b74e3bb66ed54c7498810a9769aaab354addb | 0695a885caa03557db0040ca660cbbb889f1c4b2 | refs/heads/master | 2020-12-04T07:51:08.187359 | 2020-04-06T06:47:27 | 2020-04-06T06:47:27 | 231,683,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | main.py | # import importlib
import storyPoints
import cliInput
import display as dis
import floorDisplay
import entity
import battle
class Game():
def __init__(self, firstStoryPoint):
self.firstStoryPoint = firstStoryPoint
self.storyPaused = False
self.pausedStoryPoint = None
self.player = entity.Player(5, 2, 0)... |
fede428d15802fbfa29fbac957890635e5ee887c | a1218c5e5093286f557d139f3dd89fda1bcd77de | /Scripts/1 Sample.py | 312bb870fbfd550cd881e115eb7416d733ed1d66 | [] | no_license | LucasMallmann/pandas-tutorial | 590d92fa89eefc9c6ca124fd6d92bd08ab538984 | e284929b2c2937787576451012ab02319046237f | refs/heads/master | 2020-03-28T11:34:47.575338 | 2018-09-10T22:46:21 | 2018-09-10T22:46:21 | 148,228,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | 1 Sample.py | import pandas as pd
stats = {'Day': [1, 2, 3, 4, 5, 6],
'Visitors': [43, 53, 68, 98, 102, 200],
'Rate': [85, 20, 46, 92, 85, 100]}
df = pd.DataFrame(stats)
df.set_index('Day', inplace=True)
print(df.head())
|
78114145055b32ad887314870b5ced17cbaa730c | e58e349b1e7899c23ebee143cd7fed9a079c3fcf | /src/Products/urban/tests/test_urbanconfig.py | 470e66fa76193f0405ca7a1d3cc15737d8595677 | [] | no_license | IMIO/Products.urban | 8ebfe1ae2166c36823e7b64d49ee42bccca80567 | 4d1cc1ab86fbf5e18d745b9297f0c6326c0f4811 | refs/heads/urban2.6.x | 2023-08-15T10:34:52.761734 | 2023-08-14T09:51:16 | 2023-08-14T09:51:16 | 125,059,498 | 1 | 1 | null | 2023-09-11T12:08:15 | 2018-03-13T13:54:30 | Python | UTF-8 | Python | false | false | 5,100 | py | test_urbanconfig.py | # -*- coding: utf-8 -*-
from Products.urban import URBAN_TYPES
from Products.urban.testing import URBAN_TESTS_CONFIG
from Products.urban.testing import URBAN_TESTS_CONFIG_FUNCTIONAL
from Products.urban.tests.helpers import BrowserTestCase
from plone import api
from plone.app.testing import login
from plone.testing.z2 ... |
e54e509c5bfbe129fd88101d860ff397fb6a4c85 | 0cff5e67c0bde76079ad99ff4723e8cd4218882f | /zednotification_bot.py | 5a58c17f8b066dcb46852670ba1e9679f1a95bb7 | [] | no_license | arag021/ZedRunner | ae6ae8a1734da07217d539b7996b04b23001b6db | 1392c6ad51499a000d95c8c9d27ae1c291df54ce | refs/heads/main | 2023-03-25T12:14:49.377718 | 2021-03-23T22:43:29 | 2021-03-23T22:43:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,074 | py | zednotification_bot.py | from telegram.ext import Updater, CommandHandler
from config import BOT
import requests
def start(update, context):
print(update.effective_chat.id)
context.bot.send_message(chat_id=update.effective_chat.id, text="I'm a zed notification board.")
class ZedNotification:
instance = None
@classmethod
... |
e1ad07d8d4663a2046a8cac8dfd720235953ce1d | ce18cf6bdb1a85a65a509597b4c0ec046b855186 | /2020年12月/汇总区间.py | 903f5d583bbd25b7dc1a59737304fdf1a43e91eb | [] | no_license | elssm/leetcode | e12e39faff1da5afb234be08e7d9db85fbee58f8 | a38103d2d93b34bc8bcf09f87c7ea698f99c4e36 | refs/heads/master | 2021-06-11T06:44:44.993905 | 2021-04-28T06:14:23 | 2021-04-28T06:14:23 | 171,072,054 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | 汇总区间.py | class Solution(object):
def summaryRanges(self, nums):
"""
:type nums: List[int]
:rtype: List[str]
"""
res = []
s = ""
if len(nums)==0:
return []
if len(nums)==1:
s = str(nums[0])
res.append(s)
return res... |
e4057fd08cab56d6239364ab38be5a562a36525d | 811b15868cbac940d447d97b861c450617b813a9 | /05/H1.py | f9aec3b42461b53150147c4b6f2a51047efdf126 | [] | no_license | weixue139/MH8811-G1901790D | 507c2150e85636638c8b2453e8e06b9d7048670a | 3d417121643a8947679c279ab9aefe6aa15aae14 | refs/heads/master | 2022-03-01T15:35:57.591746 | 2019-10-23T00:44:29 | 2019-10-23T00:44:29 | 208,812,315 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,003 | py | H1.py | ##################### Begining of Homework H1 by Wei Xue ################
#Import modules:
import json
#Define functions:
#User input function:
def ask_usr_input():
filename = input('Please enter the path to the json file:\n')
try:
fh = open(filename)
data = json.load(fh)
print('In... |
04b9503f3d579c48ccf60a02a2fc5f2f5d48cc9a | cabf13f77c7ce8b9423f1d38a2d83edfc2821974 | /step2_offline/my_metric.py | 54384939a693c3d89ba310aa79ef8f6c882dd526 | [] | no_license | SmallStom/NER | b81187b8ec3aec631791506860ae30544ac71a4f | 23b62e8106343a188a36dca7109ddb0257108494 | refs/heads/master | 2023-03-25T09:55:10.218036 | 2021-03-22T07:01:05 | 2021-03-22T07:01:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,006 | py | my_metric.py | from collections import defaultdict
from fastNLP.core.metrics import MetricBase
def _compute_f_pre_rec(beta_square, tp, fn, fp):
r"""
:param tp: int, true positive
:param fn: int, false negative
:param fp: int, false positive
:return: (f, pre, rec)
"""
pre = tp / (fp + tp + 1e-13)
rec... |
2838bddbe3cafd548497bc6af00235a45b9d23bd | 9b39b9d2ef9ca477ea9388eb7103fa42ce417a14 | /src/keyLocker.py | 7d73205f7b2adf7fc27b8d9a729e93e3abbe23d8 | [
"Apache-2.0"
] | permissive | joebobs0n/KeyLocker | 90444be0b8963ffe1aab02c5e8bc2ce3a6dd8b4e | 81ab6180a8e72b3a202243b8da0237fb1ca646a3 | refs/heads/master | 2023-03-02T18:51:25.772611 | 2021-02-04T08:25:23 | 2021-02-04T08:25:23 | 324,082,141 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,530 | py | keyLocker.py | #!/usr/bin/python3
from src.passGen import PasswordGenerator as pg
from pathlib import Path
from cryptography.fernet import Fernet
import json, re, os
def siteCleaner(site):
possible_tld = ''
site_cleaned = site
tld_path = Path('bin/domains')
if not tld_path.exists():
with open(tld_path, 'w... |
7e1b730c123352eb16e46a38c0e9a7c7ecc083b8 | 507af8f26ee9945416a06906342f7ba4965796d8 | /practice/kaprekar_constant.py | abeeed309e50616b6994b70ae6f5908dbf61bd4a | [] | no_license | Gauri013/Programming-Problems | 57e701a8cc0de7d360c5256e01560c8a7c844793 | f51cc741d609c235e690a4b22320af26d1389600 | refs/heads/master | 2020-06-16T10:09:08.790136 | 2019-09-03T10:16:29 | 2019-09-03T10:16:29 | 195,534,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 937 | py | kaprekar_constant.py | def kaprekar_constant(num):
old = num
maxNum = max_num(old)
minNum = min_num(old)
kap_num = maxNum - minNum
while(old != kap_num ):
maxNum = max_num(kap_num)
minNum = min_num(kap_num)
old = kap_num
kap_num = maxNum - minNum
print(kap_num)
def max_num(num):
li... |
8c7aa584aa83c0a665a5986cfc599e155b70e3a9 | b8fbc05b7c213671d38dfdec814a538cd17be8b6 | /algo_implementationsz/selection-sort.py | 10925e4b8624cacbe65cbf86a793f5b9e16aea31 | [] | no_license | MohammadRafik/algos_and_datastructures | cad2f54852e2e6ec19d742311356c36ff19e63a9 | 59b6806926aa859460e3cc5b8bcd8f37708afa8e | refs/heads/master | 2021-02-11T16:03:19.486116 | 2020-09-27T20:16:22 | 2020-09-27T20:16:22 | 244,507,615 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 422 | py | selection-sort.py |
def selection_sort(arry):
for i in range(len(arry)):
lowest_val_index = i
j = i + 1
while( j < len(arry)):
if arry[j] < arry[lowest_val_index]:
lowest_val_index = j
j += 1
tmp = arry[i]
arry[i] = arry[lowest_val_index]
arry[low... |
2da05e639ae9a16c39780dfeff59170bcdd9ae4a | c7339c5c87364e91a90922d244359965a511477c | /visamap/management/commands/_wikipedia_parser.py | 546da2563fc31fa003ed7e3296af3a3857aa3541 | [
"MIT"
] | permissive | MikeOrange/visa-requirements | e302b6e630802c817d52f2a105a6fb22057021c3 | 735d904a6220eb5c9d8f76f43c777d2d6339df1e | refs/heads/master | 2020-12-06T04:03:53.331008 | 2016-09-22T03:21:49 | 2016-09-22T03:21:49 | 67,376,488 | 1 | 1 | null | 2016-09-22T03:21:49 | 2016-09-05T00:50:57 | Python | UTF-8 | Python | false | false | 5,098 | py | _wikipedia_parser.py | from bs4 import BeautifulSoup
import requests
import re
BASE_URL = "https://en.wikipedia.org"
class PageParser(object):
"""
Base class of to parse Wikiedia pages using BeautifulSoup
"""
def __init__(self, url):
self._table = None
request = requests.get(
BASE_URL + url)
... |
68308b25dc585f6dcff0436289301ab093cb61d3 | 9d0f4579be8be3fd7cfc76058b31fea1e372acb3 | /genomel_viz/genomel_gt_summary.py | 2cbf158bd15dc09754289ae2b64b3575ebc5853e | [
"Apache-2.0"
] | permissive | uc-cdis/planx-bioinfo-tools | 3fe76d90bc0ee69d80f474b39114a96562c6261c | cba4ca3f5955175d7fa7f72fe3774855d3676127 | refs/heads/master | 2022-10-23T17:54:13.593353 | 2022-10-17T19:23:12 | 2022-10-17T19:23:12 | 136,051,459 | 5 | 5 | Apache-2.0 | 2022-10-17T19:23:13 | 2018-06-04T16:14:48 | Python | UTF-8 | Python | false | false | 688 | py | genomel_gt_summary.py | import pandas as pd
summary=pd.read_csv('mel_pos_gt_summary.tsv', sep='\t')
summary.columns=['pos','homo_ref_count','het_count','homo_alt_count']
summary['homo_ref']=summary['homo_ref_count']/(summary['homo_ref_count']+ summary['het_count']+summary['homo_alt_count'])
summary['het']=summary['het_count']/(summary['ho... |
3f22fa01b9e13ead4c0d5823daa2ccda2c95d11b | 6c83e8c4a2b5d5bba7aaf24d17560d9907b87015 | /projects/urls.py | d19c3d2aac71b59e6a5e869c913703ba016656a1 | [] | no_license | AmmarHazem/project-tasks | 312f1155ba3f316f1eb77c2c0c732b8345f09e8c | 476c0fe8b8b0b3679639df8cad2b104a7079e3db | refs/heads/master | 2022-05-04T17:09:20.214363 | 2019-07-25T12:16:01 | 2019-07-25T12:16:01 | 195,140,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | urls.py | from django.urls import path, re_path
from projects import views
app_name = 'projects'
urlpatterns = [
path('create-project/', views.ProjectCreate.as_view(), name = 'create'),
path('delete-project/<int:pk>/', views.ProjectDelete.as_view(), name = 'delete'),
path('update-project/', views.ProjectUpdate.as_v... |
3362fdb958b1044c05d5372ba1340592277d9ec0 | 11942bea2b40fd995c7ab0dd1b90e02b4c96bb9b | /Article_clustering_app.py | cb09c64f36d974429c963dd729e70fd01e7b083a | [] | no_license | Lucile-S/Exploration_info_pdf | 5ad20dfdd5cffe324a4643c2a078a2b574e481dc | e6def3ee8cd085ce57f6abf622ec7702d500b848 | refs/heads/master | 2022-12-20T14:14:28.319364 | 2020-10-19T16:06:46 | 2020-10-19T16:06:46 | 299,241,449 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,066 | py | Article_clustering_app.py | # -*- coding: utf-8 -*-
# Article_clustering_app.py
# homemade package
import sys
sys.path.append('./src')
# Api package
import streamlit as st
# basic packages
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import logging
import os
import re
import glob
from collecti... |
0f82cf88d468b4e7f1e707a9c7698f43d6e1331d | 9401884f269a1fd2f418b6fedaec5ccc89ac0416 | /IPM_MVIP/object_model.py | 6d7bd1c7eac527b2d355f524d9597228a4da3d7d | [] | no_license | burnmg/IPM-MVIP | 25209ff6f828011d8da1362707e8ba0ae89d7b92 | a69cae96b10ebbf2fe840ddfe29ba06abb83b13e | refs/heads/master | 2021-01-17T12:35:58.307896 | 2016-07-07T07:16:38 | 2016-07-07T07:16:38 | 56,376,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,995 | py | object_model.py | class UnknownEquationPair: # a pair structure of Equation
def __init__(self, equation1, equation2):
self.equation1 = equation1
self.equation2 = equation2
class UnknownEquation: # This class represents the equations contains the unobservable variables.
def __init__(self, dependent_variable,... |
9ec014c225016af60f44eea4d20236e35548b9e2 | 7bd189d53de39ca38dd0ca01620cfef95b1e3c2b | /flaskDemo/app/api/test.py | b217dc813917b99a5cff3a01c7d6eb9edb92037a | [] | no_license | dandelion-xuan/homepage | 9b157e27afb9171b023dd7edcb9ec7a287eba39e | 40f74e08fd23b896af354977b330004282c600a9 | refs/heads/master | 2021-11-27T03:29:33.706946 | 2021-11-13T05:55:41 | 2021-11-13T05:55:41 | 173,698,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | test.py | from server.server import app
from flask import Blueprint,send_file
from flask import jsonify
# test_api = flask.Blueprint('test', __name__, url_prefix='/test')
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/test/<name>/<words>',methods=['GET'])
def test(name,words):
# return send_file(".... |
03f9a9448cc37e3812b53966bf01593de95afc29 | a4c0cad77c47a13cc807e66bf226ae479080e6e4 | /c4bot/c4board.py | 388c2bbf09b31961988db796dc188e089f4c8683 | [] | no_license | mdm/connect-4-bot | 0164682f536c2df046ae40ce9b0f31d0e29d0156 | 98c208d8fa394fa1d5371948f185790d2ff6cfa9 | refs/heads/master | 2023-01-09T02:44:24.679789 | 2020-04-25T11:17:14 | 2020-04-25T11:17:14 | 170,518,288 | 0 | 0 | null | 2022-12-26T20:59:04 | 2019-02-13T14:07:38 | Python | UTF-8 | Python | false | false | 2,577 | py | c4board.py | import copy
from c4bot.c4types import Player
class Board():
def __init__(self):
self.grid = []
for _ in range(6):
self.grid.append([None] * 7)
self.heights = [0] * 7
def get(self, x, y):
if x < 0 or x > 6 or y < 0 or y > 5:
return None
return se... |
b251eea312557abbda3aceb515f13339ab6f87b1 | 59a1674085f05f5a9bc27e2f44879593f5f5e7a0 | /Image_processing/11.thresholding/otsu_thresholding.py | 68a9514aea255289fb6ed87e0871b68ff1a17f72 | [
"MIT"
] | permissive | rozario-lamperouge/deep_learning | 806a2c606bcc9917eb2db623a2d7ae78c2cbe97f | c07a4a0a0408537c3272dbdc7c0b6abbc0690da2 | refs/heads/master | 2022-05-12T21:55:33.727906 | 2022-04-28T12:57:09 | 2022-04-28T12:57:09 | 237,574,484 | 0 | 1 | MIT | 2020-02-01T06:43:07 | 2020-02-01T06:43:06 | null | UTF-8 | Python | false | false | 792 | py | otsu_thresholding.py | # USAGE
# python otsu_thresholding.py opencv_logo.png
# import the necessary packages
import sys
import cv2
#Get the image
img = sys.argv[1]
# load the image, convert it to grayscale, and blur it slightly
image = cv2.imread(img)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blurred = cv2.GaussianBlur(gray, (7, 7), ... |
95a6d54a0db660003affef69cec831c0f6ed7003 | ec878aa5485256113e62f340e1daa93fe23c7b7c | /tha2/nn/eyebrow/eyebrow_morphing_combiner_00.py | 0bc0d0fadae2379225667c1448c0637148f11f3d | [
"MIT",
"CC-BY-4.0"
] | permissive | graphemecluster/talking-head-anime-2-demo | 1f8772731465ed2b66569b8d1757384d95398b21 | bf1929b596c72e3140792296b67860f564a74bfb | refs/heads/main | 2023-04-17T19:28:03.994360 | 2021-04-14T09:00:52 | 2021-04-14T09:00:52 | 357,831,229 | 2 | 2 | MIT | 2021-04-14T08:29:14 | 2021-04-14T08:29:13 | null | UTF-8 | Python | false | false | 4,921 | py | eyebrow_morphing_combiner_00.py | from typing import List, Optional
import torch
from torch import Tensor
from tha2.nn.backbone.poser_encoder_decoder_00 import PoserEncoderDecoder00Args, PoserEncoderDecoder00
from tha2.nn.util import apply_color_change, apply_grid_change, apply_rgb_change
from tha2.nn.batch_module.batch_input_module import Bat... |
930a04fb3abc09f6d5a5fede5cc66017184301a3 | dbcb0c7745bd4053bee99ca3f491d74806039b41 | /migrations/versions/c41189ad3350_.py | 38ded00d06dc3c3634cedb480949e8e9cfd7c5a7 | [
"MIT"
] | permissive | Maethorin/concept2 | 90a3e6c8b372a68c6115c79849e48a6301afc26b | 05d64805388126a6fb1c412a3fe290b5fa7ed117 | refs/heads/master | 2021-01-17T06:03:33.905372 | 2017-03-26T21:09:49 | 2017-03-26T21:09:49 | 49,681,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | c41189ad3350_.py | """empty message
Revision ID: c41189ad3350
Revises: 0fd7e4abed38
Create Date: 2016-09-17 23:32:35.481098
"""
# revision identifiers, used by Alembic.
revision = 'c41189ad3350'
down_revision = '0fd7e4abed38'
from alembic import op
import app
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upg... |
a5d24ac77b2f3c19102b84a7eceff3bb166fd896 | 65e5d296261be004b266b4e8be6010fe0502a448 | /rally/protocol/serverprotocol_pb2.py | a519c7c7bd12f36dc2ac633acc52f6db5d072c0e | [] | no_license | markusstorm/rebusVrally | cedc5ed1dcecb77ef7cf42298cc99cd8d1a72637 | d3462b05dccee2f802f5b1419da3671921d68088 | refs/heads/master | 2022-07-02T22:28:35.680523 | 2020-05-12T18:06:15 | 2020-05-12T18:06:15 | 255,634,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 6,795 | py | serverprotocol_pb2.py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: serverprotocol.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _s... |
937b222344ff625317543991214b6cda0625ff84 | af6b3ba98d7a6064696382a84d72e325be65f6be | /gitcache/__main__.py | 124a4bb6a884bef286b132982c85a2bb14f7bd38 | [] | no_license | fishface60/python-gitcache | 11bbd32ce4f821a4097c226adacb06c1177bb90a | 88db92071a031b5464cf757df4534a10417f7baa | refs/heads/master | 2021-01-10T11:43:14.770513 | 2015-11-24T19:26:09 | 2015-11-24T19:26:09 | 44,865,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,698 | py | __main__.py | #!/usr/bin/python
'''CLI for performing git operations with a cache.'''
from argparse import ArgumentParser, REMAINDER
from errno import EAGAIN
from itertools import chain
from os import close
from select import select
from shutil import copyfileobj
from subprocess import Popen
from sys import stdout, stderr
from te... |
6edfd9f77a56cb51f5f83cc6d15c9f6880b9f70d | ea24bb06b86ffc8c97d3c7beb28786ab79ac0282 | /tutorials/09_trap_spaces.py | bb558b1b3cd443e9f76889e668dfa44e142bc456 | [] | no_license | chopper6/pyboolnet | c9b7a4e67dad454e660231ed91fb806f1666bdd5 | 46227159b8ddeaa8c35cf7bf96010ae0e29ea1f7 | refs/heads/master | 2023-08-05T20:43:51.324617 | 2021-09-12T09:55:18 | 2021-09-12T09:55:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | 09_trap_spaces.py |
from pyboolnet.repository import get_primes
from pyboolnet.trap_spaces import trap_spaces, steady_states
if __name__ == "__main__":
# compute minimal and maximal trap spaces
primes = get_primes("remy_tumorigenesis")
mints = trap_spaces(primes, "min")
print(len(mints))
max_trap_spaces = trap_sp... |
b8349a8442ef763d1a11a8f9411de773022308d7 | 79aeb596a98c173d0ee2d3a1b7775816bae3dd65 | /wxapp/apps.py | 4fe77884c9a8dfa876a74d946abf8ede826c353b | [] | no_license | PyZyyong/users | 048076828cce1d9d371bef1ac9169191bd9b09b6 | 8638c67de5db3160920e6b0cb5bfc1a0103b6e66 | refs/heads/master | 2020-03-27T12:25:48.665848 | 2018-08-29T04:40:54 | 2018-08-29T04:40:54 | 146,545,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | apps.py | from django.apps import AppConfig
class WxAppConfig(AppConfig):
name = 'b2c.wxapp'
class WxMerchantConfig(AppConfig):
name = 'b2c.wxapp'
verbose_name = "小程序商户"
|
86876ed65c3335d83d3812681237d5fbf3ea0c81 | c8fb79c4871609e5833fce42215d2e549b0dabf6 | /extra/3D_show.py | 386f8a9493071c41514e3f3d6015d64798c2a330 | [] | no_license | guoqi1123/focaltrack | 396380948de3693ca2a3f24ebedb31967bb1f8ad | c41f259bfbe2a58395b2f2371efd47ad4ba6ccdb | refs/heads/master | 2021-10-02T17:38:41.928203 | 2018-11-29T21:17:13 | 2018-11-29T21:17:13 | 100,521,842 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,630 | py | 3D_show.py | # demonstrate the 3D models
import numpy as np
import pickle
import json
import os, glob
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3... |
57cbe8abbd6b7fdc766ee258fb82241d033804d7 | fdbf280ff131545aaf0251d4f362ec77433dd39c | /utilities/GenericMethods.py | b7a871869a82999af88468e79703773d0097bc10 | [] | no_license | donjoseph/appium-python-pytest | 004cb9f7500f18f550069a95e2dd82ec10d5d66e | c4aa16257012dececed4b176b9c098be68394409 | refs/heads/master | 2022-06-19T17:40:18.911646 | 2020-05-06T03:31:41 | 2020-05-06T03:31:41 | 261,641,639 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,870 | py | GenericMethods.py | import datetime
import random
import names
from dateutil.relativedelta import relativedelta
from faker import Faker
def createSampleUsersWeb(noOfUsers=3):
sampleData = []
locations = ["Chicago", "San Francisco", "Atlanta"]
location, firstName, lastName, email, password, phoneNumber = \
"location",... |
f0ab113a7824f80ec20e52ce070ead29745fb589 | 80f9de3edc26a55b8a430ee8290af966907af630 | /core/command_factory.py | 28b3534ce61fc6607062b486c46db76566785b93 | [] | no_license | dan7x/ig-bot | 69d15d161a11fcb7247b6e3144d5a7da049e8eee | 22dfe8e005e09f11d7ea6d7c4c8c54db1aaa1db2 | refs/heads/main | 2023-07-01T18:10:03.085141 | 2021-08-06T21:18:45 | 2021-08-06T21:18:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,606 | py | command_factory.py | import inspect
import core.INTERNAL as INTERNAL
import core.default_behavior as default_behavior
from core.exceptions import (BuiltinBadOverrideException,
BuiltinCommandConflictException,
BuiltinOverrideArgumentException,
CommandParameterException,
DuplicateCommandException,
KeywordArgumentException)
from config import... |
aa86fd425d18cd750bcc313293403a1e0cc04ca9 | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/playground/eren/2011/server/nagios-core/comar/package.py | 7e9b5aa3ff7e525729a59c72ee9e9b103d791412 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | package.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("chown -R nagios:nagios /var/nagios/rw")
os.system("chmod ug+s /var/nagios/rw")
os.system("chown -R nagios:nagios /var/nagios")
os.system("find /usr/lib/nagios -type d -pri... |
17155b417ad713a3b7cac2e143c2cf50e1d8f6a7 | 387ec880a1a2cec70d7a6b7403bbd00ec6263fdb | /tmva/inputvars.py | ef67fdf8620ef83abb945550a4fa4186e202cff4 | [] | no_license | lbel/Bs2DsKTools | 091fe4c9ebe63e7eabd723b96fad97d9530f4192 | 454fd8e46f628c0292f4fb05a95014d0ad14ad60 | refs/heads/master | 2021-01-15T09:03:32.623191 | 2014-10-13T11:21:22 | 2014-10-13T11:21:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,582 | py | inputvars.py | #!/usr/bin/env python
"""Different input variable plots.
1) Distributions after different transforms (transforms.pdf).
2) Linear correlation coefficients for different transforms
(correlations.pdf).
3) Scatter and profile plots for different transforms
(correlations_<transform>.png).
"""
impor... |
6ba26db3f3a16af4be13483feb0569210bf61101 | 547d98fc0f41e73f6a1788a2f42d91b0104c6d58 | /tree.py | 9ba8dd6e69f09aa43dbf2163dd6a66c116a5fbf6 | [
"MIT"
] | permissive | dojojon/py_turtle | ab16ffe646af74e3f8e8a3827de2215f5ef2d458 | 8b2b4d2dca3785d35fbfc94ac480e8451b372dda | refs/heads/master | 2020-06-12T17:01:15.139084 | 2019-06-29T07:01:07 | 2019-06-29T07:01:07 | 194,366,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | tree.py | from turtle import *
from random import randint
speed(0)
def draw_branch(len):
if(len > 5):
color("brown")
forward(len)
right(25 )
draw_branch(len - randint(4,10))
left(50)
draw_branch(len - randint(4,10))
right(25)
color("brown")
backwa... |
319b06dc660011fda06e714108e41f21fa9c11fa | 2d87f9b448fe4c3112697b6cc35855a7b94bba27 | /all_code_May_5_2014/Real_Image_Smoothing/src/root/amd_plot.py | e895dc3a7a2b1e8da6c7308405cd4aa531c3d3a9 | [] | no_license | ke0m/Senior_Design | 6e6e714ac39d993eb15fb55e02d31a26eaeec91b | 5096d06373abc960140e70cdcc0924fa70470008 | refs/heads/master | 2021-01-23T17:18:50.528594 | 2015-01-03T03:08:15 | 2015-01-03T03:08:15 | 11,941,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,464 | py | amd_plot.py | '''
Created on Apr 27, 2014
@author: Joseph Jennings
'''
from java.awt import *
from java.lang import *
from java.nio import *
from javax.swing import *
from java.util import *
from edu.mines.jtk.awt import *
from edu.mines.jtk.dsp import *
from edu.mines.jtk.io import *
from edu.mines.jtk.mosaic import *
from edu.... |