index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
40,175
onkelrow/First
refs/heads/master
/sd_files_vorbereiten.py
import json import urllib, httplib import sys import getpass import arcpy import os import codecs def main(argv=None): # Ask for admin user name and password username = raw_input("Enter user name: ") password = getpass.getpass("Enter password: ") # Ask for server name and the port serverNa...
{"/osgeo.py": ["/gdal.py"]}
40,176
onkelrow/First
refs/heads/master
/getstatistics.py
__author__ = '53_e_rv' __author__ = 'Administrator' # Queries the logs and writes statistics on map service activity during the past 24 hours # For Http calls import httplib, urllib, json # For system tools import sys, time # For reading passwords without echoing import getpass #Defines the entry point...
{"/osgeo.py": ["/gdal.py"]}
40,177
onkelrow/First
refs/heads/master
/find and replace.py
# #import arcpy # import arcpy, os # # for root, dirs, files in os.walk(r"C:\Project"): # # for f in files: # if f.endswith(".mxd"): # mxd = root + '\\' + f # #analysis = arcpy.mapping.AnalyzeForMSD(mxd) # #mxd = arcpy.mapping.MapDocument(r"C:\Users\Administr...
{"/osgeo.py": ["/gdal.py"]}
40,178
onkelrow/First
refs/heads/master
/ArcPy testdatasources.py
import arcpy, os, sys, string, codecs # def encode(text): # """ # For printing unicode characters to the console. # """ # return text.encode('utf-8') #Remove temporary connection file if it already exists # sdeFile = r"C:\Project\Output\TempSDEConnectionFile.sde" # if os.path.exists(sdeFile)...
{"/osgeo.py": ["/gdal.py"]}
40,179
onkelrow/First
refs/heads/master
/Publish arcgis server service -internet.py
#import modules import arcpy, sys, os, string #specify folder containing MXDs inFolder = raw_input("Please enter folder containing 10.2 MXDs to Publish to ArcServer: ") #specify connection FiMichael Hoffnerle Path connectionFilePath = r'C:\Users\53_e_rv\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog\arcgis on 10....
{"/osgeo.py": ["/gdal.py"]}
40,180
onkelrow/First
refs/heads/master
/raster reproject.py
import arcpy, sys InFolder = sys.argv[1] OutFolder = sys.argv[2] OutSR = arcpy.SpatialReference(32750) # "WGS_1984_UTM_Zone_50S" arcpy.env.workspace = InFolder for Ras in arcpy.ListRasters(): arcpy.AddMessage("Projecting " + Ras) arcpy.ProjectRaster_management(InFolder + "\\" + Ras, OutFolder + "\\" + Ras, ...
{"/osgeo.py": ["/gdal.py"]}
40,181
onkelrow/First
refs/heads/master
/stageService.py
# --------------------------------------------------------------------------- # stageService.py # Created on: 2014-10-30 # Usage: # Description: # --------------------------------------------------------------------------- # Set the necessary product code # Import arcpy module import arcpy, sys, os, stri...
{"/osgeo.py": ["/gdal.py"]}
40,182
onkelrow/First
refs/heads/master
/Monika upload.py
__author__ = 'Administrator' import arcpy, os#workspace to search for MXDs Workspace = r"C:\temp" arcpy.env.workspace = Workspace #list map documents in folder mxdList = arcpy.ListFiles("*.mxd") #set relative path setting for each MXD in list. for mapdoc in mxdList: #set map document to change filePath...
{"/osgeo.py": ["/gdal.py"]}
40,183
onkelrow/First
refs/heads/master
/dbtune export import.py
import arcpy ent_gdb = "C:\\gdbs\\enterprisegdb.sde" output_file = "C:\\temp\\keyword.txt" arcpy.ExportGeodatabaseConfigurationKeywords_management(ent_gdb,output_file)
{"/osgeo.py": ["/gdal.py"]}
40,184
onkelrow/First
refs/heads/master
/Python script for reconsile and post ArcSDE 102.py
import arcpy, time, smtplib #workspace definieren arcpy.env.workspace = 'database Connections/connection to geo.sde' #workspace in variable überführen workspace = arcpy.env.workspace # Liste der angemeldeten Geodatabase_user userList = arcpy.ListUsers("Database Connections/admin.sde") # Liste aller angem...
{"/osgeo.py": ["/gdal.py"]}
40,185
onkelrow/First
refs/heads/master
/osgeo.py
def setupgdal(): GDAL_PATH = "C:\\Program Files (x86)\\GDAL" if not os.path.isdir(GDAL_PATH): print("GDAL not found on system at {0}".format(GDAL_PATH)) return False _environ = dict(os.environ) _environ["PATH"] = "{0};{1}".format(GDAL_PATH, _environ["PATH"]) _environ["GDAL_DATA"] = "...
{"/osgeo.py": ["/gdal.py"]}
40,186
onkelrow/First
refs/heads/master
/arcsde reconsile and post.py
import arcpy, time, smtplib # set the workspace arcpy.env.workspace = 'Database Connections/admin.sde' # set a variable for the workspace workspace = arcpy.env.workspace # get a list of connected users. userList = arcpy.ListUsers("Database Connections/admin.sde") # get a list of usernames of users curren...
{"/osgeo.py": ["/gdal.py"]}
40,187
onkelrow/First
refs/heads/master
/gdal.py
from osgeo
{"/osgeo.py": ["/gdal.py"]}
40,188
onkelrow/First
refs/heads/master
/spatialreference.py
import arcpy sr = arcpy.SpatialReference(r"C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1983\NAD 1983 UTM Zone 10N.prj") mxd = arcpy.mapping.MapDocument("current") df = arcpy.mapping.ListDataFrames(mxd)[0] df.spatialReference = sr
{"/osgeo.py": ["/gdal.py"]}
40,189
onkelrow/First
refs/heads/master
/update services in context_2.py
print "service definition draft created" arcpy.AddMessage("service definition draft created") # Set local variables inSdFile = sd con = "GIS Servers/arcgis on HPWS32_6080 (admin)" inServer = con inServiceName = 'districtwise' inServiceName = InSdFile inCluster = "...
{"/osgeo.py": ["/gdal.py"]}
40,190
SheLily/Spy-Project
refs/heads/master
/vk_spy.py
import requests from settings import User, Token, V BASE_PARAMS = { 'access_token': Token, 'v': V } def get_request_params(base_params=BASE_PARAMS, **kwargs): base_params.update(kwargs) return base_params def get_request(method, params): url = f'https://api.vk.com/m...
{"/vk_spy.py": ["/settings.py"], "/main.py": ["/vk_spy.py", "/file_ops.py", "/settings.py"]}
40,191
SheLily/Spy-Project
refs/heads/master
/main.py
import time import tqdm import vk_spy import file_ops from settings import User, Token, V, Request_time def main(): user = vk_spy.get_id_by_name() usr_groups = vk_spy.get_groups(user) set_usr_group = vk_spy.get_groups_set(usr_groups) usr_friends = vk_spy.get_friends(user) pbar ...
{"/vk_spy.py": ["/settings.py"], "/main.py": ["/vk_spy.py", "/file_ops.py", "/settings.py"]}
40,192
SheLily/Spy-Project
refs/heads/master
/file_ops.py
import json def save_results(data, fname): with open(fname, 'w', encoding='utf-8') as fout: json.dump(data, fout, ensure_ascii=False)
{"/vk_spy.py": ["/settings.py"], "/main.py": ["/vk_spy.py", "/file_ops.py", "/settings.py"]}
40,193
SheLily/Spy-Project
refs/heads/master
/settings.py
User = 'eshmargunov' Token = ('958eb5d439726565e9333aa30e50e0f937ee432e927f0dbd541c541887d919a7c56' 'f95c04217915c32008') V = '5.107' Request_time = 1 / 3
{"/vk_spy.py": ["/settings.py"], "/main.py": ["/vk_spy.py", "/file_ops.py", "/settings.py"]}
40,210
badre-Idrissi/tpPython
refs/heads/master
/exemple1.py
value = input("voulez vous le dessert: (True/False)") if value = "True": print("voici la carte") else: print("Au revoir")
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,211
badre-Idrissi/tpPython
refs/heads/master
/exception_finally.py
def calcul(a,b): try : fichier = open("menu.txt",'r') lines = fichier.readlines() x = a/b if x==0: print("zero") else : pass return lines except ZeroDivisionError: pass print("apres pass") finally: fichier.close...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,212
badre-Idrissi/tpPython
refs/heads/master
/exceptions.py
dict_ = {"cle":12,"cle2":13} def ouvrirFichier (): try: fichier = open("menu.txt",'r') lines = fichier.readlines() except FileNotFoundError: return (False, "erreur") else: print("aucune exception n'est declanché") return (True, lines) success, result = ouvrirFichier...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,213
badre-Idrissi/tpPython
refs/heads/master
/fizzbuzz2.py
n=int(input("saisir n :\n")) print((((n,"Fizz")[n%3==0],"Buzz")[n%5==0],"FizzBuzz")[n%15==0])
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,214
badre-Idrissi/tpPython
refs/heads/master
/modules/pizza.py
class Pizza(object): def __init__(self, name): self.name = name self.prix = 0 self.ingredients = [] self.qte = 0 def getName(self): return self.name def addIngredient(self, ingredient): self.ingredients.append(ingredient) def removeIngredient(self, ingr...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,215
badre-Idrissi/tpPython
refs/heads/master
/pizzeria_python_poo.py
from modules.menu import Menu from modules.pizza import Pizza menu = Menu() def saveMenu(file_path, menu): ##sauvegarder le menu dans le fichier file_path fichier = open(file_path, 'w') fichier.write("menu :\n") fichier.write(str(menu)) fichier.close() def getMenuFromFile(file_path): ##recu...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,216
badre-Idrissi/tpPython
refs/heads/master
/nbPremiers2.py
n=int(input("saisir un nombre")) for nb in range(2,n) : premier=True for div in range(2,nb) : if nb%div==0 : premier=False break; if premier : print(nb)
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,217
badre-Idrissi/tpPython
refs/heads/master
/fizzbuzz3.py
while True : n=input("saisir n :\n") if n=="exit": break n=int(n) print((((n,"Fizz")[n%3==0],"Buzz")[n%5==0],"FizzBuzz")[n%15==0])
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,218
badre-Idrissi/tpPython
refs/heads/master
/nbPremiers.py
n=int(input("saisir un nombre")) i=2 while(i<n): j=2 while(j<=i): if(i%j==0): break; else : j+=1 if(j==i): print(i) i+=1
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,219
badre-Idrissi/tpPython
refs/heads/master
/POO.py
import datetime class Personne(object): def __init__(self, nom, prenom, dateNaissance): self.nom = nom self.prenom = prenom self.dateNaissance = dateNaissance def saluer(self): print(f"Salut {self.nom}") def displayPersonne(self): print(f"Hello {self.nom}") def ...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,220
badre-Idrissi/tpPython
refs/heads/master
/pizzeria_python.py
menu={"Napo":[["anchois"],12,2]} def saveMenu(file_path, menu) : ##sauvegarder le menu dans le fichier file_path fichier = open(file_path, 'w') fichier.write("menu :\n") fichier.write(str(menu)) fichier.close() def getMenuFromFile(file_path): ##recuperer le menu du fichier file_path print("getMenu") def helpAd...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,221
badre-Idrissi/tpPython
refs/heads/master
/application1.py
nom = input("sasissez le nom : \n") msg= "Bonjour "+nom print(msg);
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,222
badre-Idrissi/tpPython
refs/heads/master
/application2.py
nom = input("sasissez le nom : \n") genre_val=input("saisir le genre :\n") #genre= ("Monsieur" if genre_val=="1" else "Madame") genre=("Monsieur", "Madame")[genre_val=="0"] msg= "Bonjour {} {}" print("Bonjour {} {}".format(genre,nom))
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,223
badre-Idrissi/tpPython
refs/heads/master
/fonction1.py
def cap_(s): s1 = str(s[0]).upper() s2 = str(s[1:]).lower() return s1+s2 def cap(s): result="" for elem in s.split("."): result = result + "."+cap_(elem) return str(result[1:]) def operation(*args): liste_int = [x for x in args if type(x) is int] if len(liste_int) == 0: ...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,224
badre-Idrissi/tpPython
refs/heads/master
/fizzbuzz.py
n=int(input("saisir n :\n")) if n % 15==0: print("FizzBuzz") elif n % 5==0: print("Buzz") elif n % 3==0: print("Fizz") else: print(n)
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,225
badre-Idrissi/tpPython
refs/heads/master
/modules/menu.py
class Menu(object): def __init__(self): self.pizzas = [] def addPizza(self, pizza): self.pizzas.append(pizza) def removePizza(self, pizza_name): for pizza in self.pizzas: if pizza.getName() == pizza_name: self.pizzas.remove(pizza) def getPizza(self,...
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,226
badre-Idrissi/tpPython
refs/heads/master
/raiseException.py
class NegativeValueException(Exception): pass def calculAge(annee): try: annee = int(annee) print("valeur ok") if(annee <= 0): print(annee) raise NegativeValueException("valeur negative") except ValueError as err: print(err) calculAge(200)
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,227
badre-Idrissi/tpPython
refs/heads/master
/STR.py
class SrtMultiplicationException(Exception): pass class Str(str): def __mul__(self, other): if(type(other) is int): raise SrtMultiplicationException("Multiplication Interdite") s = Str("toto2") s2 = Str("toto2") print(s==s2) #print(s*2)
{"/pizzeria_python_poo.py": ["/modules/menu.py", "/modules/pizza.py"]}
40,239
gasti10/finalProject
refs/heads/master
/animals/migrations/0010_auto_20200729_1132.py
# Generated by Django 3.0.8 on 2020-07-29 14:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('vincular', '0001_initial'), ('animals', '0009_auto_20200728_1115'), ] operations = [ migrations.Alt...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,240
gasti10/finalProject
refs/heads/master
/vincular/admin.py
from django.contrib import admin from django.http import HttpResponseRedirect from .models import RFID from django.contrib import messages # Register your models here. @admin.register(RFID) class RFIDAdmin(admin.ModelAdmin): def response_change(self, request, obj): if "_activarlector" in request.POST: ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,241
gasti10/finalProject
refs/heads/master
/animals/migrations/0001_initial.py
# Generated by Django 2.2.6 on 2019-11-21 22:36 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Animal', fields=[ ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,242
gasti10/finalProject
refs/heads/master
/animals/admin.py
from django.contrib import admin from .models import Animal, Caravana, Vacuna, AnimalVacunado # Register your models here. #admin.site.register(Animal) admin.site.register(Caravana) admin.site.register(Vacuna) admin.site.register(AnimalVacunado) @admin.register(Animal) class AnimalAdmin(admin.ModelAdmin): actio...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,243
gasti10/finalProject
refs/heads/master
/animals/views.py
from django.shortcuts import render # Create your views here. from .models import * def index(request): """ Función vista para la página inicio del sitio. """ # Genera contadores de algunos de los objetos principales num_animales=Animal.objects.all().count() num_caravanas=Caravana.objects.all...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,244
gasti10/finalProject
refs/heads/master
/animals/migrations/0011_auto_20200729_1141.py
# Generated by Django 3.0.8 on 2020-07-29 14:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('animals', '0010_auto_20200729_1132'), ] operations = [ migrations.RenameField( model_name='animal', old_name='caravana_id', ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,245
gasti10/finalProject
refs/heads/master
/vincular/apps.py
from django.apps import AppConfig class VincularConfig(AppConfig): name = 'vincular' verbose_name = "Vincular Chip-RFID"
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,246
gasti10/finalProject
refs/heads/master
/animals/migrations/0005_auto_20191128_1907.py
# Generated by Django 2.2.6 on 2019-11-28 22:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0004_auto_20191128_1907'), ] operations = [ migrations.AlterField( model_name='animal', name='tipo', ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,247
gasti10/finalProject
refs/heads/master
/animals/migrations/0003_auto_20191122_1844.py
# Generated by Django 2.2.6 on 2019-11-22 21:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0002_auto_20191122_1805'), ] operations = [ migrations.AlterModelOptions( name='animal', options={'verbos...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,248
gasti10/finalProject
refs/heads/master
/createAnimals.py
# python manage.py shell from animals.models import * for i in range(1, 101): num = 1217 + i c = Caravana.objects.create(numero=num, CUIG="AA 420" , RENSPA="8888", codRFID = num ) a = Animal.objects.create(sexo='M', raza="Vogelsberger Rund", caravana_id=c) prueba = "hola" print(prueba)
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,249
gasti10/finalProject
refs/heads/master
/animals/migrations/0006_auto_20191210_1819.py
# Generated by Django 2.2.6 on 2019-12-10 21:19 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0005_auto_20191128_1907'), ] operations = [ migrations.AlterField( model_name='animal', n...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,250
gasti10/finalProject
refs/heads/master
/animals/migrations/0002_auto_20191122_1805.py
# Generated by Django 2.2.6 on 2019-11-22 21:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0001_initial'), ] operations = [ migrations.AlterField( model_name='animal', name='id', field...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,251
gasti10/finalProject
refs/heads/master
/vincular/migrations/0001_initial.py
# Generated by Django 3.0.8 on 2020-07-29 14:32 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='RFID', fields=[ ('id', models.AutoField(pri...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,252
gasti10/finalProject
refs/heads/master
/animals/migrations/0008_auto_20191226_1803.py
# Generated by Django 2.2.6 on 2019-12-26 21:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0007_auto_20191210_1854'), ] operations = [ migrations.AlterField( model_name='caravana', name='CUIG', ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,253
gasti10/finalProject
refs/heads/master
/animals/models.py
from django.db import models # Create your models here. from django.urls import reverse #Used to generate URLs by reversing the URL patterns import datetime class Animal(models.Model): """ Modelo que representa un animal. """ id = models.AutoField('Animal',primary_key=True) sexo = models.CharFie...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,254
gasti10/finalProject
refs/heads/master
/vincular/models.py
from django.db import models from django.urls import reverse #Used to generate URLs by reversing the URL patterns # Create your models here. class RFID(models.Model): """ Modelo que representa un Chip RFID. """ readonly_fields = ('created', 'updated') id = models.AutoField(primary_key=True) ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,255
gasti10/finalProject
refs/heads/master
/animals/migrations/0009_auto_20200728_1115.py
# Generated by Django 3.0.8 on 2020-07-28 14:15 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('animals', '0008_auto_20191226_1803'), ] operations = [ migrations.AlterField( model_name='anima...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,256
gasti10/finalProject
refs/heads/master
/animals/migrations/0007_auto_20191210_1854.py
# Generated by Django 2.2.6 on 2019-12-10 21:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animals', '0006_auto_20191210_1819'), ] operations = [ migrations.AlterField( model_name='caravana', name='color', ...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,257
gasti10/finalProject
refs/heads/master
/animals/migrations/0004_auto_20191128_1907.py
# Generated by Django 2.2.6 on 2019-11-28 22:07 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('animals', '0003_auto_20191122_1844'), ] operations = [ migrations.AlterModelOptions( name='animal', options={'ordering': ['-...
{"/vincular/admin.py": ["/vincular/models.py"], "/animals/admin.py": ["/animals/models.py"], "/animals/views.py": ["/animals/models.py"], "/createAnimals.py": ["/animals/models.py"]}
40,356
medyagh/seeing-is-beliebing
refs/heads/master
/data-strip.py
# convenience script to obfuscate, but not completely redact, *some* # identifier information from a list of Instagram images, such as # all likes and commenters. Image unique ID is left in so original data # can be recovered import json from random import choice from string import ascii_letters, digits FNAME = './exa...
{"/beliebe.py": ["/instagram_utils.py"]}
40,357
medyagh/seeing-is-beliebing
refs/heads/master
/instagram_utils.py
import requests import json from datetime import datetime INSTAGRAM_DOMAIN = 'https://api.instagram.com' MEDIA_PATH = '/v1/media/shortcode/%s' MEDIA_SEARCH_PATH = '/v1/media/search' def extract_shortcode(weburl): """ weburl (String): Can be either: - "https://instagram.com/p/6xXvJqwi-k/?taken-b...
{"/beliebe.py": ["/instagram_utils.py"]}
40,358
medyagh/seeing-is-beliebing
refs/heads/master
/beliebe.py
from datetime import datetime from instagram_utils import extract_shortcode, get_images_near_some_other_image_via_shortcode from os import environ, makedirs from os.path import join from shutil import copytree import argparse import json DEFAULT_TOKEN = environ['INSTAGRAM_TOKEN'] TOKENHELPMSG = "Default is %s" % DEFAU...
{"/beliebe.py": ["/instagram_utils.py"]}
40,381
parthvyas103/important_events
refs/heads/main
/services.py
from typing import Dict import json as _json import datetime as dt def get_all_events() -> Dict: with open("events.json", encoding='utf-8') as events_file: data = _json.load(events_file) return data def get_month_events(month: str) -> Dict: events = get_all_events() month = month.lower() t...
{"/main.py": ["/services.py"]}
40,382
parthvyas103/important_events
refs/heads/main
/scrape.py
import requests as _requests import bs4 as _bs4 from typing import List def _generate_url(month: str, day : int) -> str: url = f"https://www.onthisday.com/events/{month}/{day}" return url def _get_page(url : str) -> _bs4.BeautifulSoup: page = _requests.get(url) soup = _bs4.BeautifulSoup(page.content, "...
{"/main.py": ["/services.py"]}
40,383
parthvyas103/important_events
refs/heads/main
/main.py
from fastapi import FastAPI import services as _services app = FastAPI() @app.get("/") async def root(): return {"message":"Welcome to Events API"} @app.get("/events") async def all_events(): return _services.get_all_events() @app.get("/events/today") async def get_today_events(): return _services.get_to...
{"/main.py": ["/services.py"]}
40,391
andrewlilley/office_intro_music
refs/heads/master
/predict_faces_live.py
# check out http://www.clipconverter.cc/ to get clips import cv import cv2 import datetime import gevent import json import numpy as np import os # from read_from_web_cam import get_cv_img_from_ip_cam from camera_input.read_from_canon_cam import get_cv_img_from_canon_cam from utils.face_utils import face_detect_on_ph...
{"/retrain_recognizer.py": ["/predict_faces_live.py"]}
40,392
andrewlilley/office_intro_music
refs/heads/master
/retrain_recognizer.py
from predict_faces_live import train_recognizer, RECOGNIZER_FILENAME import cv2 if __name__ == "__main__": recognizer = cv2.createFisherFaceRecognizer() recognizer = train_recognizer(recognizer) recognizer.save(RECOGNIZER_FILENAME)
{"/retrain_recognizer.py": ["/predict_faces_live.py"]}
40,393
andrewlilley/office_intro_music
refs/heads/master
/voice_intro_creation.py
# THIS FILE WILL ONLY WORK ON MAC OS X import pyttsx import Foundation import random from engineer_list import ENGINEER_TO_MP3 Foundation.NSURL engine = pyttsx.Engine() voices = engine.getProperty("voices") for voice in voices: print voice.id if "Alex" in str(voice.id): # cannot arbitrarily create objc stri...
{"/retrain_recognizer.py": ["/predict_faces_live.py"]}
40,394
andrewlilley/office_intro_music
refs/heads/master
/utils/sonos_utils.py
import datetime import time import soco sonos_devices = soco.SonosDiscovery() TARGET_SPEAKER = "Engineering" NEW_VOLUME = 75 SECONDS_TO_LOWER_VOLUME = 5 VOLUME_REDUCTION_STEP_COUNT = 5 is_playing_music = False def find_sonos_device(): print "Starting search for Sonos speaker..." while True: for ip ...
{"/retrain_recognizer.py": ["/predict_faces_live.py"]}
40,395
andrewlilley/office_intro_music
refs/heads/master
/engineer_list.py
from utils.face_utils import OUTPUT_DIRECTORY import os INTRO_BASE = "https://s3.amazonaws.com/intro_voice/%s.mp3" ENGINEER_TO_SONG = { "Scott Lobdell": ["https://s3.amazonaws.com/theme_music/Mike+Jones+My+64+Ft+Lil+Eazy+E%2C+Snoop+Dogg%2C+Bun+B.mp3"], # other engineer names go here } def _name_to_for...
{"/retrain_recognizer.py": ["/predict_faces_live.py"]}
40,422
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/tasks.py
from celery import shared_task from celery.utils.log import get_task_logger import requests import json from . import models logger = get_task_logger(__name__) @shared_task def post_model(data): logger.info(f'post_model data {data}') model_name = data['model_name'] auth_t = data['Authorization'] log...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,423
RichieBrady/SimApi-Python
refs/heads/master
/src/input_output_router/router_api.py
import json from bottle import request, route, run from celery.utils.log import get_task_logger from router_tasks import post_input, post_output logger = get_task_logger(__name__) @route('/route_input/<container_id>', method='POST') def route_input(container_id): post_input.apply_async((request.json, container...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,424
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_generator/run_eptf.py
import os class RunEnergyPlusToFMU: def __init__(self, idf='_fmu-export-variable.idf', epw='USA.epw', directory='/home/fmu/code/energy/test'): self.idf = idf self.epw = epw self.directory = directory def run(self): eplus_command = "cd " + self.directory + " && \ ...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,425
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/tests/test_views.py
from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from rest_api.models import User, FmuModel # TODO write tests class FmuModelViewTest(APITestCase): """ Test FmuModelParameters View """ def setUp(self) -> None: self.test_user = User(name='test_use...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,426
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/simulator/test_simulation_obj.py
import os.path import sys from simulator.simulation_obj import SimulationObject from pyfmi.fmi import load_fmu sys.path.append(os.path.join(os.path.dirname(__file__), '..')) """ Simple test script to. Tests functionality of the simulation_obj class""" # model = load_fmu('brandon_working.fmu', log_level=4) # # final_...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,427
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_generator/generator_tasks.py
import celeryconfig from celery import Celery from run_eptf import RunEnergyPlusToFMU app = Celery('generator_tasks') app.config_from_object(celeryconfig) # runs EnergyPlusToFMU command and generates FMU @app.task def gen_fmu(idf, epw, directory): energy_plus = RunEnergyPlusToFMU(idf=idf, epw=epw, directory=dir...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,428
RichieBrady/SimApi-Python
refs/heads/master
/data_files/gen_csv.py
import csv import random import sys def populate_test_csv(): f = open('test.csv', 'w') with f: input_fields = ['time_step', 'PlantOnSched', 'HeatingSetpointSchedule'] temp_change = [1, -1] plant_on_sched_last = 52 heating_setpoint_schedule_last = 20 writer = csv.DictW...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,429
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_generator/EnergyPlusToFMU.py
#!/usr/bin/env python #--- Purpose. # # Export an EnergyPlus model as a Functional Mockup Unit (FMU) for co-simulation. #--- Note on directory location. # # This script uses relative paths to locate some of the files it needs. # Therefore it should not be moved from its default directory. # However, this scr...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,430
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/models.py
from django.db import models from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager from django.contrib.postgres.fields import JSONField from django.db.models import FileFi...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,431
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/simulator/simulation_obj.py
import json import os import sys import pyfmi from pyfmi import load_fmu from pyfmi.fmi import FMUModelCS2 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) """ SimulationObject class represents an FMU model and class methods to access and run the model """ class SimulationObject: model: pyfmi.f...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,432
RichieBrady/SimApi-Python
refs/heads/master
/simapi.py
import csv import json import logging import polling2 import requests import pandas as pd user_url = 'http://127.0.0.1:8000/user/' login_url = 'http://127.0.0.1:8000/login/' init_url = 'http://127.0.0.1:8000/init_model/' input_url = 'http://127.0.0.1:8000/input/' output_url = 'http://127.0.0.1:8000/output/' graphql_ur...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,433
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/admin.py
from django.contrib import admin from . import models # Register your models here. admin.site.register(models.User) admin.site.register(models.FmuModel) admin.site.register(models.Input) admin.site.register(models.Output) admin.site.register(models.ContainerHostNames)
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,434
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/serializers.py
from django.db import models from rest_framework import serializers from .models import Input, Output, User, FmuModel, ContainerHostNames, FileModel class UserSerializer(serializers.ModelSerializer): """""" class Meta: model = User fields = ('user_id', 'name', 'email', 'password') extr...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,435
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/views.py
import json import polling2 from django.http import HttpResponse from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication, SessionAuthentication from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.authtoken.views import ObtainAuthToken from ...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,436
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/__init__.py
from . import simulator
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,437
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/urls.py
from django.urls import path # TODO write urls here and import simapi_web urlpatterns = [ path('user/') ]
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,438
RichieBrady/SimApi-Python
refs/heads/master
/sim_timer.py
import csv import time class SimTimer: # TODO add "static" list to store each test time then write to csv _all_times = [] def __init__(self): self._start_time = 0.0 self._end_time = 0. def capture_start_time(self): self._start_time = time.perf_counter() def capture_end_t...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,439
RichieBrady/SimApi-Python
refs/heads/master
/src/input_output_router/router_tasks.py
from celery import Celery import celeryconfig import requests import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from celery.utils.log import get_task_logger logger = get_task_logger(__name__) app = Celery('router_tasks') app.config_from_object(celeryconfig) @app.task def post_inp...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,440
RichieBrady/SimApi-Python
refs/heads/master
/example_simulate.py
from simapi import SimApi from sim_timer import SimTimer model_name = "test123" model_count = 1 # TODO change to steps per hour parse on backend step_size = 900 # in seconds # TODO convert to dict {'days': , 'months': , 'year': } parse on backend final_time = 24 # in hours idf_path = "data_files/new.idf" epw_path = ...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,441
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_generator/generator_api.py
import time from pathlib import Path import requests from bottle import request, route, run, response import json import os.path import generator_tasks # receives idf and epw files, generates the FMU and stores. @route('/file_upload/<model_name>', method='POST') def file_upload(model_name): upload = request.fil...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,442
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/sim_proc.py
import json import subprocess import sys import requests from simulator.simulation_obj import SimulationObject class SimProc: def __init__(self, sim_data): self.sim_obj = None self.model_name = sim_data['model_name'] self.final_time = sim_data['final_time'] self.step_size = sim_d...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,443
RichieBrady/SimApi-Python
refs/heads/master
/src/input_output_router/celeryconfig.py
BROKER_URL = 'amqp://user:pass@broker:5672/vhost' CELERY_RESULT_BACKEND = 'db+postgresql://postgres:backend@backend/backend_db' CELERY_TASK_ROUTES = {'router_tasks.*': {'queue': 'router'}}
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,444
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/sim_api.py
from bottle import request, route, run, response import os.path import json import sys sys.path.append(os.path.join(os.path.dirname(__file__), '')) # receive timestep value for new inputs. database queried using timestep to retrieve correct input @route('/model_input', method='POST') def get_input(): temp = jso...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,445
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/tests/test_models.py
from django.test import TestCase from rest_api.models import Input, Output, User, FmuModel class UserTestCase(TestCase): """ Test user and super user creation """ def test_user(self): self.test_user = User.objects.create( name='test user', email='testuser@test.com', ...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,446
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_generator/celeryconfig.py
BROKER_URL = 'amqp://user:pass@broker:5672/vhost' CELERY_RESULT_BACKEND = 'db+postgresql://postgres:backend@backend/backend_db' CELERY_ROUTES = {'generator_tasks.*': {'queue': 'gen'}}
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,447
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/schema.py
import graphene from graphene_django import DjangoObjectType from django.db.models import Q from . import models class UserType(DjangoObjectType): class Meta: model = models.User class FmuModelType(DjangoObjectType): class Meta: model = models.FmuModel class InputType(DjangoObjectType): ...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,448
RichieBrady/SimApi-Python
refs/heads/master
/src/simapi_web/rest_api/migrations/0001_initial.py
# Generated by Django 3.0.3 on 2020-04-12 11:35 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_p...
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,449
RichieBrady/SimApi-Python
refs/heads/master
/src/fmu_simulator/sim_worker.py
import sys with open('proc_pipe', 'wt') as f: f.write(sys.argv[1])
{"/src/simapi_web/rest_api/serializers.py": ["/src/simapi_web/rest_api/models.py"], "/example_simulate.py": ["/simapi.py", "/sim_timer.py"]}
40,450
krishnakarthik9/networks-chatApp
refs/heads/master
/inputGUI.py
from Tkinter import * import sys import struct import socket from client import messagePacket class mainWindow(object): def __init__(self,master, server, userDetails): self.master=master master.minsize(width=640, height=480) self.server=server self.userDetails=userDetails se...
{"/inputGUI.py": ["/client.py"]}
40,451
krishnakarthik9/networks-chatApp
refs/heads/master
/server.py
import time import socket import threading from threading import Thread import SocketServer from DB import UserDB from DB import MessageDB import struct # register constants USER_ALREADY_EXISTS = '1' YOU_ARE_REGISTERED = '2' # login constants SUCCESSFULLY_AUTHENTICATED = '0' NO_SUCH_USER_EXISTS = '1' PASSWORD_WRONG =...
{"/inputGUI.py": ["/client.py"]}
40,452
krishnakarthik9/networks-chatApp
refs/heads/master
/client.py
import socket import sys import getpass import time from threading import Thread import pymongo import select import struct from util import * from Tkinter import * import inputGUI PRIVATE = '-p' BROADCAST = '-b' WHOELSE = 'whoelse' WOISTHERE = 'whoisthere' LOGOUT = 'logout' BLOCK = '-block' UNBLOCK = '-unblock' isLog...
{"/inputGUI.py": ["/client.py"]}
40,453
krishnakarthik9/networks-chatApp
refs/heads/master
/DB.py
import pymongo import time from copy import deepcopy class UserDB(object): def __init__(self): mongoServer = 'localhost' mongoPort = 27017 dbName = 'userDB' userDataCollection = 'userData' userLoginBlockListCollection = 'userLoginBlockList-final' userBlockListCollect...
{"/inputGUI.py": ["/client.py"]}
40,454
krishnakarthik9/networks-chatApp
refs/heads/master
/util.py
import sys import time def getTime(epoch): return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(float(epoch))) def getType(msgType): if msgType == '-p': return 'private' elif msgType == '-b': return 'broadcast' return 'query' def displayMessage(message): message = eval(message) m = '<{}>: {} \t\t(a...
{"/inputGUI.py": ["/client.py"]}